aboutsummaryrefslogtreecommitdiff
path: root/viewer/src
diff options
context:
space:
mode:
authorNotkea2020-01-31 18:09:33 +0100
committerGitHub2020-01-31 18:09:33 +0100
commit245fee3fe5abdc6ad14513ef6522446aba4c905a (patch)
tree749ec466c404499f19d571834262b87c14f0d0af /viewer/src
parentd94b987463169b254ab69a79ddb58e5beccb0941 (diff)
parentbe8ec3edaed843f08dac3d2bf2f10f7247ef3d3a (diff)
downloadldgallery-245fee3fe5abdc6ad14513ef6522446aba4c905a.tar.gz
Merge pull request #68 from pacien/oz-viewer
Diffstat (limited to 'viewer/src')
-rw-r--r--viewer/src/@types/Operation.ts (renamed from viewer/src/@types/tag/Operation.ts)0
-rw-r--r--viewer/src/@types/gallery.d.ts (renamed from viewer/src/@types/gallery/index.d.ts)0
-rw-r--r--viewer/src/@types/tag.d.ts (renamed from viewer/src/@types/tag/index.d.ts)0
-rw-r--r--viewer/src/assets/scss/global.scss14
-rw-r--r--viewer/src/assets/scss/theme.scss3
-rw-r--r--viewer/src/components/LdBreadcrumb.vue58
-rw-r--r--viewer/src/components/LdCommand.vue74
-rw-r--r--viewer/src/components/LdPicture.vue (renamed from viewer/src/views/GalleryPicture.vue)57
-rw-r--r--viewer/src/components/LdProposition.vue10
-rw-r--r--viewer/src/components/LdTagInput.vue6
-rw-r--r--viewer/src/components/LdThumbnail.vue (renamed from viewer/src/views/GalleryThumbnail.vue)15
-rw-r--r--viewer/src/locales/en.json6
-rw-r--r--viewer/src/plugins/buefy.ts24
-rw-r--r--viewer/src/plugins/fontawesome.ts13
-rw-r--r--viewer/src/plugins/router.ts8
-rw-r--r--viewer/src/store/galleryStore.ts14
-rw-r--r--viewer/src/store/uiStore.ts5
-rw-r--r--viewer/src/tools.ts12
-rw-r--r--viewer/src/views/GalleryDirectory.vue8
-rw-r--r--viewer/src/views/GallerySearch.vue7
-rw-r--r--viewer/src/views/MainGallery.vue10
-rw-r--r--viewer/src/views/MainLayout.vue7
-rw-r--r--viewer/src/views/PanelTop.vue55
23 files changed, 294 insertions, 112 deletions
diff --git a/viewer/src/@types/tag/Operation.ts b/viewer/src/@types/Operation.ts
index f1e7a41..f1e7a41 100644
--- a/viewer/src/@types/tag/Operation.ts
+++ b/viewer/src/@types/Operation.ts
diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery.d.ts
index b112b6d..b112b6d 100644
--- a/viewer/src/@types/gallery/index.d.ts
+++ b/viewer/src/@types/gallery.d.ts
diff --git a/viewer/src/@types/tag/index.d.ts b/viewer/src/@types/tag.d.ts
index 1d5df88..1d5df88 100644
--- a/viewer/src/@types/tag/index.d.ts
+++ b/viewer/src/@types/tag.d.ts
diff --git a/viewer/src/assets/scss/global.scss b/viewer/src/assets/scss/global.scss
index b418911..5de5946 100644
--- a/viewer/src/assets/scss/global.scss
+++ b/viewer/src/assets/scss/global.scss
@@ -96,10 +96,12 @@ img {
96 96
97// === Effect to apply on lazy-image loading 97// === Effect to apply on lazy-image loading
98 98
99.v-lazy-image { 99img {
100 opacity: 0; 100 &.v-lazy-image {
101 transition: opacity 0.4s; 101 opacity: 0;
102} 102 transition: opacity 0.4s;
103.v-lazy-image-loaded { 103 }
104 opacity: 1; 104 &.v-lazy-image-loaded {
105 opacity: 1;
106 }
105} 107}
diff --git a/viewer/src/assets/scss/theme.scss b/viewer/src/assets/scss/theme.scss
index d3aac99..1b474e8 100644
--- a/viewer/src/assets/scss/theme.scss
+++ b/viewer/src/assets/scss/theme.scss
@@ -29,8 +29,11 @@ $panel-left-txtcolor: $panel-top-txtcolor;
29$content-bgcolor: #1e1e1e; 29$content-bgcolor: #1e1e1e;
30$toolbar-color: #d62929; 30$toolbar-color: #d62929;
31$loader-color: #272727; 31$loader-color: #272727;
32
33// Overrides - Buefy
32$link: $panel-top-txtcolor; 34$link: $panel-top-txtcolor;
33$link-hover: lightblue; 35$link-hover: lightblue;
34$disabled-color: rgba($link, 0.3); 36$disabled-color: rgba($link, 0.3);
35$control-radius: 0; 37$control-radius: 0;
36$input-radius: 0; 38$input-radius: 0;
39$loading-background: $panel-top-bgcolor;
diff --git a/viewer/src/components/LdBreadcrumb.vue b/viewer/src/components/LdBreadcrumb.vue
new file mode 100644
index 0000000..8c5b7eb
--- /dev/null
+++ b/viewer/src/components/LdBreadcrumb.vue
@@ -0,0 +1,58 @@
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
20<template>
21 <ul class="ld-breadcrumb">
22 <li v-for="(item,idx) in $galleryStore.currentItemPath" :key="item.path">
23 <router-link :to="item.path">
24 <fa-icon :icon="getIcon(item)" size="lg" />
25 {{item.title}}
26 </router-link>
27 <fa-icon v-if="(idx+1) < $galleryStore.currentItemPath.length" icon="angle-right" />
28 </li>
29 </ul>
30</template>
31
32<script lang="ts">
33import { Component, Vue } from "vue-property-decorator";
34import Tools from "@/tools";
35
36@Component
37export default class LdBreadcrumb extends Vue {
38 getIcon(item: Gallery.Item) {
39 return Tools.getIcon(item);
40 }
41}
42</script>
43
44<style lang="scss">
45.ld-breadcrumb {
46 border-left: 2px solid rgba(white, 0.1);
47 padding-left: 15px;
48 display: flex;
49 list-style: none;
50 margin: 5px;
51 a {
52 margin-right: 5px;
53 }
54 li:not(:first-child) {
55 margin-left: 10px;
56 }
57}
58</style>
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue
new file mode 100644
index 0000000..07cb354
--- /dev/null
+++ b/viewer/src/components/LdCommand.vue
@@ -0,0 +1,74 @@
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
20<template>
21 <div class="flex command-btns">
22 <div class="link" title="$t('title.tags')" @click="$uiStore.toggleFullWidth()">
23 <fa-icon :icon="commandTagsIcon()" size="lg" />
24 </div>
25 <router-link to="/" :class="{'disabled': isRoot()}" title="$t('title.home')">
26 <fa-icon icon="home" size="lg" />
27 </router-link>
28 <div class="link" title="$t('title.back')" @click="$router.go(-1)">
29 <fa-icon icon="arrow-left" size="lg" />
30 </div>
31 <router-link :class="{'disabled': isRoot()}" title="$t('title.parent')" :to="parent()">
32 <fa-icon icon="folder" size="xs" />
33 <fa-icon icon="level-up-alt" size="lg" />
34 </router-link>
35 </div>
36</template>
37
38<script lang="ts">
39import { Component, Vue } from "vue-property-decorator";
40import { RawLocation } from "vue-router";
41
42@Component
43export default class LdCommand extends Vue {
44 commandTagsIcon(): string {
45 return this.$uiStore.fullWidth ? "tags" : "window-close";
46 }
47
48 isRoot(): boolean {
49 return this.$galleryStore.currentItemPath.length <= 1;
50 }
51
52 parent(): RawLocation {
53 if (!this.isRoot()) return this.$galleryStore.currentItemPath[this.$galleryStore.currentItemPath.length - 2];
54 return "";
55 }
56}
57</script>
58
59<style lang="scss">
60@import "@/assets/scss/theme.scss";
61
62.command-btns {
63 justify-content: space-around;
64 vertical-align: middle;
65 align-items: center;
66 width: $layout-left;
67 > * {
68 // Unify the minor size differences between icons
69 width: 26px;
70 height: 26px;
71 margin-top: 2px;
72 }
73}
74</style>
diff --git a/viewer/src/views/GalleryPicture.vue b/viewer/src/components/LdPicture.vue
index 323333a..5425a00 100644
--- a/viewer/src/views/GalleryPicture.vue
+++ b/viewer/src/components/LdPicture.vue
@@ -21,11 +21,17 @@
21 <div 21 <div
22 v-dragscroll 22 v-dragscroll
23 class="scrollbar" 23 class="scrollbar"
24 :class="{fitToScreen: !$uiStore.fullscreen, originalSize: $uiStore.fullscreen}" 24 :class="{'fit-to-screen': !$uiStore.fullscreen, 'original-size': $uiStore.fullscreen}"
25 @click="onClick" 25 @click="onClick"
26 @dragscrollstart="dragging=true"