From 35456c6183c199b23ded85838414eb28a6d4b60f Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 4 May 2020 00:11:31 +0200 Subject: viewer/LdDownload: add generic file download handler GitHub: closes #209 --- viewer/src/@types/gallery.d.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 066aedf..3246894 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -55,6 +55,7 @@ declare namespace Gallery { } interface OtherProperties { type: "other", + resource: string } interface PictureProperties { type: "picture", -- cgit v1.2.3 From 04d5cb917f4288c26a308dfda4ba788d77fda8fd Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 13 May 2020 00:18:16 +0200 Subject: compiler: add plain text file format support through simple copy --- viewer/src/@types/gallery.d.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 3246894..04df1bb 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -37,6 +37,9 @@ declare namespace Gallery { interface Picture extends Item { properties: PictureProperties, } + interface PlainText extends Item { + properties: PlainTextProperties, + } interface Directory extends Item { properties: DirectoryProperties, } @@ -47,7 +50,7 @@ declare namespace Gallery { tags: RawTag[], path: string, thumbnail?: Thumbnail - properties: OtherProperties | PictureProperties | DirectoryProperties, + properties: OtherProperties | PictureProperties | PlainTextProperties | DirectoryProperties, } interface Resolution { width: number, @@ -62,6 +65,10 @@ declare namespace Gallery { resource: string, resolution: Resolution } + interface PlainTextProperties { + type: "plaintext", + resource: string, + } interface DirectoryProperties { type: "directory", items: Item[] @@ -71,5 +78,5 @@ declare namespace Gallery { resolution: Resolution } type RawTag = string; - type ItemType = "other" | "picture" | "directory"; + type ItemType = "other" | "picture" | "plaintext" | "directory"; } -- cgit v1.2.3 From e9e46a3b3392ab435f7414729592b2b5af4071b6 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 18 May 2020 20:05:14 +0200 Subject: compiler: add pdf resource type --- viewer/src/@types/gallery.d.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 04df1bb..7345ef9 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -40,6 +40,9 @@ declare namespace Gallery { interface PlainText extends Item { properties: PlainTextProperties, } + interface PDF extends Item { + properties: PDFProperties, + } interface Directory extends Item { properties: DirectoryProperties, } @@ -50,7 +53,7 @@ declare namespace Gallery { tags: RawTag[], path: string, thumbnail?: Thumbnail - properties: OtherProperties | PictureProperties | PlainTextProperties | DirectoryProperties, + properties: OtherProperties | PictureProperties | PlainTextProperties | PDFProperties | DirectoryProperties, } interface Resolution { width: number, @@ -69,6 +72,10 @@ declare namespace Gallery { type: "plaintext", resource: string, } + interface PDFProperties { + type: "pdf", + resource: string, + } interface DirectoryProperties { type: "directory", items: Item[] @@ -78,5 +85,5 @@ declare namespace Gallery { resolution: Resolution } type RawTag = string; - type ItemType = "other" | "picture" | "plaintext" | "directory"; + type ItemType = "other" | "picture" | "plaintext" | "pdf" | "directory"; } -- cgit v1.2.3 From 516ee7c5599f2c90a636fd9301806bef67830046 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 19 May 2020 21:06:16 +0200 Subject: compiler: add audio and video extensions --- viewer/src/@types/gallery.d.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 7345ef9..2407f98 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -43,6 +43,12 @@ declare namespace Gallery { interface PDF extends Item { properties: PDFProperties, } + interface Video extends Item { + properties: VideoProperties, + } + interface Audio extends Item { + properties: AudioProperties, + } interface Directory extends Item { properties: DirectoryProperties, } @@ -53,7 +59,13 @@ declare namespace Gallery { tags: RawTag[], path: string, thumbnail?: Thumbnail - properties: OtherProperties | PictureProperties | PlainTextProperties | PDFProperties | DirectoryProperties, + properties: OtherProperties + | PictureProperties + | PlainTextProperties + | PDFProperties + | VideoProperties + | AudioProperties + | DirectoryProperties, } interface Resolution { width: number, @@ -76,6 +88,14 @@ declare namespace Gallery { type: "pdf", resource: string, } + interface VideoProperties { + type: "video", + resource: string, + } + interface AudioProperties { + type: "audio", + resource: string, + } interface DirectoryProperties { type: "directory", items: Item[] @@ -85,5 +105,5 @@ declare namespace Gallery { resolution: Resolution } type RawTag = string; - type ItemType = "other" | "picture" | "plaintext" | "pdf" | "directory"; + type ItemType = "other" | "picture" | "plaintext" | "pdf" | "video" | "audio" | "directory"; } -- cgit v1.2.3 From 74c1c5e34787ac57299c8cbd874e9dcc56da406d Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 22 May 2020 04:14:48 +0200 Subject: viewer: Enumerated item types --- viewer/src/@types/ItemType.ts | 11 +++++++++++ viewer/src/@types/gallery.d.ts | 27 +++++++++++++-------------- 2 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 viewer/src/@types/ItemType.ts (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/ItemType.ts b/viewer/src/@types/ItemType.ts new file mode 100644 index 0000000..31a395b --- /dev/null +++ b/viewer/src/@types/ItemType.ts @@ -0,0 +1,11 @@ +// TODO: Convert all ambiant types related to LdGallery to modules + +export enum ItemType { + OTHER = "other", + PICTURE = "picture", + PLAINTEXT = "plaintext", + PDF = "pdf", + VIDEO = "video", + AUDIO = "audio", + DIRECTORY = "directory", +} diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 2407f98..151ae92 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -60,44 +60,44 @@ declare namespace Gallery { path: string, thumbnail?: Thumbnail properties: OtherProperties - | PictureProperties - | PlainTextProperties - | PDFProperties - | VideoProperties - | AudioProperties - | DirectoryProperties, + | PictureProperties + | PlainTextProperties + | PDFProperties + | VideoProperties + | AudioProperties + | DirectoryProperties, } interface Resolution { width: number, height: number, } interface OtherProperties { - type: "other", + type: import("./ItemType").ItemType.OTHER, resource: string } interface PictureProperties { - type: "picture", + type: import("./ItemType").ItemType.PICTURE, resource: string, resolution: Resolution } interface PlainTextProperties { - type: "plaintext", + type: import("./ItemType").ItemType.PLAINTEXT, resource: string, } interface PDFProperties { - type: "pdf", + type: import("./ItemType").ItemType.PDF, resource: string, } interface VideoProperties { - type: "video", + type: import("./ItemType").ItemType.VIDEO, resource: string, } interface AudioProperties { - type: "audio", + type: import("./ItemType").ItemType.AUDIO, resource: string, } interface DirectoryProperties { - type: "directory", + type: import("./ItemType").ItemType.DIRECTORY, items: Item[] } interface Thumbnail { @@ -105,5 +105,4 @@ declare namespace Gallery { resolution: Resolution } type RawTag = string; - type ItemType = "other" | "picture" | "plaintext" | "pdf" | "video" | "audio" | "directory"; } -- cgit v1.2.3 From 69dc0d20706ed41e5ecdbb77515066d8a7d7703b Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 19 Jun 2020 22:12:03 +0200 Subject: viewer: code update (no functional change) Types { [x: T]: R } updated to Record Methods in template updated to getters (computed in VueJS), which are reactive and cached Code formatting --- viewer/src/@types/scrollposition.d.ts | 2 +- viewer/src/@types/tag.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/scrollposition.d.ts b/viewer/src/@types/scrollposition.d.ts index b2147fa..cd393b3 100644 --- a/viewer/src/@types/scrollposition.d.ts +++ b/viewer/src/@types/scrollposition.d.ts @@ -17,4 +17,4 @@ -- along with this program. If not, see . */ -type ScrollPosition = { [index: string]: number } +type ScrollPosition = Record diff --git a/viewer/src/@types/tag.d.ts b/viewer/src/@types/tag.d.ts index 76f1207..59ae779 100644 --- a/viewer/src/@types/tag.d.ts +++ b/viewer/src/@types/tag.d.ts @@ -31,8 +31,8 @@ declare namespace Tag { operation: string; // Enum Operation display: string; } - type SearchByOperation = { [index: string]: Tag.Search[] }; - type Index = { [index: string]: Node }; + type SearchByOperation = Record; + type Index = Record; interface Category { tag: string; -- cgit v1.2.3 From 170d7a61f720ece9dc4b347b19f5a8213f1d8984 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 20 Jun 2020 16:50:49 +0200 Subject: viewer: prettier formatting based on eslint-prettier plugin --- viewer/src/@types/Operation.ts | 2 +- viewer/src/@types/gallery.d.ts | 89 ++++++++++++++++++----------------- viewer/src/@types/scrollposition.d.ts | 2 +- 3 files changed, 47 insertions(+), 46 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/Operation.ts b/viewer/src/@types/Operation.ts index e7aad27..e566f4b 100644 --- a/viewer/src/@types/Operation.ts +++ b/viewer/src/@types/Operation.ts @@ -21,4 +21,4 @@ export enum Operation { INTERSECTION = "", ADDITION = "+", SUBSTRACTION = "-", -}; +} diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 151ae92..1342ff9 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -19,90 +19,91 @@ declare namespace Gallery { interface Config { - galleryRoot: string, + galleryRoot: string; } interface GalleryProperties { - galleryTitle: string, - tagCategories: RawTag[] + galleryTitle: string; + tagCategories: RawTag[]; } interface Index { - properties: GalleryProperties, - tree: Directory + properties: GalleryProperties; + tree: Directory; } interface Other extends Item { - properties: OtherProperties, + properties: OtherProperties; } interface Picture extends Item { - properties: PictureProperties, + properties: PictureProperties; } interface PlainText extends Item { - properties: PlainTextProperties, + properties: PlainTextProperties; } interface PDF extends Item { - properties: PDFProperties, + properties: PDFProperties; } interface Video extends Item { - properties: VideoProperties, + properties: VideoProperties; } interface Audio extends Item { - properties: AudioProperties, + properties: AudioProperties; } interface Directory extends Item { - properties: DirectoryProperties, + properties: DirectoryProperties; } interface Item { - title: string, - datetime: string, - description: string, - tags: RawTag[], - path: string, - thumbnail?: Thumbnail - properties: OtherProperties - | PictureProperties - | PlainTextProperties - | PDFProperties - | VideoProperties - | AudioProperties - | DirectoryProperties, + title: string; + datetime: string; + description: string; + tags: RawTag[]; + path: string; + thumbnail?: Thumbnail; + properties: + | OtherProperties + | PictureProperties + | PlainTextProperties + | PDFProperties + | VideoProperties + | AudioProperties + | DirectoryProperties; } interface Resolution { - width: number, - height: number, + width: number; + height: number; } interface OtherProperties { - type: import("./ItemType").ItemType.OTHER, - resource: string + type: import("./ItemType").ItemType.OTHER; + resource: string; } interface PictureProperties { - type: import("./ItemType").ItemType.PICTURE, - resource: string, - resolution: Resolution + type: import("./ItemType").ItemType.PICTURE; + resource: string; + resolution: Resolution; } interface PlainTextProperties { - type: import("./ItemType").ItemType.PLAINTEXT, - resource: string, + type: import("./ItemType").ItemType.PLAINTEXT; + resource: string; } interface PDFProperties { - type: import("./ItemType").ItemType.PDF, - resource: string, + type: import("./ItemType").ItemType.PDF; + resource: string; } interface VideoProperties { - type: import("./ItemType").ItemType.VIDEO, - resource: string, + type: import("./ItemType").ItemType.VIDEO; + resource: string; } interface AudioProperties { - type: import("./ItemType").ItemType.AUDIO, - resource: string, + type: import("./ItemType").ItemType.AUDIO; + resource: string; } interface DirectoryProperties { - type: import("./ItemType").ItemType.DIRECTORY, - items: Item[] + type: import("./ItemType").ItemType.DIRECTORY; + items: Item[]; } interface Thumbnail { - resource: string, - resolution: Resolution + resource: string; + resolution: Resolution; } type RawTag = string; } diff --git a/viewer/src/@types/scrollposition.d.ts b/viewer/src/@types/scrollposition.d.ts index cd393b3..2f17515 100644 --- a/viewer/src/@types/scrollposition.d.ts +++ b/viewer/src/@types/scrollposition.d.ts @@ -17,4 +17,4 @@ -- along with this program. If not, see . */ -type ScrollPosition = Record +type ScrollPosition = Record; -- cgit v1.2.3 From d72e317896bcc2a675d21cec6f286e0b2730d77c Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 10 Sep 2020 19:58:41 +0200 Subject: viewer: limit + show more tags github: resolves #184 --- viewer/src/@types/gallery.d.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 1342ff9..56feff0 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -20,6 +20,7 @@ declare namespace Gallery { interface Config { galleryRoot: string; + initialTagDisplayLimit: number; } interface GalleryProperties { -- cgit v1.2.3 From eb636568643e892491fd925f7a92fc3feba6a67e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 11 Sep 2020 21:06:31 +0200 Subject: viewer: config.json url parameter + index.json configuration github: resolves #160 --- viewer/src/@types/gallery.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 56feff0..b756331 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -20,7 +20,8 @@ declare namespace Gallery { interface Config { galleryRoot: string; - initialTagDisplayLimit: number; + galleryIndex?: string; + initialTagDisplayLimit?: number; } interface GalleryProperties { -- cgit v1.2.3 From 96ed5e6583a7f03d4ea7fa0512e66fffb656cc6e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 12 Sep 2020 06:34:58 +0200 Subject: viewer: make default sort order configurable github: resolves #239 --- viewer/src/@types/gallery.d.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index b756331..8ef8fc7 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -18,9 +18,12 @@ */ declare namespace Gallery { + type ItemSortStr = "name_asc" | "date_desc"; + interface Config { galleryRoot: string; galleryIndex?: string; + initialSort?: ItemSortStr; initialTagDisplayLimit?: number; } -- cgit v1.2.3 From b909ec093591b50950c0de54b2005d471ca28116 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 12 Sep 2020 22:33:37 +0200 Subject: viewer: make default sort order configurable. code review improvements github: resolves #239 --- viewer/src/@types/gallery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 8ef8fc7..a7f3d29 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -23,7 +23,7 @@ declare namespace Gallery { interface Config { galleryRoot: string; galleryIndex?: string; - initialSort?: ItemSortStr; + initialItemSort?: ItemSortStr; initialTagDisplayLimit?: number; } -- cgit v1.2.3 From ab97f64575f1b51bacced6ce1bc6bf22e0354615 Mon Sep 17 00:00:00 2001 From: zeroinformatique Date: Thu, 17 Sep 2020 15:51:42 +0200 Subject: viewer: sort by date ascending (#249) * viewer: sort by date ascending * viewer: sort by date ascending--- viewer/src/@types/gallery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index a7f3d29..41ad5bb 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -18,7 +18,7 @@ */ declare namespace Gallery { - type ItemSortStr = "name_asc" | "date_desc"; + type ItemSortStr = "name_asc" | "date_asc" | "date_desc"; interface Config { galleryRoot: string; -- cgit v1.2.3 From d9e51ff55ef494d37c5e23ef8fb79500fa5585c5 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 19 Sep 2020 22:25:54 +0200 Subject: viewer: rename title sort order To avoid confusion with filenames. --- viewer/src/@types/gallery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts index 41ad5bb..e9b80e6 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts @@ -18,7 +18,7 @@ */ declare namespace Gallery { - type ItemSortStr = "name_asc" | "date_asc" | "date_desc"; + type ItemSortStr = "title_asc" | "date_asc" | "date_desc"; interface Config { galleryRoot: string; -- cgit v1.2.3