summaryrefslogtreecommitdiff
path: root/UI source code/dns_mapping_ui-master/src/store/modules/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'UI source code/dns_mapping_ui-master/src/store/modules/settings.js')
-rw-r--r--UI source code/dns_mapping_ui-master/src/store/modules/settings.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/UI source code/dns_mapping_ui-master/src/store/modules/settings.js b/UI source code/dns_mapping_ui-master/src/store/modules/settings.js
new file mode 100644
index 0000000..715ef48
--- /dev/null
+++ b/UI source code/dns_mapping_ui-master/src/store/modules/settings.js
@@ -0,0 +1,38 @@
+import variables from '@/assets/styles/element-variables.scss'
+import defaultSettings from '@/settings'
+const { tagsView, fixedHeader, sidebarLogo, uniqueOpened, showFooter, footerTxt, caseNumber, menuInLeft } = defaultSettings
+
+const state = {
+ theme: variables.theme,
+ showSettings: false,
+ tagsView: tagsView,
+ fixedHeader: fixedHeader,
+ sidebarLogo: sidebarLogo,
+ uniqueOpened: uniqueOpened,
+ showFooter: showFooter,
+ footerTxt: footerTxt,
+ caseNumber: caseNumber,
+ menuInLeft: false
+}
+
+const mutations = {
+ CHANGE_SETTING: (state, { key, value }) => {
+ if (state.hasOwnProperty(key)) {
+ state[key] = value
+ }
+ }
+}
+
+const actions = {
+ changeSetting({ commit }, data) {
+ commit('CHANGE_SETTING', data)
+ }
+}
+
+export default {
+ namespaced: true,
+ state,
+ mutations,
+ actions
+}
+