Skip to content

Commit

Permalink
fix(UI): hide tools menu if no tools available
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Nov 24, 2021
1 parent 37a848d commit da1947e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/renderer/components/Workspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,20 @@
</span>
</a>
</li>
<li slot="header" class="tab-item dropdown tools-dropdown">
<li
v-if="workspace.customizations.processesList"
slot="header"
class="tab-item dropdown tools-dropdown"
>
<a
class="tab-link workspace-tools-link dropdown-toggle"
tabindex="0"
:title="$t('word.tools')"
>
<i class="mdi mdi-24px mdi-tools" />
</a>
<ul class="menu text-left text-uppercase">
<li v-if="workspace.customizations.processesList" class="menu-item">
<ul v-if="hasTools" class="menu text-left text-uppercase">
<li class="menu-item">
<a class="c-hand p-vcentered" @click="showProcessesModal">
<i class="mdi mdi-memory mr-1 tool-icon" />
<span>{{ $t('message.processesList') }}</span>
Expand Down Expand Up @@ -569,6 +573,11 @@ export default {
if (this.workspace.breadcrumbs[key]) return this.workspace.breadcrumbs[key];
}
return false;
},
hasTools () {
return this.workspace.customizations.processesList ||
this.workspace.customizations.usersManagement ||
this.workspace.customizations.variables;
}
},
watch: {
Expand Down

0 comments on commit da1947e

Please sign in to comment.