diff options
author | Zero~Informatique | 2020-02-14 09:19:53 +0100 |
---|---|---|
committer | Zero~Informatique | 2020-02-24 00:04:39 +0100 |
commit | 370e3db3455f548699ff5e046e0f8dcc304991ac (patch) | |
tree | e29fe9e2afb940eea74c8ed510c46a1eb0fa4d84 /viewer/src/components/LdCommand.vue | |
parent | e42f4e864bac21ed3b19d1869df2cdd4f8c3433c (diff) | |
download | ldgallery-370e3db3455f548699ff5e046e0f8dcc304991ac.tar.gz |
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)
Diffstat (limited to 'viewer/src/components/LdCommand.vue')
-rw-r--r-- | viewer/src/components/LdCommand.vue | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index 7590ea7..468c241 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" /> | 27 | <fa-icon icon="arrow-left" size="lg" /> |
36 | </a> | 28 | </a> |
@@ -42,21 +34,23 @@ | |||
42 | </template> | 34 | </template> |
43 | 35 | ||
44 | <script lang="ts"> | 36 | <script lang="ts"> |
45 | import { Component, Vue } from "vue-property-decorator"; | 37 | import { Component, Vue, Prop } from "vue-property-decorator"; |
46 | import { RawLocation } from "vue-router"; | 38 | import { RawLocation } from "vue-router"; |
47 | 39 | ||
48 | @Component | 40 | @Component |
49 | export default class LdCommand extends Vue { | 41 | export default class LdCommand extends Vue { |
42 | @Prop({ required: true }) readonly currentItemPath!: Gallery.Item[]; | ||
43 | |||
50 | commandToggleSearchPanelIcon(): string { | 44 | commandToggleSearchPanelIcon(): string { |
51 | return this.$uiStore.fullWidth ? "search" : "angle-double-left"; | 45 | return this.$uiStore.fullWidth ? "search" : "angle-double-left"; |
52 | } | 46 | } |
53 | 47 | ||
54 | isRoot(): boolean { | 48 | isRoot(): boolean { |
55 | return this.$galleryStore.currentItemPath.length <= 1; | 49 | return this.currentItemPath.length <= 1; |
56 | } | 50 | } |
57 | 51 | ||
58 | parent(): RawLocation { | 52 | parent(): RawLocation { |
59 | if (!this.isRoot()) return this.$galleryStore.currentItemPath[this.$galleryStore.currentItemPath.length - 2]; | 53 | if (!this.isRoot()) return this.currentItemPath[this.currentItemPath.length - 2]; |
60 | return ""; | 54 | return ""; |
61 | } | 55 | } |
62 | } | 56 | } |