@@ -14,35 +14,62 @@ div#fullscreen
14
14
import BottomNav from ' ./components/common/BottomNav'
15
15
import TopNav from ' ./components/common/TopNav'
16
16
import ActionButton from ' ./components/common/ActionButton'
17
+
17
18
export default {
18
19
name: ' App' ,
19
20
components: { BottomNav, TopNav, ActionButton },
20
21
data () {
21
- return {
22
- }
22
+ return {}
23
23
},
24
24
computed: {
25
- darkUi () { return this .$store .state .darkUi },
26
- activeApi () { return this .$store .state .activeApi },
25
+ darkUi () {
26
+ return this .$store .state .darkUi
27
+ },
28
+ activeApi () {
29
+ return this .$store .state .activeApi
30
+ },
27
31
moduleName () {
28
32
switch (true ) {
29
- case / ^ \/ cockpit/ .test (this .$store .state .route .path ): this .$store .commit (' setModuleName' , ' cockpit' ); break
30
- case / ^ \/ planner/ .test (this .$store .state .route .path ): this .$store .commit (' setModuleName' , ' planner' ); break
31
- case / ^ \/ config/ .test (this .$store .state .route .path ): this .$store .commit (' setModuleName' , ' config' ); break
32
- case / ^ \/ analysis/ .test (this .$store .state .route .path ): this .$store .commit (' setModuleName' , ' analysis' ); break
33
- default : this .$store .commit (' setModuleName' , ' home' )
33
+ case / ^ \/ cockpit/ .test (this .$store .state .route .path ):
34
+ this .$store .commit (' setModuleName' , ' cockpit' )
35
+ break
36
+ case / ^ \/ planner/ .test (this .$store .state .route .path ):
37
+ this .$store .commit (' setModuleName' , ' planner' )
38
+ break
39
+ case / ^ \/ config/ .test (this .$store .state .route .path ):
40
+ this .$store .commit (' setModuleName' , ' config' )
41
+ break
42
+ case / ^ \/ analysis/ .test (this .$store .state .route .path ):
43
+ this .$store .commit (' setModuleName' , ' analysis' )
44
+ break
45
+ default :
46
+ this .$store .commit (' setModuleName' , ' home' )
34
47
}
35
48
switch (this .$store .state .moduleName ) {
36
- case ' cockpit' : this .$store .commit (' setNavColor' , ' mavblue' ); this .$store .commit (' setNavIcon' , false ); break
37
- case ' planner' : this .$store .commit (' setNavColor' , ' mavorange' ); this .$store .commit (' setNavIcon' , false ); break
38
- case ' config' : this .$store .commit (' setNavColor' , ' mavpurple' ); this .$store .commit (' setNavIcon' , true ); break
39
- case ' analysis' : this .$store .commit (' setNavColor' , ' mavgreen' ); this .$store .commit (' setNavIcon' , false ); break
40
- default : this .$store .commit (' setNavColor' , null ); this .$store .commit (' setNavIcon' , false )
49
+ case ' cockpit' :
50
+ this .$store .commit (' setNavColor' , ' mavblue' )
51
+ this .$store .commit (' setNavIcon' , false )
52
+ break
53
+ case ' planner' :
54
+ this .$store .commit (' setNavColor' , ' mavorange' )
55
+ this .$store .commit (' setNavIcon' , false )
56
+ break
57
+ case ' config' :
58
+ this .$store .commit (' setNavColor' , ' mavpurple' )
59
+ this .$store .commit (' setNavIcon' , true )
60
+ break
61
+ case ' analysis' :
62
+ this .$store .commit (' setNavColor' , ' mavgreen' )
63
+ this .$store .commit (' setNavIcon' , false )
64
+ break
65
+ default :
66
+ this .$store .commit (' setNavColor' , null )
67
+ this .$store .commit (' setNavIcon' , false )
41
68
}
42
69
return this .$store .state .moduleName
43
70
},
44
71
navState () {
45
- return ( this .moduleName === ' home' ) ? false : this .$store .state .navState // Return false if home screen, otherwise from vuex state
72
+ return this .moduleName === ' home' ? false : this .$store .state .navState // Return false if home screen, otherwise from vuex state
46
73
}
47
74
}
48
75
}
0 commit comments