From d2d6f0496ce816e9238e785ed3d0e7bd61b2483b Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sun, 26 Jun 2022 18:49:36 +1000 Subject: Refactor TileInfoModal Also change server info-response format to include sub-node common-names --- src/lib.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/lib.ts') diff --git a/src/lib.ts b/src/lib.ts index 7841ac8..b3e6acc 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -48,11 +48,15 @@ export type ImgInfo = { license: string, artist: string, credit: string, -} -export type TileInfoResponse = { - tolNode: null | TolNode, - descData: null | DescInfo | [DescInfo, DescInfo], - imgData: null | ImgInfo | [ImgInfo, ImgInfo], +}; +export type NodeInfo = { + tolNode: TolNode, + descInfo: null | DescInfo, + imgInfo: null | ImgInfo, +}; +export type InfoResponse = { + nodeInfo: NodeInfo, + subNodesInfo: [] | [NodeInfo, NodeInfo], }; // Used by auto-mode and tutorial @@ -65,6 +69,7 @@ export type UiOptions = { // Shared coloring/sizing textColor: string, // CSS color bgColor: string, + bgColorAlt: string, bgColorLight: string, bgColorDark: string, bgColorLight2: string, -- cgit v1.2.3