From 2bd63dc7622c0f84383fb76f7e2c4380d3f78495 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 3 Jul 2021 23:07:09 +0200 Subject: viewer: register markdown item type Extracted from b170f49 (GH PR #304) --- viewer/src/@types/ItemType.ts | 1 + viewer/src/@types/gallery.d.ts | 8 ++++++++ viewer/src/services/navigation.ts | 1 + 3 files changed, 10 insertions(+) (limited to 'viewer/src') 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 { OTHER = "other", PICTURE = "picture", PLAINTEXT = "plaintext", + MARKDOWN = "markdown", PDF = "pdf", VIDEO = "video", 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 { export interface PlainTextItem extends Item { properties: PlainTextProperties; } +export interface MarkdownItem extends Item { + properties: MarkdownProperties; +} export interface PDFItem extends Item { properties: PDFProperties; } @@ -71,6 +74,7 @@ export interface Item { | OtherProperties | PictureProperties | PlainTextProperties + | MarkdownProperties | PDFProperties | VideoProperties | AudioProperties @@ -93,6 +97,10 @@ export interface PlainTextProperties { type: ItemType.PLAINTEXT; resource: string; } +export interface MarkdownProperties { + type: ItemType.MARKDOWN; + resource: string; +} export interface PDFProperties { type: ItemType.PDF; 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 { directory: "folder", picture: "image", plaintext: "file-alt", + markdown: "file-alt", pdf: "file-pdf", video: "file-video", audio: "file-audio", -- cgit v1.2.3