aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZero~Informatique2020-04-28 03:47:39 +0200
committerZero~Informatique2020-04-28 03:47:50 +0200
commitccecfd9421f4550a71134cd46e1388e486f8c564 (patch)
tree9711ed24320150d24d85a124de3fd6177052eeb0
parent113bff3c4dcc1976f24df16d4224e1871e665ae0 (diff)
downloadldgallery-ccecfd9421f4550a71134cd46e1388e486f8c564.tar.gz
viewer: global formatting unification
-rw-r--r--viewer/.eslintrc.js4
-rw-r--r--viewer/examples/config.json.example4
-rw-r--r--viewer/examples/manifest.json.example22
-rw-r--r--viewer/public/index.html2
-rw-r--r--viewer/src/@types/Operation.ts6
-rw-r--r--viewer/src/@types/gallery.d.ts102
-rw-r--r--viewer/src/@types/tag.d.ts38
-rw-r--r--viewer/src/@types/v-lazy-image.d.ts2
-rw-r--r--viewer/src/@types/vue-dragscroll.d.ts2
-rw-r--r--viewer/src/assets/scss/buefy.scss6
-rw-r--r--viewer/src/assets/scss/palette.scss20
-rw-r--r--viewer/src/components/index.ts30
-rw-r--r--viewer/src/locales/en.json2
-rw-r--r--viewer/src/main.ts2
-rw-r--r--viewer/src/plugins/buefy.ts16
-rw-r--r--viewer/src/plugins/dragscroll.ts3
-rw-r--r--viewer/src/plugins/fontawesome.ts48
-rw-r--r--viewer/src/services/indexfactory.ts6
-rw-r--r--viewer/src/services/indexsearch.ts2
-rw-r--r--viewer/src/services/ldzoom.ts10
-rw-r--r--viewer/src/shims-tsx.d.ts4
-rw-r--r--viewer/src/store/galleryStore.ts190
-rw-r--r--viewer/src/store/index.ts10
-rw-r--r--viewer/src/store/uiStore.ts30
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
20export enum Operation { 20export 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
20declare namespace Gallery { 20declare 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
20declare namespace Tag { 20declare 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; 38 tag: string;
39 index: Index; 39 index: Index;
40 } 40 }
41} 41}