diff options
author | Zéro~Informatique | 2022-07-26 08:44:34 +0200 |
---|---|---|
committer | pacien | 2022-09-03 01:30:42 +0200 |
commit | 00510820a2794efcadbc83f7f8b54318fe198ecb (patch) | |
tree | a894d99c22a601197869c7a6928d40bb4ae2c392 /viewer/src/plugins/router.ts | |
parent | 88aa098c07e067f9f737fbeba1f52a9bd5042e53 (diff) | |
download | ldgallery-00510820a2794efcadbc83f7f8b54318fe198ecb.tar.gz |
viewer: migrate to vue 3, general refactoring and cleanup
Non-exhaustive list of fixes and improvements done at the same time:
- html default background to grey (avoids white flash during init)
- unified links behavior
- added more theme variables
- removed the flex-expand transition (it wasn't working) and replaced it
with a slide
- fixed LdLoading not centered on the content
- title on removable tags
- fixed an issue with encoded URI from vue-router
- unified Item resource URLs
- removed the iframe for PlainTextViewer (it wasn't working properly)
and replaced it with a pre
- fixed clear and search buttons tabindex
- fixed the information panel bumping up during the fade animation of
tag's dropdown
- fixed some focus outlines not appearing correctly
- moved CSS variables to the :root context
- Code cleaning
GitHub: closes #217
GitHub: closes #300
GitHub: closes #297
GitHub: closes #105
GitHub: closes #267
GitHub: closes #275
GitHub: closes #228
GitHub: closes #215
GitHub: closes #112
Diffstat (limited to 'viewer/src/plugins/router.ts')
-rw-r--r-- | viewer/src/plugins/router.ts | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/viewer/src/plugins/router.ts b/viewer/src/plugins/router.ts index 03ca021..8568173 100644 --- a/viewer/src/plugins/router.ts +++ b/viewer/src/plugins/router.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | /* ldgallery - A static generator which turns a collection of tagged | 1 | /* ldgallery - A static generator which turns a collection of tagged |
2 | -- pictures into a searchable web gallery. | 2 | -- pictures into a searchable web gallery. |
3 | -- | 3 | -- |
4 | -- Copyright (C) 2019-2020 Guillaume FOUET | 4 | -- Copyright (C) 2019-2022 Guillaume FOUET |
5 | -- | 5 | -- |
6 | -- This program is free software: you can redistribute it and/or modify | 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 | 7 | -- it under the terms of the GNU Affero General Public License as |
@@ -17,26 +17,22 @@ | |||
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 | ||
20 | import Vue from "vue"; | 20 | import GalleryNavigation from '@/views/GalleryNavigation.vue'; |
21 | import VueRouter, { RouteConfig } from "vue-router"; | 21 | import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'; |
22 | import GalleryNavigation from "@/views/GalleryNavigation.vue"; | ||
23 | 22 | ||
24 | Vue.use(VueRouter); | 23 | const routes: Array<RouteRecordRaw> = [ |
25 | |||
26 | const routes: RouteConfig[] = [ | ||
27 | { | 24 | { |
28 | path: "*", | 25 | path: '/:catchAll(.*)', |
29 | name: "GalleryNavigation", | 26 | name: 'GalleryNavigation', |
30 | component: GalleryNavigation, | 27 | component: GalleryNavigation, |
31 | props: route => ({ | 28 | props: route => ({ |
32 | path: route.params.pathMatch, | 29 | path: decodeURIComponent(route.path), |
33 | query: Object.keys(route.query), | 30 | query: Object.keys(route.query), |
34 | }), | 31 | }), |
35 | }, | 32 | }, |
36 | ]; | 33 | ]; |
37 | 34 | ||
38 | const router = new VueRouter({ | 35 | export default createRouter({ |
36 | history: createWebHashHistory(), | ||
39 | routes, | 37 | routes, |
40 | }); | 38 | }); |
41 | |||
42 | export default router; | ||