aboutsummaryrefslogtreecommitdiff
path: root/viewer/src
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src')
-rw-r--r--viewer/src/@types/ItemType.ts19
-rw-r--r--viewer/src/@types/gallery.d.ts185
-rw-r--r--viewer/src/@types/scrollposition.d.ts2
-rw-r--r--viewer/src/@types/splashscreen.d.ts25
-rw-r--r--viewer/src/@types/tag.d.ts40
-rw-r--r--viewer/src/assets/scss/global.scss2
-rw-r--r--viewer/src/components/LdBreadcrumb.vue22
-rw-r--r--viewer/src/components/LdCommand.vue23
-rw-r--r--viewer/src/components/LdCommandSearch.vue6
-rw-r--r--viewer/src/components/LdCommandSort.vue11
-rw-r--r--viewer/src/components/LdGallery.vue12
-rw-r--r--viewer/src/components/LdInformation.vue20
-rw-r--r--viewer/src/components/LdKeyPress.vue2
-rw-r--r--viewer/src/components/LdProposition.vue39
-rw-r--r--viewer/src/components/LdTagInput.vue21
-rw-r--r--viewer/src/components/LdThumbnail.vue13
-rw-r--r--viewer/src/components/LdTitle.vue5
-rw-r--r--viewer/src/components/async/Markdown.vue123
-rw-r--r--viewer/src/components/async/index.ts4
-rw-r--r--viewer/src/components/item_handlers/LdAudioViewer.vue5
-rw-r--r--viewer/src/components/item_handlers/LdDirectoryViewer.vue (renamed from viewer/src/components/item_handlers/LdDirectory.vue)9
-rw-r--r--viewer/src/components/item_handlers/LdDownloadViewer.vue (renamed from viewer/src/components/item_handlers/LdDownload.vue)7
-rw-r--r--viewer/src/components/item_handlers/LdPdfViewer.vue7
-rw-r--r--viewer/src/components/item_handlers/LdPictureViewer.vue (renamed from viewer/src/components/item_handlers/LdPicture.vue)9
-rw-r--r--viewer/src/components/item_handlers/LdPlainTextViewer.vue3
-rw-r--r--viewer/src/components/item_handlers/LdVideoViewer.vue7
-rw-r--r--viewer/src/locales/en.json2
-rw-r--r--viewer/src/main.ts13
-rw-r--r--viewer/src/plugins/index.ts8
-rw-r--r--viewer/src/services/fetchWithCheck.ts7
-rw-r--r--viewer/src/services/indexfactory.ts32
-rw-r--r--viewer/src/services/indexsearch.ts24
-rw-r--r--viewer/src/services/itemComparators.ts13
-rw-r--r--viewer/src/services/ldzoom.ts9
-rw-r--r--viewer/src/services/navigation.ts15
-rw-r--r--viewer/src/store/galleryStore.ts30
-rw-r--r--viewer/src/store/index.ts7
-rw-r--r--viewer/src/store/uiStore.ts34
-rw-r--r--viewer/src/views/GalleryNavigation.vue16
-rw-r--r--viewer/src/views/GallerySearch.vue5
-rw-r--r--viewer/src/views/MainLayout.vue93
-rw-r--r--viewer/src/views/PanelLeft.vue14
-rw-r--r--viewer/src/views/PanelTop.vue2
-rw-r--r--viewer/src/views/SplashScreen.vue68
44 files changed, 676 insertions, 337 deletions
diff --git a/viewer/src/@types/ItemType.ts b/viewer/src/@types/ItemType.ts
index 31a395b..9974d4e 100644
--- a/viewer/src/@types/ItemType.ts
+++ b/viewer/src/@types/ItemType.ts
@@ -1,4 +1,21 @@
1// TODO: Convert all ambiant types related to LdGallery to modules 1/* ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery.
3--
4-- Copyright (C) 2019-2021 Guillaume FOUET
5--
6-- This program is free software: you can redistribute it and/or modify
7-- it under the terms of the GNU Affero General Public License as
8-- published by the Free Software Foundation, either version 3 of the
9-- License, or (at your option) any later version.
10--
11-- This program is distributed in the hope that it will be useful,
12-- but WITHOUT ANY WARRANTY; without even the implied warranty of
13-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-- GNU Affero General Public License for more details.
15--
16-- You should have received a copy of the GNU Affero General Public License
17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
2 19
3export enum ItemType { 20export enum ItemType {
4 OTHER = "other", 21 OTHER = "other",
diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts
index e9b80e6..9011f19 100644
--- a/viewer/src/@types/gallery.d.ts
+++ b/viewer/src/@types/gallery.d.ts
@@ -17,98 +17,101 @@
17-- along with this program. If not, see <https://www.gnu.org/licenses/>. 17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/ 18*/
19 19
20declare namespace Gallery { 20import { ItemType } from "./ItemType";
21 type ItemSortStr = "title_asc" | "date_asc" | "date_desc"; 21import { SplashScreenConfig } from "./splashscreen";
22 22
23 interface Config { 23export type ItemSortStr = "title_asc" | "date_asc" | "date_desc";
24 galleryRoot: string;
25 galleryIndex?: string;
26 initialItemSort?: ItemSortStr;
27 initialTagDisplayLimit?: number;
28 }
29 24
30 interface GalleryProperties { 25export interface Config {
31 galleryTitle: string; 26 galleryRoot: string;
32 tagCategories: RawTag[]; 27 galleryIndex?: string;
33 } 28 initialItemSort?: ItemSortStr;
34 interface Index { 29 initialTagDisplayLimit?: number;
35 properties: GalleryProperties; 30 splashScreen?: SplashScreenConfig;
36 tree: Directory; 31}
37 } 32
33export interface Properties {
34 galleryTitle: string;
35 tagCategories: RawTag[];
36}
37export interface Index {
38 properties: Properties;
39 tree: DirectoryItem;
40}
41
42export interface OtherItem extends Item {
43 properties: OtherProperties;
44}
45export interface PictureItem extends Item {
46 properties: PictureProperties;
47}
48export interface PlainTextItem extends Item {
49 properties: PlainTextProperties;
50}
51export interface PDFItem extends Item {
52 properties: PDFProperties;
53}
54export interface VideoItem extends Item {
55 properties: VideoProperties;
56}
57export interface AudioItem extends Item {
58 properties: AudioProperties;
59}
60export interface DirectoryItem extends Item {
61 properties: DirectoryProperties;
62}
63export interface Item {
64 title: string;
65 datetime: string;
66 description: string;
67 tags: RawTag[];
68 path: string;
69 thumbnail?: Thumbnail;
70 properties:
71 | OtherProperties
72 | PictureProperties
73 | PlainTextProperties
74 | PDFProperties
75 | VideoProperties
76 | AudioProperties
77 | DirectoryProperties;
78}
79export interface Resolution {
80 width: number;
81 height: number;
82}
83export interface OtherProperties {
84 type: ItemType.OTHER;
85 resource: string;
86}
87export interface PictureProperties {
88 type: ItemType.PICTURE;
89 resource: string;
90 resolution: Resolution;
91}
92export interface PlainTextProperties {
93 type: ItemType.PLAINTEXT;
94 resource: string;
95}
96export interface PDFProperties {
97 type: ItemType.PDF;
98 resource: string;
99}
100export interface VideoProperties {
101 type: ItemType.VIDEO;
102 resource: string;
103}
104export interface AudioProperties {
105 type: ItemType.AUDIO;
106 resource: string;
107}
108export interface DirectoryProperties {
109 type: ItemType.DIRECTORY;
110 items: Item[];
111}
38 112
39 interface Other extends Item { 113export interface Thumbnail {
40 properties: OtherProperties; 114 resource: string;
41 } 115 resolution: Resolution;
42 interface Picture extends Item {
43 properties: PictureProperties;
44 }
45 interface PlainText extends Item {
46 properties: PlainTextProperties;
47 }
48 interface PDF extends Item {
49 properties: PDFProperties;
50 }<