aboutsummaryrefslogtreecommitdiff
path: root/viewer/src
diff options
context:
space:
mode:
authorpacien2020-09-25 16:01:49 +0200
committerpacien2020-09-25 16:01:49 +0200
commite93f7b1eb84c083d67567115284c0002a3a7d5fc (patch)
tree8d373e8f7f571485e1330928f43b090ed004c525 /viewer/src
parent8e3ac8fe44bebb38e1882ca7f06b8100078ad88d (diff)
parentfd542f75a1d94ee5f804d0925823276b97f38581 (diff)
downloadldgallery-e93f7b1eb84c083d67567115284c0002a3a7d5fc.tar.gz
Merge branch 'develop' for release v2.0v2.0
Diffstat (limited to 'viewer/src')
-rw-r--r--viewer/src/@types/ItemType.ts11
-rw-r--r--viewer/src/@types/Operation.ts2
-rw-r--r--viewer/src/@types/gallery.d.ts92
-rw-r--r--viewer/src/@types/scrollposition.d.ts2
-rw-r--r--viewer/src/@types/tag.d.ts4
-rw-r--r--viewer/src/assets/scss/global.scss40
-rw-r--r--viewer/src/assets/scss/scrollbar.scss39
-rw-r--r--viewer/src/assets/scss/theme.scss6
-rw-r--r--viewer/src/assets/scss/transition.scss32
-rw-r--r--viewer/src/components/LdBreadcrumb.vue4
-rw-r--r--viewer/src/components/LdCommand.vue17
-rw-r--r--viewer/src/components/LdCommandSearch.vue4
-rw-r--r--viewer/src/components/LdCommandSort.vue55
-rw-r--r--viewer/src/components/LdError.vue58
-rw-r--r--viewer/src/components/LdGallery.vue16
-rw-r--r--viewer/src/components/LdInformation.vue84
-rw-r--r--viewer/src/components/LdProposition.vue52
-rw-r--r--viewer/src/components/LdTagInput.vue4
-rw-r--r--viewer/src/components/LdThumbnail.vue18
-rw-r--r--viewer/src/components/index.ts17
-rw-r--r--viewer/src/components/item_handlers/LdAudioViewer.vue55
-rw-r--r--viewer/src/components/item_handlers/LdDirectory.vue (renamed from viewer/src/views/GalleryDirectory.vue)13
-rw-r--r--viewer/src/components/item_handlers/LdDownload.vue57
-rw-r--r--viewer/src/components/item_handlers/LdPdfViewer.vue45
-rw-r--r--viewer/src/components/item_handlers/LdPicture.vue (renamed from viewer/src/components/LdPicture.vue)20
-rw-r--r--viewer/src/components/item_handlers/LdPlainTextViewer.vue55
-rw-r--r--viewer/src/components/item_handlers/LdVideoViewer.vue47
-rw-r--r--viewer/src/locales/en.json31
-rw-r--r--viewer/src/main.ts14
-rw-r--r--viewer/src/plugins/buefy.ts6
-rw-r--r--viewer/src/plugins/fontawesome-icons.ts45
-rw-r--r--viewer/src/plugins/fontawesome.ts30
-rw-r--r--viewer/src/plugins/router.ts2
-rw-r--r--viewer/src/services/dragscrollclickfix.ts3
-rw-r--r--viewer/src/services/indexfactory.ts26
-rw-r--r--viewer/src/services/indexsearch.ts7
-rw-r--r--viewer/src/services/itemComparators.ts73
-rw-r--r--viewer/src/services/ldzoom.ts6
-rw-r--r--viewer/src/services/navigation.ts41
-rw-r--r--viewer/src/shims-tsx.d.ts4
-rw-r--r--viewer/src/store/galleryStore.ts36
-rw-r--r--viewer/src/store/index.ts16
-rw-r--r--viewer/src/store/uiStore.ts19
-rw-r--r--viewer/src/views/GalleryNavigation.vue38
-rw-r--r--viewer/src/views/GallerySearch.vue15
-rw-r--r--viewer/src/views/MainLayout.vue30
-rw-r--r--viewer/src/views/PanelLeft.vue34
-rw-r--r--viewer/src/views/PanelTop.vue8
48 files changed, 1077 insertions, 256 deletions
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 @@
1// TODO: Convert all ambiant types related to LdGallery to modules
2
3export enum ItemType {
4 OTHER = "other",
5 PICTURE = "picture",
6 PLAINTEXT = "plaintext",
7 PDF = "pdf",
8 VIDEO = "video",
9 AUDIO = "audio",
10 DIRECTORY = "directory",
11}
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 {
21 INTERSECTION = "", 21 INTERSECTION = "",
22 ADDITION = "+", 22 ADDITION = "+",
23 SUBSTRACTION = "-", 23 SUBSTRACTION = "-",
24}; 24}
diff --git a/viewer/src/@types/gallery.d.ts b/viewer/src/@types/gallery.d.ts
index 066aedf..e9b80e6 100644
--- a/viewer/src/@types/gallery.d.ts
+++ b/viewer/src/@types/gallery.d.ts
@@ -18,57 +18,97 @@
18*/ 18*/
19 19
20declare namespace Gallery { 20declare namespace Gallery {
21 type ItemSortStr = "title_asc" | "date_asc" | "date_desc";
22
21 interface Config { 23 interface Config {
22 galleryRoot: string, 24 galleryRoot: string;
25 galleryIndex?: string;
26 initialItemSort?: ItemSortStr;
27 initialTagDisplayLimit?: number;
23 } 28 }
24 29
25 interface GalleryProperties { 30 interface GalleryProperties {
26 galleryTitle: string, 31 galleryTitle: string;
27 tagCategories: RawTag[] 32 tagCategories: RawTag[];
28 } 33 }
29 interface Index { 34 interface Index {
30 properties: GalleryProperties, 35 properties: GalleryProperties;
31 tree: Directory 36 tree: Directory;
32 } 37 }
33 38
34 interface Other extends Item { 39 interface Other extends Item {
35 properties: OtherProperties, 40 properties: OtherProperties;
36 } 41 }
37 interface Picture extends Item { 42 interface Picture extends Item {
38 properties: PictureProperties, 43 properties: PictureProperties;
44 }
45 interface PlainText extends Item {
46 properties: PlainTextProperties;
47 }
48 interface PDF extends Item {
49 properties: PDFProperties;
50 }
51 interface Video extends Item {
52 properties: VideoProperties;
53 }
54 interface Audio extends Item {
55 properties: AudioProperties;
39 } 56 }
40 interface Directory extends Item { 57 interface Directory extends Item {
41 properties: DirectoryProperties, 58 properties: DirectoryProperties;
42 } 59 }
43 interface Item { 60 interface Item {
44 title: string, 61 title: string;
45 datetime: string, 62 datetime: string;
46 description: string, 63 description: string;
47 tags: RawTag[], 64 tags: RawTag[];
48 path: string, 65 path: string;
49 thumbnail?: Thumbnail 66 thumbnail?: Thumbnail;
50 properties: OtherProperties | PictureProperties | DirectoryProperties, 67 properties:
68 | OtherProperties
69 | PictureProperties
70 | PlainTextProperties
71 | PDFProperties
72 | VideoProperties
73 | AudioProperties
74 | DirectoryProperties;
51 } 75 }
52 interface Resolution { 76 interface Resolution {
53 width: number, 77 width: number;
54 height: number, 78 height: number;
55 } 79 }
56 interface OtherProperties { 80 interface OtherProperties {
57 type: "other", 81 type: import("./ItemType").ItemType.OTHER;
82 resource: string;
58 } 83 }
59 interface PictureProperties { 84 interface PictureProperties {
60 type: "picture", 85 type: import("./ItemType").ItemType.PICTURE;
61 resource: string, 86 resource: string;
62 resolution: Resolution 87 resolution: Resolution;
88 }
89 interface PlainTextProperties {
90 type: import("./ItemType").ItemType.PLAINTEXT;
91 resource: string;
92 }
93 interface PDFProperties {
94 type: import("./ItemType").ItemType.PDF;
95 resource: string;
96 }
97 interface VideoProperties {
98 type: import("./ItemType").ItemType.VIDEO;
99 resource: string;
100 }
101 interface AudioProperties {
102 type: import("./ItemType").ItemType.AUDIO;
103 resource: string;
63 } 104 }
64 interface DirectoryProperties { 105 interface DirectoryProperties {
65 type: "directory", 106 type: import("./ItemType").ItemType.DIRECTORY;
66 items: Item[] 107 items: Item[];
67 } 108 }
68 interface Thumbnail { 109 interface Thumbnail {
69 resource: string, 110 resource: string;
70 resolution: Resolution 111 resolution: Resolution;
71 } 112 }
72 type RawTag = string; 113 type RawTag = string;
73 type ItemType = "other" | "picture" | "directory";
74} 114}
diff --git a/viewer/src/@types/scrollposition.d.ts b/viewer/src/@types/scrollposition.d.ts
index b2147fa..2f17515 100644
--- a/