diff options
Diffstat (limited to 'viewer')
24 files changed, 280 insertions, 281 deletions
diff --git a/viewer/.eslintrc.js b/viewer/.eslintrc.js index 113ff6a..a67de5e 100644 --- a/viewer/.eslintrc.js +++ b/viewer/.eslintrc.js | |||
@@ -15,9 +15,9 @@ module.exports = { | |||
15 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", | 15 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", |
16 | "eol-last": ["warn", "always"], | 16 | "eol-last": ["warn", "always"], |
17 | "object-curly-spacing": ["warn", "always"], | 17 | "object-curly-spacing": ["warn", "always"], |
18 | "indent": ["warn", 2, { "SwitchCase": 1 }], | ||
19 | "quote-props": ["warn", "as-needed"], | 18 | "quote-props": ["warn", "as-needed"], |
20 | "quotes": ["warn", "double"], | 19 | indent: ["warn", 2, { SwitchCase: 1 }], |
20 | quotes: ["warn", "double"], | ||
21 | "vue/attribute-hyphenation": "warn", | 21 | "vue/attribute-hyphenation": "warn", |
22 | "vue/html-closing-bracket-spacing": "warn", | 22 | "vue/html-closing-bracket-spacing": "warn", |
23 | "vue/html-end-tags": "error", | 23 | "vue/html-end-tags": "error", |
diff --git a/viewer/examples/config.json.example b/viewer/examples/config.json.example index 90c5f74..580da8c 100644 --- a/viewer/examples/config.json.example +++ b/viewer/examples/config.json.example | |||
@@ -1,3 +1,3 @@ | |||
1 | { | 1 | { |
2 | "galleryRoot": "gallery/" | 2 | "galleryRoot": "gallery/" |
3 | } \ No newline at end of file | 3 | } |
diff --git a/viewer/examples/manifest.json.example b/viewer/examples/manifest.json.example index 8c43fbb..d07209f 100644 --- a/viewer/examples/manifest.json.example +++ b/viewer/examples/manifest.json.example | |||
@@ -1,13 +1,13 @@ | |||
1 | { | 1 | { |
2 | "short_name": "LdGallery", | 2 | "short_name": "LdGallery", |
3 | "name": "LdGallery", | 3 | "name": "LdGallery", |
4 | "icons": [ | 4 | "icons": [ |
5 | { | 5 | { |
6 | "src": "defaulticon.png", | 6 | "src": "defaulticon.png", |
7 | "type": "image/png", | 7 | "type": "image/png", |
8 | "sizes": "192x192" | 8 | "sizes": "192x192" |
9 | } | 9 | } |
10 | ], | 10 | ], |
11 | "display": "standalone", | 11 | "display": "standalone", |
12 | "_comment": "https://developer.mozilla.org/en-US/docs/Web/Manifest" | 12 | "_comment": "https://developer.mozilla.org/en-US/docs/Web/Manifest" |
13 | } | 13 | } |
diff --git a/viewer/public/index.html b/viewer/public/index.html index 4b7e26d..4f2767c 100644 --- a/viewer/public/index.html +++ b/viewer/public/index.html | |||
@@ -41,4 +41,4 @@ | |||
41 | <!-- built files will be auto injected --> | 41 | <!-- built files will be auto injected --> |
42 | </body> | 42 | </body> |
43 | 43 | ||
44 | </html> \ No newline at end of file | 44 | </html> |
diff --git a/viewer/src/@types/Operation.ts b/viewer/src/@types/Operation.ts index ba31bc0..e7aad27 100644 --- a/viewer/src/@types/Operation.ts +++ b/viewer/src/@types/Operation.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | export enum Operation { | 20 | 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 956ab6b..066aedf 100644 --- a/viewer/src/@types/gallery.d.ts +++ b/viewer/src/@types/gallery.d.ts | |||
@@ -18,57 +18,57 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | declare namespace Gallery { | 20 | declare namespace Gallery { |
21 | interface Config { | 21 | interface Config { |
22 | galleryRoot: string, | 22 | galleryRoot: string, |
23 | } | 23 | } |
24 | 24 | ||
25 | interface GalleryProperties { | 25 | interface GalleryProperties { |
26 | galleryTitle: string, | 26 | galleryTitle: string, |
27 | tagCategories: RawTag[] | 27 | tagCategories: RawTag[] |
28 | } | 28 | } |
29 | interface Index { | 29 | interface Index { |
30 | properties: GalleryProperties, | 30 | properties: GalleryProperties, |
31 | tree: Directory | 31 | tree: Directory |
32 | } | 32 | } |
33 | 33 | ||
34 | interface Other extends Item { | 34 | interface Other extends Item { |
35 | properties: OtherProperties, | 35 | properties: OtherProperties, |
36 | } | 36 | } |
37 | interface Picture extends Item { | 37 | interface Picture extends Item { |
38 | properties: PictureProperties, | 38 | properties: PictureProperties, |
39 | } | 39 | } |
40 | interface Directory extends Item { | 40 | interface Directory extends Item { |
41 | properties: DirectoryProperties, | 41 | properties: DirectoryProperties, |
42 | } | 42 | } |
43 | interface Item { | 43 | interface Item { |
44 | title: string, | 44 | title: string, |
45 | datetime: string, | 45 | datetime: string, |
46 | description: string, | 46 | description: string, |
47 | tags: RawTag[], | 47 | tags: RawTag[], |
48 | path: string, | 48 | path: string, |
49 | thumbnail?: Thumbnail | 49 | thumbnail?: Thumbnail |
50 | properties: OtherProperties | PictureProperties | DirectoryProperties, | 50 | properties: OtherProperties | PictureProperties | DirectoryProperties, |
51 | } | 51 | } |
52 | interface Resolution { | 52 | interface Resolution { |
53 | width: number, | 53 | width: number, |
54 | height: number, | 54 | height: number, |
55 | } | 55 | } |
56 | interface OtherProperties { | 56 | interface OtherProperties { |
57 | type: "other", | 57 | type: "other", |
58 | } | 58 | } |
59 | interface PictureProperties { | 59 | interface PictureProperties { |
60 | type: "picture", | 60 | type: "picture", |
61 | resource: string, | 61 | resource: string, |
62 | resolution: Resolution | 62 | resolution: Resolution |
63 | } | 63 | } |
64 | interface DirectoryProperties { | 64 | interface DirectoryProperties { |
65 | type: "directory", | 65 | type: "directory", |
66 | items: Item[] | 66 | items: Item[] |
67 | } | 67 | } |
68 | interface Thumbnail { | 68 | interface Thumbnail { |
69 | resource: string, | 69 | resource: string, |
70 | resolution: Resolution | 70 | resolution: Resolution |
71 | } | 71 | } |
72 | type RawTag = string; | 72 | type RawTag = string; |
73 | type ItemType = "other" | "picture" | "directory"; | 73 | type ItemType = "other" | "picture" | "directory"; |
74 | } | 74 | } |
diff --git a/viewer/src/@types/tag.d.ts b/viewer/src/@types/tag.d.ts index 8f7e6a9..76f1207 100644 --- a/viewer/src/@types/tag.d.ts +++ b/viewer/src/@types/tag.d.ts | |||
@@ -18,24 +18,24 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | declare namespace Tag { | 20 | declare namespace Tag { |
21 | interface Node { | 21 | interface Node { |
22 | tag: Gallery.RawTag; | 22 | tag: Gallery.RawTag; |
23 | tagfiltered: Gallery.RawTag; | 23 | tagfiltered: Gallery.RawTag; |
24 | rootPart: boolean; | 24 | rootPart: boolean; |
25 | childPart: boolean; | 25 | childPart: boolean; |
26 | items: Gallery.Item[]; | 26 | items: Gallery.Item[]; |
27 | children: Index; | 27 | children: Index; |
28 | } | 28 | } |
29 | interface Search extends Node { | 29 | interface Search extends Node { |
30 | parent?: Node; | 30 | parent?: Node; |
31 | operation: string; // Enum Operation | 31 | operation: string; // Enum Operation |
32 | display: string; | 32 | display: string; |
33 | } | 33 | } |
34 | type SearchByOperation = { [index: string]: Tag.Search[] }; | 34 | type SearchByOperation = { [index: string]: Tag.Search[] }; |
35 | type Index = { [index: string]: Node }; | 35 | type Index = { [index: string]: Node }; |
36 | 36 | ||
37 | interface Category { | 37 | interface Category { |
38 | tag: string; |