Mercurial > gemma
annotate client/src/stores/application.js @ 522:8e82936b49f7
merge
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Mon, 27 Aug 2018 17:10:25 +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; |