@@ -5,15 +5,11 @@ Description:
5
5
As of now, no default tab selected when not selecting anything, but might change to Project Tree in the future if we want
6
6
-->
7
7
8
- <template >
9
- <q-footer reveal class =" gradient text-white" :style =" { height: `${height}vh` }" v-on:click =" handleHtmlDeselection" >
10
- <q-toolbar class =" toolbar-background" >
11
- <q-btn flat color =" subaccent" round @click =" openBottomDrawer" >
12
- <i :class =" [open ? down : up]" id =" btn" ></i >
13
- </q-btn >
14
- <q-toolbar-title >Dashboard</q-toolbar-title >
15
- </q-toolbar >
16
- <q-card id =" dashboard-cards" >
8
+ <template >
9
+
10
+ <div class =" home-sidebar drawer-menu" >
11
+
12
+ <q-card id =" dashboard-cards" style =" fill " >
17
13
<q-tabs
18
14
v-model =" tab"
19
15
dense
@@ -22,30 +18,31 @@ Description:
22
18
indicator-color =" secondary"
23
19
align =" left"
24
20
>
25
- <q-tab name =" detail" label = " Component Details " id =" label-text" / >
26
- <q-tab name =" tree" label = " Project Tree " id = " label-text " />
27
- <q-tab name =" store" label = " Vuex Store " id =" label-text" / >
21
+ <q-tab name =" detail" id =" label-text" >< i class = " fas fa-code " ></ i ></ q-tab >
22
+ <q-tab name =" tree" id = " label-text " >< i class = " fas fa-code-branch fa-flip-vertical " /></ q-tab >
23
+ <q-tab name =" store" id =" label-text" >< i class = " fas fa-store-alt " ></ i ></ q-tab >
28
24
</q-tabs >
29
- <q-tab-panels v-model =" tab" animated class =" html-bg text-white" >
25
+ <q-tab-panels v-model =" tab" animated class =" html-bg text-white " >
30
26
<q-tab-panel name =" detail" >
31
- <ComponentDetails />
27
+ <ComponentDetails />
32
28
</q-tab-panel >
33
- <q-tab-panel name =" tree" >
29
+ <q-tab-panel name =" tree" >
34
30
<Tree />
35
31
</q-tab-panel >
36
32
<q-tab-panel name =" store" >
37
- <VuexStore />
33
+ <VuexStore />
38
34
</q-tab-panel >
39
35
</q-tab-panels >
40
36
</q-card >
41
- </q-footer >
37
+ </div >
38
+
42
39
</template >
43
40
44
41
<script >
45
- import { mapState , mapActions } from ' vuex'
46
- import Tree from ' ./Tree'
47
- import VuexStore from ' ./DashboardVuexStore.vue'
48
- import ComponentDetails from ' ./ComponentDetails'
42
+ import { mapState , mapActions } from " vuex" ;
43
+ import Tree from " ./Tree" ;
44
+ import VuexStore from " ./DashboardVuexStore.vue" ;
45
+ import ComponentDetails from " ./ComponentDetails" ;
49
46
50
47
export default {
51
48
components: {
@@ -54,34 +51,39 @@ export default {
54
51
ComponentDetails
55
52
},
56
53
computed: {
57
- ... mapState ([' activeComponent' , ' componentNameInputValue' , ' selectedElementList' , ' activeHTML' ])
54
+ ... mapState ([
55
+ " activeComponent" ,
56
+ " componentNameInputValue" ,
57
+ " selectedElementList" ,
58
+ " activeHTML"
59
+ ])
58
60
},
59
- data () {
61
+ data () {
60
62
return {
61
- tab: ' code' ,
63
+ tab: " code" ,
62
64
open: true ,
63
65
height: 40 ,
64
- up: ' fas fa-chevron-up' ,
65
- down: ' fas fa-chevron-down'
66
- }
66
+ up: " fas fa-chevron-up" ,
67
+ down: " fas fa-chevron-down"
68
+ };
67
69
},
68
70
methods: {
69
- ... mapActions ([' setActiveHTML' ]),
71
+ ... mapActions ([" setActiveHTML" ]),
70
72
// toggles open/close action of dashboard drawer
71
- openBottomDrawer () {
73
+ openBottomDrawer () {
72
74
// 15in mb pro - 1027 px 3.75
73
75
// big screens 2.5
74
76
let minHeight =
75
- window .outerHeight < 900 ? 4.5 : window .outerHeight < 1035 ? 3.75 : 2.5
76
- this .height === 40 ? (this .height = minHeight) : (this .height = 40 )
77
- this .open === true ? (this .open = false ) : (this .open = true )
77
+ window .outerHeight < 900 ? 4.5 : window .outerHeight < 1035 ? 3.75 : 2.5 ;
78
+ this .height === 40 ? (this .height = minHeight) : (this .height = 40 );
79
+ this .open === true ? (this .open = false ) : (this .open = true );
78
80
},
79
81
// function that will handle deselection from active HTML element
80
- handleHtmlDeselection (event ) {
82
+ handleHtmlDeselection (event ) {
81
83
// console.log('target html element: ', event.target)
82
- if (event .target .className !== ' list-group-item' ) {
84
+ if (event .target .className !== " list-group-item" ) {
83
85
// if html element classname is not equal to this string that all html elements have
84
- if (! (this .activeHTML === ' ' )) this .setActiveHTML ([' ' ]) // if activeHtml is not already deselected, do so
86
+ if (! (this .activeHTML === " " )) this .setActiveHTML ([" " ]); // if activeHtml is not already deselected, do so
85
87
}
86
88
}
87
89
},
@@ -97,45 +99,57 @@ export default {
97
99
// },
98
100
// otherwise toggle dashboard to 'Project Tree' tab if no component is selected or the
99
101
// user is in the process of creating a component
100
- componentNameInputValue : function () {
101
- if (this .componentNameInputValue !== ' ' && this .activeComponent === ' ' ) {
102
- this .tab = ' tree'
102
+ componentNameInputValue : function () {
103
+ if (this .componentNameInputValue !== " " && this .activeComponent === " " ) {
104
+ this .tab = " tree" ;
103
105
}
104
106
},
105
107
// // toggles dashboard to "Project Tree" tab if:
106
108
// // no component is selected and either:
107
109
// // elements are being added to component or name is being typed
108
- selectedElementList : function () {
109
- if (this .activeComponent === ' ' && this .selectedElementList .length !== 0 ) {
110
- this .tab = ' tree'
110
+ selectedElementList : function () {
111
+ if (
112
+ this .activeComponent === " " &&
113
+ this .selectedElementList .length !== 0
114
+ ) {
115
+ this .tab = " tree" ;
111
116
}
112
117
}
113
118
}
114
- }
119
+ };
115
120
</script >
116
121
117
122
<style lang="stylus" scoped>
118
123
i {
119
124
font-size : 11px ;
120
125
}
121
126
127
+ .home-sidebar {
128
+ margin : 1rem ;
129
+ justify-content : center ;
130
+ border-radius : 5px ;
131
+ padding : 0px ;
132
+ background : $subsecondary ;
133
+ }
134
+
135
+
122
136
.q-btn {
123
137
font-size : 8px ;
124
138
margin : 5px ;
125
139
}
126
140
127
141
// styling for the entire dashboard
128
- .q-footer {
129
- transition-timing-function : ease-in ;
130
- transition : 0.2s ;
131
- background : $subsecondary ;
132
- }
142
+ // .q-footer {
143
+ // transition-timing-function: ease-in;
144
+ // transition: 0.2s;
145
+ // background: $subsecondary;
146
+ // }
133
147
134
- // changes the dashboard toolbar height
135
- .q-toolbar {
136
- min-height : 25px !important ;
137
- padding : 0 6px !important ;
138
- }
148
+ // // changes the dashboard toolbar height
149
+ // .q-toolbar {
150
+ // min-height: 25px !important;
151
+ // padding: 0 6px !important;
152
+ // }
139
153
140
154
.q-toolbar__title {
141
155
font-size : 14px ;
@@ -159,12 +173,13 @@ i {
159
173
160
174
.q-tab-panel {
161
175
// matchs the code editor bg
176
+
162
177
background : $subprimary ;
163
178
}
164
179
165
180
// changes the length of the tab panels
166
181
.q-tab-panels {
167
- height : 90 % ;
182
+ height : 80 vh ;
168
183
padding : 0px !important ;
169
184
}
170
185
177
192
}
178
193
179
194
#dashboard-cards {
180
- height : 100 % ;
195
+ height : 80 % ;
181
196
border-radius : 0px ;
182
197
background : #73 75 78 ;
183
198
}
0 commit comments