diff options
author | OzoneGrif | 2020-02-24 01:15:14 +0100 |
---|---|---|
committer | GitHub | 2020-02-24 01:15:14 +0100 |
commit | 2a458e25c0510798120dddbd85cef5ee440c2a2a (patch) | |
tree | 77d6958950e1c6a2ad425da1c095fefce58b05e4 /viewer/src | |
parent | e42f4e864bac21ed3b19d1869df2cdd4f8c3433c (diff) | |
parent | eb00c2a7874608f70ec7768eae8d006a22bc0a54 (diff) | |
download | ldgallery-2a458e25c0510798120dddbd85cef5ee440c2a2a.tar.gz |
Merge pull request #144 from pacien/oz-search-overhaul
viewer: major code and search mode overhaul
> Search indicator in the breadcrumbs: should be shown as clickable instead of being .disabled
Not agreeing with this one.
Diffstat (limited to 'viewer/src')
26 files changed, 437 insertions, 285 deletions
diff --git a/viewer/src/assets/scss/global.scss b/viewer/src/assets/scss/global.scss index ed69841..ea25513 100644 --- a/viewer/src/assets/scss/global.scss +++ b/viewer/src/assets/scss/global.scss | |||
@@ -27,6 +27,10 @@ | |||
27 | color: red; | 27 | color: red; |
28 | } | 28 | } |
29 | 29 | ||
30 | button svg + span { | ||
31 | margin-left: 7px; | ||
32 | } | ||
33 | |||
30 | // === Tools | 34 | // === Tools |
31 | 35 | ||
32 | .nowrap { | 36 | .nowrap { |
@@ -66,11 +70,10 @@ | |||
66 | // Disable sticky hover styling on touch devices, | 70 | // Disable sticky hover styling on touch devices, |
67 | // on which the virtual cursor doesn't leave the element after being tapped. | 71 | // on which the virtual cursor doesn't leave the element after being tapped. |
68 | // The fix can be applied to `a` elements by using the .link class. | 72 | // The fix can be applied to `a` elements by using the .link class. |
69 | @media (hover:none), (hover:on-demand) { | 73 | @media (hover: none), (hover: on-demand) { |
70 | .link:hover { | 74 | .link:hover { |
71 | color: $link !important; | 75 | color: $link !important; |
72 | } | 76 | } |
73 |  | ||
74 | .disabled:hover { | 77 | .disabled:hover { |
75 | color: $disabled-color !important; | 78 | color: $disabled-color !important; |
76 | } | 79 | } |
@@ -90,7 +93,7 @@ | |||
90 | } | 93 | } |
91 | .scrollbar::-webkit-scrollbar-thumb { | 94 | .scrollbar::-webkit-scrollbar-thumb { |
92 | box-shadow: inset 0 0 1px black; | 95 | box-shadow: inset 0 0 1px black; |
93 | background-color: $toolbar-color; | 96 | background-color: $scrollbar-color; |
94 | } | 97 | } |
95 | 98 | ||
96 | // === Thumbnail tiles alignment | 99 | // === Thumbnail tiles alignment |
diff --git a/viewer/src/assets/scss/theme.scss b/viewer/src/assets/scss/theme.scss index 0a921a9..26cb355 100644 --- a/viewer/src/assets/scss/theme.scss +++ b/viewer/src/assets/scss/theme.scss | |||
@@ -18,9 +18,8 @@ | |||
18 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. | 18 | -- along with this program. If not, see <https://www.gnu.org/licenses/>. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | @import '_buefy_variables.scss'; | 21 | @import "_buefy_variables.scss"; |
22 | @import 'palette.scss'; | 22 | @import "palette.scss"; |
23 | |||
24 | 23 | ||
25 | // Buefy components | 24 | // Buefy components |
26 | 25 | ||
@@ -44,7 +43,14 @@ $loading-background: $palette-800; | |||
44 | $title-color: $palette-200; | 43 | $title-color: $palette-200; |
45 | $title-size: $size-5; | 44 | $title-size: $size-5; |
46 | $tag-background-color: $palette-800; | 45 | $tag-background-color: $palette-800; |
47 | 46 | $button-color: $palette-100; | |
47 | $button-active-color: $palette-100; | ||
48 | $button-active-border-color: $palette-500; | ||
49 | $button-background-color: $palette-700; | ||
50 | $button-border-color: $palette-500; | ||
51 | $button-focus-color: $button-color; | ||
52 | $button-focus-border-color: $link; | ||
53 | $button-focus-box-shadow-size: 0; | ||
48 | 54 | ||
49 | // Custom components | 55 | // Custom components |
50 | 56 | ||
@@ -54,14 +60,13 @@ $panel-left-bgcolor: $palette-800; | |||
54 | $panel-left-txtcolor: $primary; | 60 | $panel-left-txtcolor: $primary; |
55 | $command-buttons-bgcolor: $palette-700; | 61 | $command-buttons-bgcolor: $palette-700; |
56 | $content-bgcolor: $palette-900; | 62 | $content-bgcolor: $palette-900; |
57 | $toolbar-color: $palette-300; // FIXME: should be named "scrollbar" | 63 | $scrollbar-color: $palette-300; |
58 | $loader-color: $palette-800; | 64 | $loader-color: $palette-800; |
59 | $input-tag-delete-background-color: $palette-700; | 65 | $input-tag-delete-background-color: $palette-700; |
60 | $breadcrumb-margins: 12px; | 66 | $breadcrumb-margins: 12px; |
61 | $breadcrumb-overflow-mask-size: $breadcrumb-margins + 60px; | 67 | $breadcrumb-overflow-mask-size: $breadcrumb-margins + 60px; |
62 | $thumbnail-other-size: 120px; | 68 | $thumbnail-other-size: 120px; |
63 | 69 | ||
64 | |||
65 | // Layout | 70 | // Layout |
66 | 71 | ||
67 | $layout-top: 45px; | 72 | $layout-top: 45px; |
diff --git a/viewer/src/components/LdBreadcrumb.vue b/viewer/src/components/LdBreadcrumb.vue index 7f7ef7d..2ac1216 100644 --- a/viewer/src/components/LdBreadcrumb.vue +++ b/viewer/src/components/LdBreadcrumb.vue | |||
@@ -29,24 +29,32 @@ | |||
29 | > | 29 | > |
30 | <div v-show="overflowMask" class="ld-breadcrumb-overflow-mask"></div> | 30 | <div v-show="overflowMask" class="ld-breadcrumb-overflow-mask"></div> |
31 | <ul class="ld-breadcrumb"> | 31 | <ul class="ld-breadcrumb"> |
32 | <li v-for="(item,idx) in $galleryStore.currentItemPath" :key="item.path"> | 32 | <li v-for="(item,idx) in currentItemPath" :key="item.path"> |
33 | <fa-icon v-if="idx > 0" icon="angle-right" class="disabled" /> | 33 | <fa-icon v-if="idx > 0" icon="angle-right" class="disabled" /> |
34 | <router-link :to="item.path" class="link"> | 34 | <router-link :to="item.path" class="link"> |
35 | <fa-icon :icon="getIcon(item)" size="lg" /> | 35 | <fa-icon :icon="getIcon(item)" size="lg" /> |
36 | {{item.title}} | 36 | {{item.title}} |
37 | </router-link> | 37 | </router-link> |
38 | </li> | 38 | </li> |
39 | <li v-if="searchMode"> | ||
40 | <fa-icon icon="angle-right" class="disabled" /> | ||
41 | <router-link :to="$route" class="link"> | ||
42 | <fa-icon icon="search" size="lg" class="disabled" /> | ||
43 | </router-link> | ||
44 | </li> | ||
39 | </ul> | 45 | </ul> |
40 | </div> | 46 | </div> |
41 | </template> | 47 | </template> |
42 | 48 | ||
43 | <script lang="ts"> | 49 | <script lang="ts"> |
44 | import { Component, Vue, Ref, Watch } from "vue-property-decorator"; | 50 | import { Component, Vue, Ref, Watch, Prop } from "vue-property-decorator"; |
45 | import DragScrollClickFix from "@/dragscrollclickfix"; | 51 | import DragScrollClickFix from "@/services/dragscrollclickfix"; |
46 | import Tools from "@/tools"; | 52 | import Navigation from "@/services/navigation"; |
47 | 53 | ||
48 | @Component | 54 | @Component |
49 | export default class LdBreadcrumb extends Vue { | 55 | export default class LdBreadcrumb extends Vue { |
56 | @Prop({ required: true }) readonly currentItemPath!: Gallery.Item[]; | ||
57 | @Prop(Boolean) readonly searchMode!: boolean; | ||
50 | @Ref() readonly breadcrumb!: HTMLUListElement; | 58 | @Ref() readonly breadcrumb!: HTMLUListElement; |
51 | 59 | ||
52 | readonly dragScrollClickFix = new DragScrollClickFix(); | 60 | readonly dragScrollClickFix = new DragScrollClickFix(); |
@@ -66,7 +74,7 @@ export default class LdBreadcrumb extends Vue { | |||
66 | this.overflowMask = this.breadcrumb.scrollLeft > 1; | 74 | this.overflowMask = this.breadcrumb.scrollLeft > 1; |
67 | } | 75 | } |
68 | 76 | ||
69 | @Watch("$galleryStore.currentItemPath") | 77 | @Watch("currentItemPath") |
70 | changedCurrentItemPath() { | 78 | changedCurrentItemPath() { |
71 | this.$nextTick(() => { | 79 | this.$nextTick(() => { |
72 | this.breadcrumb.scrollLeft = this.breadcrumb.scrollWidth; | 80 | this.breadcrumb.scrollLeft = this.breadcrumb.scrollWidth; |
@@ -75,7 +83,7 @@ export default class LdBreadcrumb extends Vue { | |||
75 | } | 83 | } |
76 | 84 | ||
77 | getIcon(item: Gallery.Item) { | 85 | getIcon(item: Gallery.Item) { |
78 | return Tools.getIcon(item); | 86 | return Navigation.getIcon(item); |
79 | } | 87 | } |
80 | } | 88 | } |
81 | </script> | 89 | </script> |
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index 7590ea7..c0b86be 100644 --- a/viewer/src/components/LdCommand.vue +++ b/viewer/src/components/LdCommand.vue | |||
@@ -23,14 +23,6 @@ | |||
23 | <a class="link" :title="$t('command.search')" @click="$uiStore.toggleFullWidth()"> | 23 | <a class="link" :title="$t('command.search')" @click="$uiStore.toggleFullWidth()"> |
24 | <fa-icon :icon="commandToggleSearchPanelIcon()" size="lg" /> | 24 | <fa-icon :icon="commandToggleSearchPanelIcon()" size="lg" /> |
25 | </a> | 25 | </a> |
26 | <router-link | ||
27 | to="/" | ||
28 | class="command-secondary" | ||
29 | :class="{'disabled': isRoot()}" | ||
30 | :title="$t('command.home')" | ||
31 | > | ||
32 | <fa-icon icon="home" size="lg" /> | ||
33 | </router-link> | ||
34 | <a class="link command-secondary" :title="$t('command.back')" @click="$router.go(-1)"> | 26 | <a class="link command-secondary" :title="$t('command.back')" @click="$router.go(-1)"> |
35 | <fa-icon icon="arrow-left" size="lg" /& |