diff client/src/stores/application.js @ 389:e7d5383bc358

feat: Primitive validation and error messages Added simple error messages to the usermanagement Added simple validation rules for fields: * password rules according issue70 * email used the regex from gocode
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 13 Aug 2018 16:21:26 +0200
parents 88d0d60924cf
children 9869bc03155e
line wrap: on
line diff
--- a/client/src/stores/application.js	Mon Aug 13 11:03:30 2018 +0200
+++ b/client/src/stores/application.js	Mon Aug 13 16:21:26 2018 +0200
@@ -2,9 +2,15 @@
   namespaced: true,
   state: {
     appTitle: process.env.VUE_APP_TITLE,
-    secondaryLogo: process.env.VUE_APP_SECONDARY_LOGO_URL
+    secondaryLogo: process.env.VUE_APP_SECONDARY_LOGO_URL,
+    sidebar: {
+      iscollapsed: false
+    }
   },
   getters: {
+    sidebarCollapsed: state => {
+      return state.sidebar.iscollapsed;
+    },
     appTitle: state => {
       return state.appTitle;
     },
@@ -12,7 +18,11 @@
       return state.secondaryLogo;
     }
   },
-  mutations: {},
+  mutations: {
+    toggleSidebar: () => {
+      this.sidebar.iscollapsed = !this.sidebar.iscollapsed;
+    }
+  },
   actions: {}
 };