diff options
Diffstat (limited to 'viewer/src/components/LdCommand.vue')
-rw-r--r-- | viewer/src/components/LdCommand.vue | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/viewer/src/components/LdCommand.vue b/viewer/src/components/LdCommand.vue index c0b86be..367e08f 100644 --- a/viewer/src/components/LdCommand.vue +++ b/viewer/src/components/LdCommand.vue | |||
@@ -23,7 +23,12 @@ | |||
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 | <a class="link command-secondary" :title="$t('command.back')" @click="$router.go(-1)"> | 26 | <a |
27 | :class="{'disabled': isEntryPoint()}" | ||
28 | class="link command-secondary" | ||
29 | :title="$t('command.back')" | ||
30 | @click="isEntryPoint() || $router.back()" | ||
31 | > | ||
27 | <fa-icon icon="arrow-left" size="lg" /> | 32 | <fa-icon icon="arrow-left" size="lg" /> |
28 | </a> | 33 | </a> |
29 | <router-link :class="{'disabled': isRoot()}" :title="$t('command.parent')" :to="parent()"> | 34 | <router-link :class="{'disabled': isRoot()}" :title="$t('command.parent')" :to="parent()"> |
@@ -49,6 +54,10 @@ export default class LdCommand extends Vue { | |||
49 | return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode; | 54 | return this.currentItemPath.length <= 1 && !this.$uiStore.searchMode; |
50 | } | 55 | } |
51 | 56 | ||
57 | isEntryPoint(): boolean { | ||
58 | return history.state.ldgallery === "ENTRYPOINT"; // Set by MainLayout.vue | ||
59 | } | ||
60 | |||
52 | parent(): RawLocation { | 61 | parent(): RawLocation { |
53 | if (this.$uiStore.searchMode) return this.$route.path; | 62 | if (this.$uiStore.searchMode) return this.$route.path; |
54 | if (this.currentItemPath.length > 1) return this.currentItemPath[this.currentItemPath.length - 2]; | 63 | if (this.currentItemPath.length > 1) return this.currentItemPath[this.currentItemPath.length - 2]; |