From 3d5bf50520f70bf221caaee2326fdfadba341d49 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 11 Apr 2021 02:01:40 +0000 Subject: [PATCH] add feat #376 --- src/store/index.js | 12 ++++++++++++ src/views/Dashboard.vue | 14 +++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 2fc0b14..bbe8766 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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) diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 63c1939..020d622 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -90,7 +90,7 @@ - +