tycho-components 0.32.1 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,12 +21,14 @@ type EditionToolsMenu = {
|
|
|
21
21
|
action: string;
|
|
22
22
|
title: string;
|
|
23
23
|
icon: string;
|
|
24
|
+
image?: string;
|
|
24
25
|
path: string;
|
|
25
26
|
};
|
|
26
27
|
export declare const EDITION_TOOLS: EditionToolsMenu[];
|
|
27
28
|
declare const ToolsUtils: {
|
|
28
29
|
redirectPage: ({ corpus, uid, hasParameter, tool, ctxPath, sameWindow, }: RedirectPageParams) => void;
|
|
29
30
|
getIcon: (defaultTool?: PlatformTools) => string;
|
|
31
|
+
getImage: (defaultTool?: PlatformTools) => string | undefined;
|
|
30
32
|
openDocument: ({ page, corpus, hasParameter, defaultTool, ctxPath, }: OpenDocumentParams) => void;
|
|
31
33
|
getDocumentUrl: ({ page, corpus, hasParameter, defaultTool, ctxPath, }: OpenDocumentParams) => string | undefined;
|
|
32
34
|
getTitle: (defaultTool?: PlatformTools) => string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import logoUd from "./logo-ud.png";
|
|
1
2
|
export const EDITION_TOOLS = [
|
|
2
3
|
{
|
|
3
4
|
parameter: "useEdictor",
|
|
@@ -36,7 +37,8 @@ export const EDITION_TOOLS = [
|
|
|
36
37
|
name: "UD",
|
|
37
38
|
action: "actions:actions.label.ud",
|
|
38
39
|
title: "actions:actions.name.ud",
|
|
39
|
-
icon: "
|
|
40
|
+
icon: "",
|
|
41
|
+
image: logoUd,
|
|
40
42
|
path: "/ud",
|
|
41
43
|
},
|
|
42
44
|
];
|
|
@@ -48,6 +50,10 @@ const getIcon = (defaultTool) => {
|
|
|
48
50
|
const tool = defaultTool || "EDICTOR";
|
|
49
51
|
return EDITION_TOOLS.filter((t) => t.name === tool)[0].icon;
|
|
50
52
|
};
|
|
53
|
+
const getImage = (defaultTool) => {
|
|
54
|
+
const tool = defaultTool || "EDICTOR";
|
|
55
|
+
return EDITION_TOOLS.filter((t) => t.name === tool)[0].image;
|
|
56
|
+
};
|
|
51
57
|
const withCtxPath = (absolutePath, ctxPath) => {
|
|
52
58
|
if (!ctxPath)
|
|
53
59
|
return absolutePath;
|
|
@@ -137,6 +143,7 @@ const openDocument = ({ page, corpus, hasParameter, defaultTool, ctxPath, }) =>
|
|
|
137
143
|
const ToolsUtils = {
|
|
138
144
|
redirectPage,
|
|
139
145
|
getIcon,
|
|
146
|
+
getImage,
|
|
140
147
|
openDocument,
|
|
141
148
|
getDocumentUrl,
|
|
142
149
|
getTitle,
|
|
Binary file
|