aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'viewer')
-rw-r--r--viewer/.browserslistrc7
-rw-r--r--viewer/.prettierrc.js1
-rw-r--r--viewer/ldgallery-viewer.7.md47
-rw-r--r--viewer/package-lock.json14182
-rw-r--r--viewer/package.json62
-rw-r--r--viewer/public/index.html2
-rw-r--r--viewer/readme.md19
-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
-rw-r--r--viewer/yarn.lock9737
52 files changed, 10508 insertions, 14562 deletions
diff --git a/viewer/.browserslistrc b/viewer/.browserslistrc
index d6471a3..d9789a7 100644
--- a/viewer/.browserslistrc
+++ b/viewer/.browserslistrc
@@ -1,2 +1,5 @@
1> 1% 1# Polyfills for ES2020+
2last 2 versions 2
3chrome > 78
4firefox > 72
5edge > 78
diff --git a/viewer/.prettierrc.js b/viewer/.prettierrc.js
index ee0cb9b..36c85bc 100644
--- a/viewer/.prettierrc.js
+++ b/viewer/.prettierrc.js
@@ -6,4 +6,5 @@ module.exports = {
6 printWidth: 120, 6 printWidth: 120,
7 bracketSpacing: true, 7 bracketSpacing: true,
8 arrowParens: "avoid", 8 arrowParens: "avoid",
9 endOfLine: "auto",
9}; 10};
diff --git a/viewer/ldgallery-viewer.7.md b/viewer/ldgallery-viewer.7.md
index 96070dc..1e914ff 100644
--- a/viewer/ldgallery-viewer.7.md
+++ b/viewer/ldgallery-viewer.7.md
@@ -92,11 +92,58 @@ initialTagDisplayLimit
92 Set to -1 to disable the limit on suggestions. 92 Set to -1 to disable the limit on suggestions.
93 Defaults to 10. 93 Defaults to 10.
94 94
95splashScreen
96: Displays an information notice before opening the gallery (see below).
97
95An alternative viewer configuration file located in the viewer's directory can be loaded by specifying its name, 98An alternative viewer configuration file located in the viewer's directory can be loaded by specifying its name,
96without the ".json" extension, as a query parameter given before the page anchor; 99without the ".json" extension, as a query parameter given before the page anchor;
97for example, some alternative configuration named "config_2.json" can be loaded with "http://gallery/?config_2#". 100for example, some alternative configuration named "config_2.json" can be loaded with "http://gallery/?config_2#".
98 101
99 102
103# SPLASH SCREEN CONFIGURATION
104
105splashScreen.resource
106: Absolute or relative path to the information notice. The user is prompted to explicitly acknowledge such notice before being allowed to browse the gallery.
107 Rich text formatting is possible through the use of the [GitHub Flavoured Markdown syntax][GFM].
108 Inline HTML and CSS are also supported.
109 [GFM]: https://github.github.com/gfm/
110
111splashScreen.acknowledgmentKey
112: Optional key; when set to an arbitrary string, the information notice will appear only the first time it is proposed to the user. Once the notice acknowledged, the key is saved to the device's local storage. To display the notice again, change this key to another value.
113 When left empty, the notice will appear every time.
114
115splashScreen.buttonAcknowledgeLabel
116: Optional label for the acknowledge button shown below the notice.
117 *Defaults to "Acknowledge"*
118
119splashScreen.style
120: Optional CSS attributes for the information notice's container.
121 String or JSON formats are supported.
122
123
124# CONFIGURATION EXAMPLE
125
126Viewer __config.json__:
127
128```json
129{
130 "galleryRoot": "./gallery/",
131 "galleryIndex": "index.json",
132 "initialItemSort": "date_desc",
133 "initialTagDisplayLimit": 10,
134 "splashScreen": {
135 "resource": "./splashscreen.md",
136 "acknowledgmentKey": "v001",
137 "buttonAcknowledgeLabel": "I agree",
138 "style": {
139 "max-width": "45em",
140 "font-size": "20px",
141 "padding-top": "20vh"
142 }
143 }
144}
145```
146
100# PROGRESSIVE WEB APPLICATION 147# PROGRESSIVE WEB APPLICATION
101 148
102This web application can be "installed" on some user's mobile device as a progressive web application, i.e. a shortcut giving the web page the appearance of a native application. 149This web application can be "installed" on some user's mobile device as a progressive web application, i.e. a shortcut giving the web page the appearance of a native application.
diff --git a/viewer/package-lock.json b/viewer/package-lock.json
deleted file mode 100644
index 4785b3e..0000000
--- a/viewer/package-lock.json
+++ /dev/null
@@ -1,14182 +0,0 @@
1{
2 "name": "ldgallery-viewer",
3 "version": "2.0.0",
4 "lockfileVersion": 1,
5 "requires": true,
6 "dependencies": {
7 "@babel/code-frame": {
8 "version": "7.5.5",
9 "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
10 "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
11 "dev": true,
12 "requires": {
13 "@babel/highlight": "^7.0.0"
14 }
15 },
16 "@babel/compat-data": {
17 "version": "7.10.3",
18 "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.3.tgz",
19 "integrity": "sha512-BDIfJ9uNZuI0LajPfoYV28lX8kyCPMHY6uY4WH1lJdcicmAfxCK5ASzaeV0D/wsUaRH/cLk+amuxtC37sZ8TUg==",
20 "dev": true,
21 "requires": {
22 "browserslist": "^4.12.0",
23 "invariant": "^2.2.4",
24 "semver": "^5.5.0"
25 },
26 "dependencies": {
27 "browserslist": {
28 "version": "4.12.2",
29 "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.2.tgz",
30 "integrity": "sha512-MfZaeYqR8StRZdstAK9hCKDd2StvePCYp5rHzQCPicUjfFliDgmuaBNPHYUTpAywBN8+Wc/d7NYVFkO0aqaBUw==",
31 "dev": true,
32 "requires": {
33 "caniuse-lite": "^1.0.30001088",
34 "electron-to-chromium": "^1.3.483",
35 "escalade": "^3.0.1",
36 "node-releases": "^1.1.58"
37 }
38 },
39 "caniuse-lite": {
40 "version": "1.0.30001090",
41 "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001090.tgz",
42 "integrity": "sha512-QzPRKDCyp7RhjczTPZaqK3CjPA5Ht2UnXhZhCI4f7QiB5JK6KEuZBxIzyWnB3wO4hgAj4GMRxAhuiacfw0Psjg==",
43 "dev": true
44 },
45 "electron-to-chromium": {
46 "version": "1.3.483",
47 "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.483.tgz",
48 "integrity": "sha512-+05RF8S9rk8S0G8eBCqBRBaRq7+UN3lDs2DAvnG8SBSgQO3hjy0+qt4CmRk5eiuGbTcaicgXfPmBi31a+BD3lg==",
49 "dev": true
50 },
51 "node-releases": {
52 "version": "1.1.58",
53 "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz",