add conditional menu render

This commit is contained in:
wh1te909
2021-04-20 04:35:07 +00:00
parent e3bff1b85c
commit ceccab35e8
3 changed files with 11 additions and 1 deletions

View File

@@ -90,7 +90,7 @@
<q-item-section>Global Settings</q-item-section>
</q-item>
<!-- code sign -->
<q-item clickable v-close-popup @click="showCodeSign = true">
<q-item v-if="!noCodeSigning" clickable v-close-popup @click="showCodeSign = true">
<q-item-section>Code Signing</q-item-section>
</q-item>
</q-list>
@@ -246,6 +246,11 @@ export default {
showCodeSign: false,
};
},
computed: {
noCodeSigning() {
return this.$store.state.noCodeSign;
},
},
methods: {
showBulkActionModal(mode) {
this.bulkMode = mode;

View File

@@ -34,6 +34,7 @@ export default function () {
defaultAgentTblTab: "server",
clientTreeSort: "alphafail",
clientTreeSplitter: 11,
noCodeSign: false,
},
getters: {
clientTreeSplitterModel(state) {
@@ -153,6 +154,9 @@ export default function () {
},
SET_CLIENT_TREE_SORT(state, val) {
state.clientTreeSort = val
},
SET_NO_CODE_SIGN(state, val) {
state.noCodeSign = val
}
},
actions: {

View File

@@ -721,6 +721,7 @@ export default {
this.currentTRMMVersion = r.data.trmm_version;
this.$store.commit("SET_AGENT_DBLCLICK_ACTION", r.data.dbl_click_action);
this.$store.commit("setShowCommunityScripts", r.data.show_community_scripts);
this.$store.commit("SET_NO_CODE_SIGN", r.data.no_code_sign);
});
},
showToggleMaintenance(node) {