diff options
Diffstat (limited to 'viewer/src/components/LdCommand.vue')
-rw-r--r-- | viewer/src/components/LdCommand.vue | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index 6059162..19174ad 100644 --- a/viewer/src/components/LdCommand.vue +++ b/viewer/src/components/LdCommand.vue | |||
@@ -19,16 +19,16 @@ | |||
19 | --> | 19 | --> |
20 | 20 | ||
21 | <template> | 21 | <template> |
22 | <div class="flex command-btns"> | 22 | <div class="flex" :class="$style.commandBtns"> |
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 | <ld-command-sort /> | 26 | <ld-command-sort /> |
27 | <a | 27 | <a |
28 | :class="{ disabled: isEntryPoint }" | 28 | class="link" |
29 | class="link command-secondary" | 29 | :class="{ disabled: isEntryPoint(), [$style.commandSecondary]: true }" |
30 | :title="$t('command.back')" | 30 | :title="$t('command.back')" |
31 | @click="isEntryPoint || $router.back()" | 31 | @click="isEntryPoint() || $router.back()" |
32 | > | 32 | > |
33 | <fa-icon icon="arrow-left" size="lg" /> | 33 | <fa-icon icon="arrow-left" size="lg" /> |
34 | </a> | 34 | </a> |
@@ -40,12 +40,13 @@ | |||
40 | </template> | 40 | </template> |
41 | 41 | ||
42 | <script lang="ts"> | 42 | <script lang="ts"> |
43 | import { Component, Vue, Prop } from "vue-property-decorator"; | 43 | import { Item } from "@/@types/gallery"; |
44 | import { Component, Prop, Vue } from "vue-property-decorator"; | ||
44 | import { RawLocation } from "vue-router"; | 45 | import { RawLocation } from "vue-router"; |
45 | 46 | ||
46 | @Component | 47 | @Component |
47 | export default class LdCommand extends Vue { | 48 | export default class LdCommand extends Vue { |
48 | @Prop({ type: Array, required: true }) readonly currentItemPath!: Gallery.Item[]; | 49 | @Prop({ type: Array, required: true }) readonly currentItemPath!: Item[]; |
49 | 50 | ||
50 | get commandToggleSearchPanelIcon(): string { | 51 | get commandToggleSearchPanelIcon(): string { |
51 | return this.$uiStore.fullWidth ? "search" : "angle-double-left"; | 52 | return this.$uiStore.fullWidth ? "search" : "angle-double-left"; |
@@ -55,7 +56,7 @@ export default class LdCommand extends Vue { | |||
55 | return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode; | 56 | return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode; |
56 | } | 57 | } |
57 | 58 | ||
58 | get isEntryPoint(): boolean { | 59 | isEntryPoint(): boolean { |
59 | return history.state?.ldgallery === "ENTRYPOINT"; // Set by MainLayout.vue | 60 | return history.state?.ldgallery === "ENTRYPOINT"; // Set by MainLayout.vue |
60 | } | 61 | } |
61 | 62 | ||
@@ -67,18 +68,18 @@ export default class LdCommand extends Vue { | |||
67 | } | 68 | } |
68 | </script> | 69 | </script> |
69 | 70 | ||
70 | <style lang="scss"> | 71 | <style lang="scss" module> |
71 | @import "~@/assets/scss/_buefy_variables.scss"; | 72 | @import "~@/assets/scss/_buefy_variables.scss"; |
72 | @import "~@/assets/scss/theme.scss"; | 73 | @import "~@/assets/scss/theme.scss"; |
73 | 74 | ||
74 | .command-btns { | 75 | .commandBtns { |
75 | background-color: $command-buttons-bgcolor; | 76 | background-color: $command-buttons-bgcolor; |
76 | justify-content: space-around; | 77 | justify-content: space-around; |
77 | vertical-align: middle; | 78 | vertical-align: middle; |
78 | align-items: center; | 79 | align-items: center; |
79 | flex: 0 0 $layout-left; | 80 | flex: 0 0 $layout-left; |
80 | 81 | ||
81 | > a { | 82 | > * { |
82 | // normalise icon active boxes | 83 | // normalise icon active boxes |
83 | width: $layout-top; | 84 | width: $layout-top; |
84 | line-height: $layout-top; | 85 | line-height: $layout-top; |
@@ -89,7 +90,7 @@ export default class LdCommand extends Vue { | |||
89 | @media only screen and (max-width: $tablet) { | 90 | @media only screen and (max-width: $tablet) { |
90 | flex: 0 1; | 91 | flex: 0 1; |
91 | 92 | ||
92 | > .command-secondary { | 93 | > .commandSecondary { |
93 | display: none; | 94 | display: none; |
94 | } | 95 | } |
95 | } | 96 | } |