annotate client/src/stores/application.js @ 484:2ac37419f593

Implemented wamos/issue114 (Improve code consistency: For login use json body, disallow GET).
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 24 Aug 2018 11:36:11 +0200
parents 9869bc03155e
children 505656a9947f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
1 const Application = {
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
2 namespaced: true,
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
3 state: {
6
7c1bde663c8e current frontend
Thomas Junk <thomas.junk@intevation.de>
parents: 3
diff changeset
4 appTitle: process.env.VUE_APP_TITLE,
389
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
5 secondaryLogo: process.env.VUE_APP_SECONDARY_LOGO_URL,
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
6 sidebar: {
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
7 iscollapsed: false
422
9869bc03155e refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents: 389
diff changeset
8 },
9869bc03155e refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents: 389
diff changeset
9 countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"]
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
10 },
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
11 getters: {
422
9869bc03155e refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents: 389
diff changeset
12 countries: state => {
9869bc03155e refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents: 389
diff changeset
13 return state.countries;
9869bc03155e refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents: 389
diff changeset
14 },
389
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
15 sidebarCollapsed: state => {
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
16 return state.sidebar.iscollapsed;
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
17 },
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
18 appTitle: state => {
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
19 return state.appTitle;
6
7c1bde663c8e current frontend
Thomas Junk <thomas.junk@intevation.de>
parents: 3
diff changeset
20 },
9
ee6d3836014e current version of login
Thomas Junk <thomas.junk@intevation.de>
parents: 6
diff changeset
21 secondaryLogo: state => {
ee6d3836014e current version of login
Thomas Junk <thomas.junk@intevation.de>
parents: 6
diff changeset
22 return state.secondaryLogo;
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
23 }
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
24 },
389
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
25 mutations: {
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
26 toggleSidebar: () => {
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
27 this.sidebar.iscollapsed = !this.sidebar.iscollapsed;
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
28 }
e7d5383bc358 feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents: 13
diff changeset
29 },
3
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
30 actions: {}
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
31 };
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
32
1597506a2241 merge with vue-cli
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
33 export default Application;