aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/plugins
diff options
context:
space:
mode:
authorpacien2020-05-02 04:11:24 +0200
committerpacien2020-05-02 04:11:24 +0200
commit8e3ac8fe44bebb38e1882ca7f06b8100078ad88d (patch)
treea748fa1e639cb3b5e1f24a8150e89dbb28c980cb /viewer/src/plugins
parent7042ffc06326fa8ffe70f5a59747709250166c16 (diff)
parent0e0b5b0ae44da7c1d67983dedd8f8d8d3516236f (diff)
downloadldgallery-8e3ac8fe44bebb38e1882ca7f06b8100078ad88d.tar.gz
Merge branch 'develop': release v1.0v1.0
Diffstat (limited to 'viewer/src/plugins')
-rw-r--r--viewer/src/plugins/buefy.ts24
-rw-r--r--viewer/src/plugins/dragscroll.ts23
-rw-r--r--viewer/src/plugins/fontawesome.ts43
-rw-r--r--viewer/src/plugins/lazyimage.ts23
-rw-r--r--viewer/src/plugins/router.ts42
5 files changed, 135 insertions, 20 deletions
diff --git a/viewer/src/plugins/buefy.ts b/viewer/src/plugins/buefy.ts
index 9fa73b6..0f8e16b 100644
--- a/viewer/src/plugins/buefy.ts
+++ b/viewer/src/plugins/buefy.ts
@@ -19,10 +19,24 @@
19 19
20import Vue from "vue"; 20import Vue from "vue";
21 21
22import Buefy from "buefy"; 22// @ts-ignore
23import Taginput from "buefy/src/components/taginput";
24// @ts-ignore
25import Loading from "buefy/src/components/loading";
26// @ts-ignore
27import Button from "buefy/src/components/button";
28// @ts-ignore
29import SnackBar from "buefy/src/components/snackbar";
30
23import "@/assets/scss/buefy.scss"; 31import "@/assets/scss/buefy.scss";
24 32
25Vue.use(Buefy, { 33Vue.use(Taginput);
26 defaultIconComponent: 'fa-icon', 34Vue.use(Loading);
27 defaultIconPack: 'fas', 35Vue.use(Button);
28}); 36Vue.use(SnackBar);
37
38declare module "vue/types/vue" {
39 interface Vue {
40 $buefy: any;
41 }
42}
diff --git a/viewer/src/plugins/dragscroll.ts b/viewer/src/plugins/dragscroll.ts
new file mode 100644
index 0000000..a10b0fd
--- /dev/null
+++ b/viewer/src/plugins/dragscroll.ts
@@ -0,0 +1,23 @@
1/* ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery.
3--
4-- Copyright (C) 2019-2020 Guillaume FOUET
5--
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
8-- published by the Free Software Foundation, either version 3 of the
9-- License, or (at your option) any later version.
10--
11-- This program is distributed in the hope that it will be useful,
12-- but WITHOUT ANY WARRANTY; without even the implied warranty of
13-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-- GNU Affero General Public License for more details.
15--
16-- You should have received a copy of the GNU Affero General Public License
17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20import Vue from "vue";
21import VueDragscroll from "vue-dragscroll";
22
23Vue.use(VueDragscroll);
diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts
index 7fb08a3..480e8e0 100644
--- a/viewer/src/plugins/fontawesome.ts
+++ b/viewer/src/plugins/fontawesome.ts
@@ -19,26 +19,39 @@
19 19
20import Vue from "vue"; 20import Vue from "vue";
21 21
22import { library } from "@fortawesome/fontawesome-svg-core"; 22import { library, config } from "@fortawesome/fontawesome-svg-core";
23import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; 23import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
24import { 24import {
25 faExpandArrowsAlt, 25 faFolder,
26 faFolder, 26 faEraser,
27 faSearch, 27 faSearch,
28 faTag, 28 faPlus,
29 faPlus, 29 faMinus,
30 faMinus, 30 faImage,
31 faImage, 31 faHome,
32 faArrowLeft,
33 faLevelUpAlt,
34 faAngleRight,
35 faAngleDoubleLeft,
36 faFile,
32} from "@fortawesome/free-solid-svg-icons"; 37} from "@fortawesome/free-solid-svg-icons";
33 38
34library.add( 39library.add(
35 faExpandArrowsAlt, 40 faFolder,
36 faFolder, 41 faEraser,
37 faSearch, 42 faSearch,
38 faTag, 43 faPlus,
39 faPlus, 44 faMinus,
40 faMinus, 45 faImage,
41 faImage, 46 faHome,
47 faArrowLeft,
48 faLevelUpAlt,
49 faAngleRight,
50 faAngleDoubleLeft,
51 faFile,
42); 52);
43 53
54config.autoAddCss = false;
55import "@fortawesome/fontawesome-svg-core/styles.css";
56
44Vue.component("fa-icon", FontAwesomeIcon); 57Vue.component("fa-icon", FontAwesomeIcon);
diff --git a/viewer/src/plugins/lazyimage.ts b/viewer/src/plugins/lazyimage.ts
new file mode 100644
index 0000000..276c7e2
--- /dev/null
+++ b/viewer/src/plugins/lazyimage.ts
@@ -0,0 +1,23 @@
1/* ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery.
3--
4-- Copyright (C) 2019-2020 Guillaume FOUET
5--
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
8-- published by the Free Software Foundation, either version 3 of the
9-- License, or (at your option) any later version.
10--
11-- This program is distributed in the hope that it will be useful,
12-- but WITHOUT ANY WARRANTY; without even the implied warranty of
13-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-- GNU Affero General Public License for more details.
15--
16-- You should have received a copy of the GNU Affero General Public License
17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20import Vue from "vue";
21import { VLazyImagePlugin } from "v-lazy-image";
22
23Vue.use(VLazyImagePlugin);
diff --git a/viewer/src/plugins/router.ts b/viewer/src/plugins/router.ts
new file mode 100644
index 0000000..00979c9
--- /dev/null
+++ b/viewer/src/plugins/router.ts
@@ -0,0 +1,42 @@
1/* ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery.
3--
4-- Copyright (C) 2019-2020 Guillaume FOUET
5--
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
8-- published by the Free Software Foundation, either version 3 of the
9-- License, or (at your option) any later version.
10--
11-- This program is distributed in the hope that it will be useful,
12-- but WITHOUT ANY WARRANTY; without even the implied warranty of
13-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-- GNU Affero General Public License for more details.
15--
16-- You should have received a copy of the GNU Affero General Public License
17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/
19
20import Vue from "vue";
21import VueRouter, { RouteConfig } from "vue-router";
22import GalleryNavigation from "@/views/GalleryNavigation.vue";
23
24Vue.use(VueRouter);
25
26const routes: RouteConfig[] = [
27 {
28 path: "*",
29 name: "GalleryNavigation",
30 component: GalleryNavigation,
31 props: (route) => ({
32 path: route.params.pathMatch,
33 query: Object.keys(route.query),
34 }),
35 },
36];
37
38const router = new VueRouter({
39 routes,
40});
41
42export default router;