mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-02-21 11:51:08 +00:00
add feat #376
This commit is contained in:
@@ -33,8 +33,12 @@ export default function () {
|
||||
agentDblClickAction: "",
|
||||
defaultAgentTblTab: "server",
|
||||
clientTreeSort: "alphafail",
|
||||
clientTreeSplitter: 11,
|
||||
},
|
||||
getters: {
|
||||
clientTreeSplitterModel(state) {
|
||||
return state.clientTreeSplitter;
|
||||
},
|
||||
loggedIn(state) {
|
||||
return state.token !== null;
|
||||
},
|
||||
@@ -132,6 +136,9 @@ export default function () {
|
||||
agentHeight <= 15.0 ? state.tableHeight = "15vh" : state.tableHeight = `${agentHeight}vh`;
|
||||
tabsHeight <= 15.0 ? state.tabHeight = "15vh" : state.tabHeight = `${tabsHeight}vh`;
|
||||
},
|
||||
SET_CLIENT_SPLITTER(state, val) {
|
||||
state.clientTreeSplitter = val;
|
||||
},
|
||||
SET_NOTES(state, notes) {
|
||||
state.notes = notes;
|
||||
},
|
||||
@@ -149,6 +156,11 @@ export default function () {
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setClientTreeSplitter(context, val) {
|
||||
axios.patch("/accounts/users/ui/", { client_tree_splitter: Math.trunc(val) }).then(r => {
|
||||
context.commit("SET_CLIENT_SPLITTER", val)
|
||||
})
|
||||
},
|
||||
setShowCommunityScripts(context, data) {
|
||||
axios.patch("/accounts/users/ui/", { show_community_scripts: data }).then(r => {
|
||||
context.commit("setShowCommunityScripts", data)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
<q-page-container>
|
||||
<FileBar />
|
||||
<q-splitter v-model="outsideModel">
|
||||
<q-splitter v-model="clientTreeSplitter">
|
||||
<template v-slot:before>
|
||||
<div v-if="!treeReady" class="q-pa-sm q-gutter-sm text-center" style="height: 30vh">
|
||||
<q-spinner size="40px" color="primary" />
|
||||
@@ -397,7 +397,6 @@ export default {
|
||||
serverOfflineCount: 0,
|
||||
workstationCount: 0,
|
||||
workstationOfflineCount: 0,
|
||||
outsideModel: 11,
|
||||
selectedTree: "",
|
||||
innerModel: 50,
|
||||
clientActive: "",
|
||||
@@ -714,6 +713,7 @@ export default {
|
||||
if (edited) {
|
||||
this.$store.commit("SET_DEFAULT_AGENT_TBL_TAB", r.data.default_agent_tbl_tab);
|
||||
this.$store.commit("SET_CLIENT_TREE_SORT", r.data.client_tree_sort);
|
||||
this.$store.commit("SET_CLIENT_SPLITTER", r.data.client_tree_splitter);
|
||||
}
|
||||
this.darkMode = r.data.dark_mode;
|
||||
this.$q.dark.set(this.darkMode);
|
||||
@@ -802,13 +802,21 @@ export default {
|
||||
treeReady: state => state.treeReady,
|
||||
clients: state => state.clients,
|
||||
}),
|
||||
...mapGetters(["selectedAgentPk", "needRefresh"]),
|
||||
...mapGetters(["selectedAgentPk", "needRefresh", "clientTreeSplitterModel"]),
|
||||
wsUrl() {
|
||||
return getBaseUrl().split("://")[1];
|
||||
},
|
||||
token() {
|
||||
return this.$store.state.token;
|
||||
},
|
||||
clientTreeSplitter: {
|
||||
get: function () {
|
||||
return this.clientTreeSplitterModel;
|
||||
},
|
||||
set: function (newVal) {
|
||||
this.$store.dispatch("setClientTreeSplitter", newVal);
|
||||
},
|
||||
},
|
||||
tab: {
|
||||
get: function () {
|
||||
return this.$store.state.defaultAgentTblTab;
|
||||
|
||||
Reference in New Issue
Block a user