Mercurial > gemma
annotate client/src/stores/application.js @ 556:09d8e5483851
fix: Layout for users and user details edited
User's role is now rendered as icon
sizing flaws removed
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 03 Sep 2018 14:21:31 +0200 |
parents | f66116b3a249 |
children |
rev | line source |
---|---|
555
f66116b3a249
fix: Reset collapse state of sidebar
Thomas Junk <thomas.junk@intevation.de>
parents:
542
diff
changeset
|
1 const defaultCollapseState = true; |
f66116b3a249
fix: Reset collapse state of sidebar
Thomas Junk <thomas.junk@intevation.de>
parents:
542
diff
changeset
|
2 |
3 | 3 const Application = { |
4 namespaced: true, | |
5 state: { | |
6 | 6 appTitle: process.env.VUE_APP_TITLE, |
389
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
7 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
|
8 sidebar: { |
555
f66116b3a249
fix: Reset collapse state of sidebar
Thomas Junk <thomas.junk@intevation.de>
parents:
542
diff
changeset
|
9 iscollapsed: defaultCollapseState |
422
9869bc03155e
refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents:
389
diff
changeset
|
10 }, |
9869bc03155e
refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents:
389
diff
changeset
|
11 countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"] |
3 | 12 }, |
13 getters: { | |
422
9869bc03155e
refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents:
389
diff
changeset
|
14 countries: state => { |
9869bc03155e
refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents:
389
diff
changeset
|
15 return state.countries; |
9869bc03155e
refactor: Brushed up UI and added comfort
Thomas Junk <thomas.junk@intevation.de>
parents:
389
diff
changeset
|
16 }, |
389
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
17 sidebarCollapsed: state => { |
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
18 return state.sidebar.iscollapsed; |
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
19 }, |
3 | 20 appTitle: state => { |
21 return state.appTitle; | |
6 | 22 }, |
9
ee6d3836014e
current version of login
Thomas Junk <thomas.junk@intevation.de>
parents:
6
diff
changeset
|
23 secondaryLogo: state => { |
ee6d3836014e
current version of login
Thomas Junk <thomas.junk@intevation.de>
parents:
6
diff
changeset
|
24 return state.secondaryLogo; |
3 | 25 } |
26 }, | |
389
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
27 mutations: { |
542
505656a9947f
refac: layout refactored
Thomas Junk <thomas.junk@intevation.de>
parents:
422
diff
changeset
|
28 toggleSidebar: state => { |
505656a9947f
refac: layout refactored
Thomas Junk <thomas.junk@intevation.de>
parents:
422
diff
changeset
|
29 state.sidebar.iscollapsed = !state.sidebar.iscollapsed; |
555
f66116b3a249
fix: Reset collapse state of sidebar
Thomas Junk <thomas.junk@intevation.de>
parents:
542
diff
changeset
|
30 }, |
f66116b3a249
fix: Reset collapse state of sidebar
Thomas Junk <thomas.junk@intevation.de>
parents:
542
diff
changeset
|
31 resetSidebar: state => { |
f66116b3a249
fix: Reset collapse state of sidebar
Thomas Junk <thomas.junk@intevation.de>
parents:
542
diff
changeset
|
32 state.sidebar.iscollapsed = defaultCollapseState; |
556
09d8e5483851
fix: Layout for users and user details edited
Thomas Junk <thomas.junk@intevation.de>
parents:
555
diff
changeset
|
33 }, |
09d8e5483851
fix: Layout for users and user details edited
Thomas Junk <thomas.junk@intevation.de>
parents:
555
diff
changeset
|
34 collapseSidebar: state => { |
09d8e5483851
fix: Layout for users and user details edited
Thomas Junk <thomas.junk@intevation.de>
parents:
555
diff
changeset
|
35 state.sidebar.iscollapsed = true; |
389
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
36 } |
e7d5383bc358
feat: Primitive validation and error messages
Thomas Junk <thomas.junk@intevation.de>
parents:
13
diff
changeset
|
37 }, |
3 | 38 actions: {} |
39 }; | |
40 | |
41 export default Application; |