@@ -5,15 +5,11 @@ Description:
55 As of now, no default tab selected when not selecting anything, but might change to Project Tree in the future if we want
66 -->
77
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 " >
1713 <q-tabs
1814 v-model =" tab"
1915 dense
@@ -22,30 +18,31 @@ Description:
2218 indicator-color =" secondary"
2319 align =" left"
2420 >
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 >
2824 </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 " >
3026 <q-tab-panel name =" detail" >
31- <ComponentDetails />
27+ <ComponentDetails />
3228 </q-tab-panel >
33- <q-tab-panel name =" tree" >
29+ <q-tab-panel name =" tree" >
3430 <Tree />
3531 </q-tab-panel >
3632 <q-tab-panel name =" store" >
37- <VuexStore />
33+ <VuexStore />
3834 </q-tab-panel >
3935 </q-tab-panels >
4036 </q-card >
41- </q-footer >
37+ </div >
38+
4239</template >
4340
4441<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" ;
4946
5047export default {
5148 components: {
@@ -54,34 +51,39 @@ export default {
5451 ComponentDetails
5552 },
5653 computed: {
57- ... mapState ([' activeComponent' , ' componentNameInputValue' , ' selectedElementList' , ' activeHTML' ])
54+ ... mapState ([
55+ " activeComponent" ,
56+ " componentNameInputValue" ,
57+ " selectedElementList" ,
58+ " activeHTML"
59+ ])
5860 },
59- data () {
61+ data () {
6062 return {
61- tab: ' code' ,
63+ tab: " code" ,
6264 open: true ,
6365 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+ };
6769 },
6870 methods: {
69- ... mapActions ([' setActiveHTML' ]),
71+ ... mapActions ([" setActiveHTML" ]),
7072 // toggles open/close action of dashboard drawer
71- openBottomDrawer () {
73+ openBottomDrawer () {
7274 // 15in mb pro - 1027 px 3.75
7375 // big screens 2.5
7476 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 );
7880 },
7981 // function that will handle deselection from active HTML element
80- handleHtmlDeselection (event ) {
82+ handleHtmlDeselection (event ) {
8183 // console.log('target html element: ', event.target)
82- if (event .target .className !== ' list-group-item' ) {
84+ if (event .target .className !== " list-group-item" ) {
8385 // 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
8587 }
8688 }
8789 },
@@ -97,45 +99,57 @@ export default {
9799 // },
98100 // otherwise toggle dashboard to 'Project Tree' tab if no component is selected or the
99101 // 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" ;
103105 }
104106 },
105107 // // toggles dashboard to "Project Tree" tab if:
106108 // // no component is selected and either:
107109 // // 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" ;
111116 }
112117 }
113118 }
114- }
119+ };
115120 </script >
116121
117122<style lang="stylus" scoped>
118123i {
119124 font-size : 11px ;
120125}
121126
127+ .home-sidebar {
128+ margin : 1rem ;
129+ justify-content : center ;
130+ border-radius : 5px ;
131+ padding : 0px ;
132+ background : $subsecondary ;
133+ }
134+
135+
122136.q-btn {
123137 font-size : 8px ;
124138 margin : 5px ;
125139}
126140
127141// 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+ // }
133147
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+ // }
139153
140154.q-toolbar__title {
141155 font-size : 14px ;
@@ -159,12 +173,13 @@ i {
159173
160174.q-tab-panel {
161175 // matchs the code editor bg
176+
162177 background : $subprimary ;
163178}
164179
165180// changes the length of the tab panels
166181.q-tab-panels {
167- height : 90 % ;
182+ height : 80 vh ;
168183 padding : 0px !important ;
169184}
170185
177192}
178193
179194#dashboard-cards {
180- height : 100 % ;
195+ height : 80 % ;
181196 border-radius : 0px ;
182197 background : #73 75 78 ;
183198}
0 commit comments