From 8d543ab94d3678728466d3627e0d419ec00f3010 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Wed, 29 Jan 2020 04:53:35 +0100 Subject: viewer: finalized the thumbnails view layouts. implemented thumbnails lazy-loading --- viewer/src/plugins/lazyimage.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 viewer/src/plugins/lazyimage.ts (limited to 'viewer/src/plugins') 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 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + +import Vue from "vue"; +import { VLazyImagePlugin } from "v-lazy-image"; + +Vue.use(VLazyImagePlugin); -- cgit v1.2.3 From e91065602eeeebef236dae29e67d8e3334ab4029 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Wed, 29 Jan 2020 07:54:03 +0100 Subject: viewer: improved the picture layout. clicking a picture will switch between resized-to-screen and original-size (+fullscreen). drag-n-drop scrolls/moves the picture, just like a touch device. Resolves #19 --- viewer/src/plugins/dragscroll.ts | 24 ++++++++++++++++++++++++ viewer/src/plugins/fontawesome.ts | 2 -- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 viewer/src/plugins/dragscroll.ts (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/dragscroll.ts b/viewer/src/plugins/dragscroll.ts new file mode 100644 index 0000000..f6d88bb --- /dev/null +++ b/viewer/src/plugins/dragscroll.ts @@ -0,0 +1,24 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + +import Vue from "vue"; +import VueDragscroll from 'vue-dragscroll'; + +Vue.use(VueDragscroll); + diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index 7fb08a3..bb77c01 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -22,7 +22,6 @@ import Vue from "vue"; import { library } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { - faExpandArrowsAlt, faFolder, faSearch, faTag, @@ -32,7 +31,6 @@ import { } from "@fortawesome/free-solid-svg-icons"; library.add( - faExpandArrowsAlt, faFolder, faSearch, faTag, -- cgit v1.2.3 From 42105af46681d81959a5d5a9a16ec9e98463a92e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 30 Jan 2020 21:24:15 +0100 Subject: viewer: new breadcrumb. navigation buttons. and styling improvements --- viewer/src/plugins/fontawesome.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index bb77c01..c17d4a1 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -28,6 +28,10 @@ import { faPlus, faMinus, faImage, + faHome, + faArrowLeft, + faFilter, + faAngleRight, } from "@fortawesome/free-solid-svg-icons"; library.add( @@ -37,6 +41,10 @@ library.add( faPlus, faMinus, faImage, + faHome, + faArrowLeft, + faFilter, + faAngleRight, ); Vue.component("fa-icon", FontAwesomeIcon); -- cgit v1.2.3 From 17b1598c5a5a375e6eaa0763767368c05ba0f56e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 30 Jan 2020 22:58:27 +0100 Subject: viewer: Improved the proposition layout --- viewer/src/plugins/fontawesome.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index c17d4a1..bf2ff5f 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -30,7 +30,7 @@ import { faImage, faHome, faArrowLeft, - faFilter, + faTags, faAngleRight, } from "@fortawesome/free-solid-svg-icons"; @@ -43,7 +43,7 @@ library.add( faImage, faHome, faArrowLeft, - faFilter, + faTags, faAngleRight, ); -- cgit v1.2.3 From 293c2803794a5cc4f9a045d48ff28ae99beaa030 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 00:37:55 +0100 Subject: viewer: moved router.ts to the plugins directory for simplicity --- viewer/src/plugins/router.ts | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 viewer/src/plugins/router.ts (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/router.ts b/viewer/src/plugins/router.ts new file mode 100644 index 0000000..0f3d2c7 --- /dev/null +++ b/viewer/src/plugins/router.ts @@ -0,0 +1,41 @@ +/* ldgallery - A static generator which turns a collection of tagged +-- pictures into a searchable web gallery. +-- +-- Copyright (C) 2019-2020 Guillaume FOUET +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see . +*/ + +import Vue from "vue"; +import VueRouter from "vue-router"; +import Gallery from "@/views/MainGallery.vue"; + +Vue.use(VueRouter); + +// async way : component: () => import(/* webpackChunkName: "Gallery" */ "@/views/Gallery.vue"), + +const routes = [ + { + path: "*", + name: "Gallery", + component: Gallery, + props: true + }, +]; + +const router = new VueRouter({ + routes, +}); + +export default router; -- cgit v1.2.3 From 252dd6fc6f53ecd8b28e05a0514429472d53d08e Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 06:46:31 +0100 Subject: viewer: finalized the command buttons. added the 'up to parent' command --- viewer/src/plugins/fontawesome.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index bf2ff5f..fdbfcdb 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -24,27 +24,29 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { faFolder, faSearch, - faTag, faPlus, faMinus, faImage, faHome, faArrowLeft, + faLevelUpAlt, faTags, faAngleRight, + faWindowClose, } from "@fortawesome/free-solid-svg-icons"; library.add( faFolder, faSearch, - faTag, faPlus, faMinus, faImage, faHome, faArrowLeft, + faLevelUpAlt, faTags, faAngleRight, + faWindowClose, ); Vue.component("fa-icon", FontAwesomeIcon); -- cgit v1.2.3 From 1e0b65a0a4556810ad4a7acac764a57a7daf8cf0 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 07:10:34 +0100 Subject: viewer: minor code cleaning --- viewer/src/plugins/router.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/router.ts b/viewer/src/plugins/router.ts index 0f3d2c7..8b4a8dc 100644 --- a/viewer/src/plugins/router.ts +++ b/viewer/src/plugins/router.ts @@ -19,17 +19,17 @@ import Vue from "vue"; import VueRouter from "vue-router"; -import Gallery from "@/views/MainGallery.vue"; +import MainGallery from "@/views/MainGallery.vue"; Vue.use(VueRouter); -// async way : component: () => import(/* webpackChunkName: "Gallery" */ "@/views/Gallery.vue"), +// async way : component: () => import(/* webpackChunkName: "MainGallery" */ "@/views/MainGallery.vue"), const routes = [ { path: "*", - name: "Gallery", - component: Gallery, + name: "MainGallery", + component: MainGallery, props: true }, ]; -- cgit v1.2.3 From 63e7ef894755deef318d9dcb129a94d34f33bdf2 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 07:59:58 +0100 Subject: viewer: unknown types now show a question mark icon instead of a folder icon. this is unified with the breadcrumb --- viewer/src/plugins/fontawesome.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index fdbfcdb..460e407 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -33,6 +33,7 @@ import { faTags, faAngleRight, faWindowClose, + faQuestionCircle, } from "@fortawesome/free-solid-svg-icons"; library.add( @@ -47,6 +48,7 @@ library.add( faTags, faAngleRight, faWindowClose, + faQuestionCircle, ); Vue.component("fa-icon", FontAwesomeIcon); -- cgit v1.2.3 From b049f1abd6d00b76afae76d6dc212be213b26c68 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 10:48:21 +0100 Subject: viewer: buefy optimization (importing only used components) --- viewer/src/plugins/buefy.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/buefy.ts b/viewer/src/plugins/buefy.ts index 9fa73b6..fbffd55 100644 --- a/viewer/src/plugins/buefy.ts +++ b/viewer/src/plugins/buefy.ts @@ -19,10 +19,24 @@ import Vue from "vue"; -import Buefy from "buefy"; +// @ts-ignore +import Taginput from 'buefy/src/components/taginput'; +// @ts-ignore +import Loading from 'buefy/src/components/loading'; +// @ts-ignore +import Radio from 'buefy/src/components/radio'; +// @ts-ignore +import SnackBar from 'buefy/src/components/snackbar'; + import "@/assets/scss/buefy.scss"; -Vue.use(Buefy, { - defaultIconComponent: 'fa-icon', - defaultIconPack: 'fas', -}); +Vue.use(Taginput); +Vue.use(Loading); +Vue.use(Radio); +Vue.use(SnackBar); + +declare module 'vue/types/vue' { + interface Vue { + $buefy: any; + } +} \ No newline at end of file -- cgit v1.2.3 From be8ec3edaed843f08dac3d2bf2f10f7247ef3d3a Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 31 Jan 2020 15:06:44 +0100 Subject: viewer: fixed a CSP issue with inlined SVG CSS; FontAwesome CSS is now external --- viewer/src/plugins/fontawesome.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index 460e407..a15f4ce 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -19,7 +19,7 @@ import Vue from "vue"; -import { library } from "@fortawesome/fontawesome-svg-core"; +import { library, config } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { faFolder, @@ -51,4 +51,7 @@ library.add( faQuestionCircle, ); +config.autoAddCss = false; +import "@fortawesome/fontawesome-svg-core/styles.css"; + Vue.component("fa-icon", FontAwesomeIcon); -- cgit v1.2.3 From 3ed40acc6a788f4229a7ceab712068ec970e81cd Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Sun, 2 Feb 2020 05:13:35 +0100 Subject: viewer: file icon instead of question mark icon for unknown files --- viewer/src/plugins/fontawesome.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index a15f4ce..d70746d 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -33,7 +33,7 @@ import { faTags, faAngleRight, faWindowClose, - faQuestionCircle, + faFile, } from "@fortawesome/free-solid-svg-icons"; library.add( @@ -48,7 +48,7 @@ library.add( faTags, faAngleRight, faWindowClose, - faQuestionCircle, + faFile, ); config.autoAddCss = false; -- cgit v1.2.3 From 1942eb9e6d323aca512e53732179c823139dd9a1 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 8 Feb 2020 18:20:50 +0100 Subject: viewer: ldcommand: clarify command button actions By using more explicit icons and tooltip. --- viewer/src/plugins/fontawesome.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index d70746d..e8848f9 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -30,9 +30,8 @@ import { faHome, faArrowLeft, faLevelUpAlt, - faTags, faAngleRight, - faWindowClose, + faAngleDoubleLeft, faFile, } from "@fortawesome/free-solid-svg-icons"; @@ -45,9 +44,8 @@ library.add( faHome, faArrowLeft, faLevelUpAlt, - faTags, faAngleRight, - faWindowClose, + faAngleDoubleLeft, faFile, ); -- cgit v1.2.3 From af4660b4c4fea455dfffbf2d966bae425ed6effb Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Wed, 12 Feb 2020 21:25:07 +0100 Subject: viewer: project configuration - eof-last enforced --- viewer/src/plugins/buefy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/buefy.ts b/viewer/src/plugins/buefy.ts index fbffd55..74b6176 100644 --- a/viewer/src/plugins/buefy.ts +++ b/viewer/src/plugins/buefy.ts @@ -39,4 +39,4 @@ declare module 'vue/types/vue' { interface Vue { $buefy: any; } -} \ No newline at end of file +} -- cgit v1.2.3 From 370e3db3455f548699ff5e046e0f8dcc304991ac Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 14 Feb 2020 09:19:53 +0100 Subject: viewer: major code and search mode overhaul Updated libraries to the lastest version SCSS Formatter as suggested VSC extensions Renamed toolbar-color by scrollbar-color LD components use Props in favor of touching the stores directly (when possible) Moved most common algorithms to a "services" folder Complete search overhaul (lots of code change) --- viewer/src/plugins/buefy.ts | 4 ++-- viewer/src/plugins/fontawesome.ts | 2 ++ viewer/src/plugins/router.ts | 17 +++++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/buefy.ts b/viewer/src/plugins/buefy.ts index 74b6176..ebdf64e 100644 --- a/viewer/src/plugins/buefy.ts +++ b/viewer/src/plugins/buefy.ts @@ -24,7 +24,7 @@ import Taginput from 'buefy/src/components/taginput'; // @ts-ignore import Loading from 'buefy/src/components/loading'; // @ts-ignore -import Radio from 'buefy/src/components/radio'; +import Button from 'buefy/src/components/button'; // @ts-ignore import SnackBar from 'buefy/src/components/snackbar'; @@ -32,7 +32,7 @@ import "@/assets/scss/buefy.scss"; Vue.use(Taginput); Vue.use(Loading); -Vue.use(Radio); +Vue.use(Button); Vue.use(SnackBar); declare module 'vue/types/vue' { diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index e8848f9..cc8b7ab 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -23,6 +23,7 @@ import { library, config } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { faFolder, + faEraser, faSearch, faPlus, faMinus, @@ -37,6 +38,7 @@ import { library.add( faFolder, + faEraser, faSearch, faPlus, faMinus, diff --git a/viewer/src/plugins/router.ts b/viewer/src/plugins/router.ts index 8b4a8dc..00979c9 100644 --- a/viewer/src/plugins/router.ts +++ b/viewer/src/plugins/router.ts @@ -18,19 +18,20 @@ */ import Vue from "vue"; -import VueRouter from "vue-router"; -import MainGallery from "@/views/MainGallery.vue"; +import VueRouter, { RouteConfig } from "vue-router"; +import GalleryNavigation from "@/views/GalleryNavigation.vue"; Vue.use(VueRouter); -// async way : component: () => import(/* webpackChunkName: "MainGallery" */ "@/views/MainGallery.vue"), - -const routes = [ +const routes: RouteConfig[] = [ { path: "*", - name: "MainGallery", - component: MainGallery, - props: true + name: "GalleryNavigation", + component: GalleryNavigation, + props: (route) => ({ + path: route.params.pathMatch, + query: Object.keys(route.query), + }), }, ]; -- cgit v1.2.3 From ccecfd9421f4550a71134cd46e1388e486f8c564 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 28 Apr 2020 03:47:39 +0200 Subject: viewer: global formatting unification --- viewer/src/plugins/buefy.ts | 16 ++++++------- viewer/src/plugins/dragscroll.ts | 3 +-- viewer/src/plugins/fontawesome.ts | 48 +++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 34 deletions(-) (limited to 'viewer/src/plugins') diff --git a/viewer/src/plugins/buefy.ts b/viewer/src/plugins/buefy.ts index ebdf64e..0f8e16b 100644 --- a/viewer/src/plugins/buefy.ts +++ b/viewer/src/plugins/buefy.ts @@ -20,13 +20,13 @@ import Vue from "vue"; // @ts-ignore -import Taginput from 'buefy/src/components/taginput'; +import Taginput from "buefy/src/components/taginput"; // @ts-ignore -import Loading from 'buefy/src/components/loading'; +import Loading from "buefy/src/components/loading"; // @ts-ignore -import Button from 'buefy/src/components/button'; +import Button from "buefy/src/components/button"; // @ts-ignore -import SnackBar from 'buefy/src/components/snackbar'; +import SnackBar from "buefy/src/components/snackbar"; import "@/assets/scss/buefy.scss"; @@ -35,8 +35,8 @@ Vue.use(Loading); Vue.use(Button); Vue.use(SnackBar); -declare module 'vue/types/vue' { - interface Vue { - $buefy: any; - } +declare module "vue/types/vue" { + interface Vue { + $buefy: any; + } } diff --git a/viewer/src/plugins/dragscroll.ts b/viewer/src/plugins/dragscroll.ts index f6d88bb..a10b0fd 100644 --- a/viewer/src/plugins/dragscroll.ts +++ b/viewer/src/plugins/dragscroll.ts @@ -18,7 +18,6 @@ */ import Vue from "vue"; -import VueDragscroll from 'vue-dragscroll'; +import VueDragscroll from "vue-dragscroll"; Vue.use(VueDragscroll); - diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts index cc8b7ab..480e8e0 100644 --- a/viewer/src/plugins/fontawesome.ts +++ b/viewer/src/plugins/fontawesome.ts @@ -22,33 +22,33 @@ import Vue from "vue"; import { library, config } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { - faFolder, - faEraser, - faSearch, - faPlus, - faMinus, - faImage, - faHome, - faArrowLeft, - faLevelUpAlt, - faAngleRight, - faAngleDoubleLeft, - faFile, + faFolder, + faEraser, + faSearch, + faPlus, + faMinus, + faImage, + faHome, + faArrowLeft, + faLevelUpAlt, + faAngleRight, + faAngleDoubleLeft, + faFile, } from "@fortawesome/free-solid-svg-icons"; library.add( - faFolder, - faEraser, - faSearch, - faPlus, - faMinus, - faImage, - faHome, - faArrowLeft, - faLevelUpAlt, - faAngleRight, - faAngleDoubleLeft, - faFile, + faFolder, + faEraser, + faSearch, + faPlus, + faMinus, + faImage, + faHome, + faArrowLeft, + faLevelUpAlt, + faAngleRight, + faAngleDoubleLeft, + faFile, ); config.autoAddCss = false; -- cgit v1.2.3