Skip to content

Commit dc49741

Browse files
committed
hide up level button when at root path
1 parent e8f9be1 commit dc49741

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/components/manager/GridView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="fm-grid">
33
<div class="d-flex align-content-start flex-wrap">
4-
<div class="fm-grid-item text-center" v-on:click="levelUp">
4+
<div class="fm-grid-item text-center" v-on:click="levelUp" v-if="!isRootPath">
55
<div class="fm-item-icon">
66
<i class="fas fa-level-up-alt fa-5x pb-2"></i>
77
</div>

src/components/manager/TableView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</tr>
4343
</thead>
4444
<tbody>
45-
<tr>
45+
<tr v-if="!isRootPath">
4646
<td colspan="4" class="fm-content-item" v-on:click="levelUp">
4747
<i class="fas fa-level-up-alt"></i>
4848
</td>

src/components/manager/mixins/manager.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ export default {
4949
acl() {
5050
return this.$store.state.fm.settings.acl;
5151
},
52+
53+
/**
54+
* Check if current path is at root level
55+
*/
56+
isRootPath() {
57+
return this.$store.state.fm[this.manager].selectedDirectory === null;
58+
}
5259
},
5360
methods: {
5461
/**

0 commit comments

Comments
 (0)