From 9e4fdd6f38853d8a4a959901ab7902569de75484 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 21 Dec 2019 08:08:54 +0100 Subject: viewer: Implemented the "example" project in devServer Display loader and error messages (not translated yet) Created a "GalleryStore" to fetch the JSon data from the gallery (currently from example) --- viewer/src/@types/gallery/index.d.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 viewer/src/@types/gallery/index.d.ts (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts new file mode 100644 index 0000000..2dd11fb --- /dev/null +++ b/viewer/src/@types/gallery/index.d.ts @@ -0,0 +1,25 @@ +declare namespace Gallery { + interface Item { + title: string, + date: string, + description: string, + tags: string[], + path: string, + thumbnail: { + path: string, + }, + properties: Image | Directory, + } + interface Image { + type: "image", + filesize: number, + resolution: { + width: number, + height: number, + } + } + interface Directory { + type: "directory", + items: Item[] + } +} \ No newline at end of file -- cgit v1.2.3 From c2b4c5d144db17ebf2dc9de32ba25cc836831ae2 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 21 Dec 2019 21:15:59 +0100 Subject: viewer: Improved the Gallery type definitions. Basic display of the images and thumbnails example: "thumbnails" instead of "thumbs" --- viewer/src/@types/gallery/index.d.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts index 2dd11fb..b47c812 100644 --- a/viewer/src/@types/gallery/index.d.ts +++ b/viewer/src/@types/gallery/index.d.ts @@ -1,4 +1,10 @@ declare namespace Gallery { + interface Image extends Item { + properties: ImageProperties, + } + interface Directory extends Item { + properties: DirectoryProperties, + } interface Item { title: string, date: string, @@ -8,9 +14,9 @@ declare namespace Gallery { thumbnail: { path: string, }, - properties: Image | Directory, + properties: ImageProperties | DirectoryProperties, } - interface Image { + interface ImageProperties { type: "image", filesize: number, resolution: { @@ -18,7 +24,7 @@ declare namespace Gallery { height: number, } } - interface Directory { + interface DirectoryProperties { type: "directory", items: Item[] } -- cgit v1.2.3 From e34be1261d9219e5b2b92ebe271f609f11d55f63 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 22 Dec 2019 03:50:40 +0100 Subject: vewer: Tags indexing and search input --- viewer/src/@types/tag/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 viewer/src/@types/tag/index.d.ts (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag/index.d.ts new file mode 100644 index 0000000..6a027d4 --- /dev/null +++ b/viewer/src/@types/tag/index.d.ts @@ -0,0 +1,8 @@ +declare namespace Tag { + interface Node { + tag: string; + items: Gallery.Item[]; + children: Index; + } + type Index = { [index: string]: Node }; +} \ No newline at end of file -- cgit v1.2.3 From 06c4d9299bb684805051355555fa89f0d440d194 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 22 Dec 2019 11:26:53 +0100 Subject: viewer: Implemented tag category and disambiguation filtering --- viewer/src/@types/tag/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag/index.d.ts index 6a027d4..30bbebb 100644 --- a/viewer/src/@types/tag/index.d.ts +++ b/viewer/src/@types/tag/index.d.ts @@ -4,5 +4,9 @@ declare namespace Tag { items: Gallery.Item[]; children: Index; } + interface NodeWithParent extends Node { + parent: Node; + } + type Search = Node | NodeWithParent; type Index = { [index: string]: Node }; } \ No newline at end of file -- cgit v1.2.3 From 7c2576b0cfb0a15b2a14f6f5ea96de16f0c23b44 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 24 Dec 2019 02:22:56 +0100 Subject: viewer: Plugin for Optional chaining and Coalesce. Implemented tag operations (intersection, addition, substraction). Unified Tag.Search --- viewer/src/@types/tag/Operation.ts | 5 +++++ viewer/src/@types/tag/index.d.ts | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 viewer/src/@types/tag/Operation.ts (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/tag/Operation.ts b/viewer/src/@types/tag/Operation.ts new file mode 100644 index 0000000..a0de92b --- /dev/null +++ b/viewer/src/@types/tag/Operation.ts @@ -0,0 +1,5 @@ +export enum Operation { + INTERSECTION = '', + ADDITION = '+', + SUBSTRACTION = '-', +}; \ No newline at end of file diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag/index.d.ts index 30bbebb..6a0c605 100644 --- a/viewer/src/@types/tag/index.d.ts +++ b/viewer/src/@types/tag/index.d.ts @@ -4,9 +4,11 @@ declare namespace Tag { items: Gallery.Item[]; children: Index; } - interface NodeWithParent extends Node { - parent: Node; + interface Search extends Node { + parent?: Node; + operation: string; // Enum Operation + display: string; } - type Search = Node | NodeWithParent; + type SearchByOperation = { [index: string]: Tag.Search[] }; type Index = { [index: string]: Node }; } \ No newline at end of file -- cgit v1.2.3 From a681accaa7617892bb7c53248aa9030a4eb47f50 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sat, 28 Dec 2019 04:52:30 +0100 Subject: viewer: Tag propositions. Disabled directory indexation. Note: The propositions are not based on the current search results, but on the searched tags, which doesn't seem to be the correct way. We'll probably have to move the search results to a store for global visibility. --- viewer/src/@types/gallery/index.d.ts | 3 ++- viewer/src/@types/tag/index.d.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts index b47c812..310c865 100644 --- a/viewer/src/@types/gallery/index.d.ts +++ b/viewer/src/@types/gallery/index.d.ts @@ -9,7 +9,7 @@ declare namespace Gallery { title: string, date: string, description: string, - tags: string[], + tags: RawTag[], path: string, thumbnail: { path: string, @@ -28,4 +28,5 @@ declare namespace Gallery { type: "directory", items: Item[] } + type RawTag = string; } \ No newline at end of file diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag/index.d.ts index 6a0c605..181f47a 100644 --- a/viewer/src/@types/tag/index.d.ts +++ b/viewer/src/@types/tag/index.d.ts @@ -1,6 +1,6 @@ declare namespace Tag { interface Node { - tag: string; + tag: Gallery.RawTag; items: Gallery.Item[]; children: Index; } -- cgit v1.2.3 From 89bcb2dbe5b5e6eb8e8ba13ceecee2770dfe4cd4 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 9 Jan 2020 02:10:35 +0100 Subject: viewer: Changed "image" type to "picture". Adapted the code to the current compiler output format. The currentItem and currentPath are calculated in the store for easier multi-component access. Breadcrumb for current's position and navigation. --- viewer/src/@types/gallery/index.d.ts | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts index 310c865..97cc207 100644 --- a/viewer/src/@types/gallery/index.d.ts +++ b/viewer/src/@types/gallery/index.d.ts @@ -1,28 +1,22 @@ declare namespace Gallery { - interface Image extends Item { - properties: ImageProperties, + interface Picture extends Item { + properties: PictureProperties, } interface Directory extends Item { properties: DirectoryProperties, } interface Item { title: string, - date: string, + datetime: string, description: string, tags: RawTag[], path: string, - thumbnail: { - path: string, - }, - properties: ImageProperties | DirectoryProperties, + thumbnail?: string, + properties: PictureProperties | DirectoryProperties, } - interface ImageProperties { - type: "image", - filesize: number, - resolution: { - width: number, - height: number, - } + interface PictureProperties { + type: "picture", + resource: string, } interface DirectoryProperties { type: "directory", -- cgit v1.2.3 From 27b51018525dbb7a6edb3073819d82245387ddd3 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 10 Jan 2020 22:22:22 +0100 Subject: viewer: license headers --- viewer/src/@types/gallery/index.d.ts | 19 +++++++++++++++++++ viewer/src/@types/tag/Operation.ts | 19 +++++++++++++++++++ viewer/src/@types/tag/index.d.ts | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) (limited to 'viewer/src/@types') diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts index 97cc207..25407e8 100644 --- a/viewer/src/@types/gallery/index.d.ts +++ b/viewer/src/@types/gallery/index.d.ts @@ -1,3 +1,22 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + declare namespace Gallery { interface Picture extends Item { properties: PictureProperties, diff --git a/viewer/src/@types/tag/Operation.ts b/viewer/src/@types/tag/Operation.ts index a0de92b..f1e7a41 100644 --- a/viewer/src/@types/tag/Operation.ts +++ b/viewer/src/@types/tag/Operation.ts @@ -1,3 +1,22 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + export enum Operation { INTERSECTION = '', ADDITION = '+', diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag/index.d.ts index 181f47a..c77fc3b 100644 --- a/viewer/src/@types/tag/index.d.ts +++ b/viewer/src/@types/tag/index.d.ts @@ -1,3 +1,22 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + declare namespace Tag { interface Node { tag: Gallery.RawTag; -- cgit v1.2.3