aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
authorZero~Informatique2021-07-03 23:07:09 +0200
committerZero~Informatique2022-04-12 18:50:03 +0200
commit2bd63dc7622c0f84383fb76f7e2c4380d3f78495 (patch)
tree08bcc02fd5155e12d74c870ed3e21be091b209c2 /viewer
parentdecea166df9e0d30ba8fb7e9dff07963f0ff650a (diff)
downloadldgallery-2bd63dc7622c0f84383fb76f7e2c4380d3f78495.tar.gz
viewer: register markdown item type
Extracted from b170f49 (GH PR #304)
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/@types/ItemType.ts1
-rw-r--r--viewer/src/@types/gallery.d.ts8
-rw-r--r--viewer/src/services/navigation.ts1
3 files changed, 10 insertions, 0 deletions
diff --git a/viewer/src/@types/ItemType.ts b/viewer/src/@types/ItemType.ts
index 9974d4e..5ef38d8 100644
--- a/viewer/src/@types/ItemType.ts
+++ b/viewer/src/@types/ItemType.ts
@@ -21,6 +21,7 @@ export enum ItemType {
21 OTHER = "other", 21 OTHER = "other",
22 PICTURE = "picture", 22 PICTURE = "picture",
23 PLAINTEXT = "plaintext", 23 PLAINTEXT = "plaintext",
24 MARKDOWN = "markdown",
24 PDF = "pdf", 25 PDF = "pdf",
25 VIDEO = "video", 26 VIDEO = "video",
26 AUDIO = "audio", 27 AUDIO = "audio",
diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts
index 9011f19..0b4cfc4 100644
--- a/viewer/src/@types/gallery.d.ts
+++ b/viewer/src/@types/gallery.d.ts
@@ -48,6 +48,9 @@ export interface PictureItem extends Item {
48export interface PlainTextItem extends Item { 48export interface PlainTextItem extends Item {
49 properties: PlainTextProperties; 49 properties: PlainTextProperties;
50} 50}
51export interface MarkdownItem extends Item {
52 properties: MarkdownProperties;
53}
51export interface PDFItem extends Item { 54export interface PDFItem extends Item {
52 properties: PDFProperties; 55 properties: PDFProperties;
53} 56}
@@ -71,6 +74,7 @@ export interface Item {
71 | OtherProperties 74 | OtherProperties
72 | PictureProperties 75 | PictureProperties
73 | PlainTextProperties 76 | PlainTextProperties
77 | MarkdownProperties
74 | PDFProperties 78 | PDFProperties
75 | VideoProperties 79 | VideoProperties
76 | AudioProperties 80 | AudioProperties
@@ -93,6 +97,10 @@ export interface PlainTextProperties {
93 type: ItemType.PLAINTEXT; 97 type: ItemType.PLAINTEXT;
94 resource: string; 98 resource: string;
95} 99}
100export interface MarkdownProperties {
101 type: ItemType.MARKDOWN;
102 resource: string;
103}
96export interface PDFProperties { 104export interface PDFProperties {
97 type: ItemType.PDF; 105 type: ItemType.PDF;
98 resource: string; 106 resource: string;
diff --git a/viewer/src/services/navigation.ts b/viewer/src/services/navigation.ts
index 9bbd90c..5dcea88 100644
--- a/viewer/src/services/navigation.ts
+++ b/viewer/src/services/navigation.ts
@@ -25,6 +25,7 @@ export default class Navigation {
25 directory: "folder", 25 directory: "folder",
26 picture: "image", 26 picture: "image",
27 plaintext: "file-alt", 27 plaintext: "file-alt",
28 markdown: "file-alt",
28 pdf: "file-pdf", 29 pdf: "file-pdf",
29 video: "file-video", 30 video: "file-video",
30 audio: "file-audio", 31 audio: "file-audio",