Mercurial > gemma
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 |
rev | line source |
---|---|
3 | 1 const Application = { |
2 namespaced: true, | |
3 state: { | |
6 | 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 | 10 }, |
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 | 18 appTitle: state => { |
19 return state.appTitle; | |
6 | 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 | 23 } |
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 | 30 actions: {} |
31 }; | |
32 | |
33 export default Application; |