summaryrefslogtreecommitdiff
path: root/UI source code/dns_mapping_ui-master/src/store/modules/settings.js
diff options
context:
space:
mode:
authorunknown <[email protected]>2022-06-24 17:11:23 +0800
committerunknown <[email protected]>2022-06-24 17:11:23 +0800
commit8565e1bb597b481447d33bac6d8c48c2c45215de (patch)
treea4f10c8f7f85a1a8b5c947f7d0d2f967d808a9c4 /UI source code/dns_mapping_ui-master/src/store/modules/settings.js
parent8165dfcc7bdb0b2e6f1c05f8e7c93553c0e7911e (diff)
upload UI source codeHEADmain
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
+}
+