Skip to content

Commit 796ca0f

Browse files
committed
changed styling to highlight active route in routes tab; moved upload image button to routes tab; re-ordered right sidebar tabs; removed shadow from left sidebar
1 parent ad0759a commit 796ca0f

File tree

7 files changed

+103
-50
lines changed

7 files changed

+103
-50
lines changed

src/components/dashboard_items/Dashboard.vue

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,19 @@ Description:
1717
dense
1818
breakpoint="1050"
1919
>
20-
<q-tab name="detail" label="Component Details" id="label-text"
21-
></q-tab>
22-
<q-tab name="tree" label="Project Tree" id="label-text"
23-
></q-tab>
24-
<q-tab name="routes" label="Routes" id="label-text"
25-
></q-tab>
20+
<q-tab name="routes" label="Routes" id="label-text"></q-tab>
21+
<q-tab name="tree" label="Project Tree" id="label-text"></q-tab>
22+
<q-tab name="detail" label="Component Details" id="label-text"></q-tab>
2623
</q-tabs>
2724
<q-tab-panels v-model="tab" animated>
28-
<q-tab-panel name="detail">
29-
<ComponentDetails />
25+
<q-tab-panel name="routes">
26+
<RouteDisplay />
3027
</q-tab-panel>
3128
<q-tab-panel name="tree">
3229
<Tree />
3330
</q-tab-panel>
34-
<!-- added Routes to the right side -->
35-
<q-tab-panel name="routes">
36-
<RouteDisplay />
31+
<q-tab-panel name="detail">
32+
<ComponentDetails />
3733
</q-tab-panel>
3834
</q-tab-panels>
3935
</q-card>

src/components/dashboard_items/RouteDisplay.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,22 @@ Includes functionality to:
3030
</template>
3131
</q-input>
3232
<Routes></Routes>
33+
<UploadImage></UploadImage>
3334
</div>
35+
3436
</template>
3537

3638
<script>
3739
import Routes from "./Routes";
3840
import { mapState, mapActions } from "vuex";
41+
import UploadImage from "../home_sidebar_items/ComponentTab/UploadImage.vue";
3942
4043
export default {
4144
name: "RouteDisplay",
4245
components: {
4346
Routes,
44-
},
47+
UploadImage
48+
},
4549
computed: {
4650
...mapState(["routes", "componentMap"]),
4751
},

src/components/dashboard_items/Routes.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ Description:
88
<div>
99
<p>Click to view route</p>
1010
<a
11-
:class="route === activeRoute ? 'panel-block is-active' : 'panel-block'"
1211
v-for="route in Object.keys(routes)"
1312
:key="route"
1413
@click="selectRoute(route)"
1514
>
1615
<q-list bordered separator class="list-item">
17-
<q-item clickable v-ripple class="list-item">
16+
<q-item clickable v-ripple :class="route === activeRoute ? 'panel-block is-active list-item' : 'panel-block list-item'">
1817
<q-item-section>{{route}}</q-item-section>
1918
<span v-if="route !== 'HomeView'">
2019
<q-btn round flat icon="highlight_off" v-on:click.stop="deleteSelectedRoute(route)" />
@@ -47,6 +46,14 @@ export default {
4746
}
4847
</script>
4948

50-
<style scoped>
51-
49+
<style lang="scss" scoped>
50+
.panel-block {
51+
background: $secondary !important;
52+
color: $menutext !important;;
53+
}
54+
.is-active {
55+
background: $secondary !important;
56+
color: $menutext !important;
57+
border: 2px solid $menutext !important;
58+
}
5259
</style>

src/components/home_sidebar_items/ComponentTab/ComponentTab.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Functionality includes: if active component is selected, will switch view to editing mode. If not, it will be in create mode -->
33
<template>
44
<q-card id="store-cards">
5-
<UploadImage />
65
<CreateComponent v-if="activeComponent === ''"/>
76
<EditDeleteComponents v-if="activeComponent !== ''"/>
87
</q-card>

src/components/home_sidebar_items/ComponentTab/CreateComponent.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ export default {
212212
}
213213
.q-expansion-item {
214214
margin-bottom: 10px;
215-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 3px 6px 0 rgba(0, 0, 0, 0.13);
216215
}
217216
218217
// .is-primary {

src/components/home_sidebar_items/ComponentTab/UploadImage.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Description:
55
-->
66

77
<template>
8-
<div class="home-sidebar drawer-menu">
8+
<div id="uploadImgMenuItem">
99
<q-list>
10-
<q-expansion-item expand-separator label="Upload Mockup Image">
10+
<q-expansion-item expand-separator :label="this.activeRoute">
1111
<div class="upload">
1212
<q-btn
1313
class="upload-btn"
@@ -126,14 +126,18 @@ export default {
126126
</script>
127127

128128
<style lang="scss">
129-
.home-sidebar {
130-
margin: 1rem;
131-
justify-content: center;
132-
border-radius: 5px;
133-
padding: 0px;
134-
background: $subsecondary;
129+
#uploadImgMenuItem {
130+
display: flex;
131+
flex-direction: column;
132+
justify-content: flex-start;
133+
align-items: stretch;
134+
margin-top: 30px;
135135
}
136136
137+
.q-expansion-item {
138+
margin-bottom: 10px;
139+
}
140+
137141
.upload-btn {
138142
text-transform: capitalize;
139143
font-size: 12px;

src/layouts/MyLayout.vue

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ Description:
1313
<!-- the top header of OverVue -->
1414
<q-header elevated class="gradient text-white">
1515
<q-toolbar>
16+
<!-- <q-btn dense flat color="subaccent" round @click="left = !left">
17+
<i
18+
:class="[left ? 'fas fa-chevron-left' : 'fas fa-list-ul']"
19+
id="btn"
20+
></i>
21+
</q-btn> -->
1622
<q-toolbar-title><img alt="OverVue" src="../assets/OverVue_navLogo.png" id="nav-logo"><div id="undo-redo">
1723
<q-btn>
1824
<i
@@ -38,8 +44,28 @@ Description:
3844
<i v-else class="fa fa-redo" id="unavailable" aria-hidden="true"></i>
3945
</q-btn>
4046
</div></q-toolbar-title>
47+
<!-- <SlackLoginWindow /> -->
4148
<div></div>
42-
49+
<!-- <i
50+
v-if="doneAction.length"
51+
class="fa fa-backward"
52+
aria-hidden="true"
53+
@click="undo"
54+
></i>
55+
<i
56+
v-else
57+
class="fa fa-backward"
58+
id="unavailable"
59+
aria-hidden="true"
60+
></i>
61+
<i
62+
v-if="undoneAction.length"
63+
class="fa fa-forward"
64+
aria-hidden="true"
65+
@click="redo"
66+
></i>
67+
<i v-else class="fa fa-forward" id="unavailable" aria-hidden="true"></i> -->
68+
4369
<SaveProjectComponent />
4470
<OpenProjectComponent />
4571
<ExportProjectComponent />
@@ -54,15 +80,41 @@ Description:
5480
color="secondary"
5581
label="Getting Started"
5682
no-caps
57-
@click= "this.toggleTutorial"
5883
/>
5984

60-
<SlackLoginWindow />
61-
<div class="typescript">
62-
<p> <b>TypeScript: </b> </p>
63-
<label for="typescript" class="switch">
85+
<q-btn
86+
class="menu-btn"
87+
color="secondary"
88+
no-caps
89+
>
90+
<svg
91+
xmlns="http://www.w3.org/2000/svg"
92+
style="height: 20px; width: 20px; margin-right: 12px"
93+
viewBox="0 0 122.8 122.8"
94+
>
95+
<path
96+
d="M25.8 77.6c0 7.1-5.8 12.9-12.9 12.9S0 84.7 0 77.6s5.8-12.9 12.9-12.9h12.9v12.9zm6.5 0c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v32.3c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V77.6z"
97+
fill="#e01e5a"
98+
></path>
99+
<path
100+
d="M45.2 25.8c-7.1 0-12.9-5.8-12.9-12.9S38.1 0 45.2 0s12.9 5.8 12.9 12.9v12.9H45.2zm0 6.5c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H12.9C5.8 58.1 0 52.3 0 45.2s5.8-12.9 12.9-12.9h32.3z"
101+
fill="#36c5f0"
102+
></path>
103+
<path
104+
d="M97 45.2c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9-5.8 12.9-12.9 12.9H97V45.2zm-6.5 0c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V12.9C64.7 5.8 70.5 0 77.6 0s12.9 5.8 12.9 12.9v32.3z"
105+
fill="#2eb67d"
106+
></path>
107+
<path
108+
d="M77.6 97c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9-12.9-5.8-12.9-12.9V97h12.9zm0-6.5c-7.1 0-12.9-5.8-12.9-12.9s5.8-12.9 12.9-12.9h32.3c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H77.6z"
109+
fill="#ecb22e"
110+
></path>
111+
</svg>
112+
Connect to Slack
113+
</q-btn>
114+
<div>
115+
<label for="typescript" class="switch">
64116
<input class="switch-input" type="checkbox" name="typescript" id="typescript" :value="exportAsTypescript" @change="syncTypescriptFlag" />
65-
<span class="switch-label" data-on="On" data-off="Off"></span>
117+
<span class="switch-label" data-on="TypeScript" data-off="JavaScript"></span>
66118
<span class="switch-handle"></span>
67119
</label>
68120
</div>
@@ -84,7 +136,7 @@ Description:
84136
style="height: 100%; max-width: 100%;"
85137
bar-style="{ left: '10px' }"
86138
>
87-
<q-card>
139+
<q-card class="no-shadow">
88140
<!-- QTabs setup, not sure what class to set yet -->
89141
<q-tabs
90142
v-model="tab"
@@ -151,7 +203,7 @@ import OpenProjectComponent from "../components/file_system_interface/OpenProjec
151203
import SlackLoginWindow from "../components/slack_login/SlackLoginWindow.vue";
152204
import ComponentTab from "../components/home_sidebar_items/ComponentTab/ComponentTab.vue";
153205
import StoreTab from "../components/home_sidebar_items/StoreTab/StoreTab.vue";
154-
import { mapState, mapActions } from "vuex";
206+
import { mapState } from "vuex";
155207
156208
export default {
157209
// Passed down from App.vue
@@ -161,7 +213,7 @@ export default {
161213
tab: "component",
162214
left: true,
163215
right: true,
164-
dashWidth: 650,
216+
dashWidth: 950,
165217
originalWidth: 400,
166218
originalLeft: 400,
167219
timer: null,
@@ -177,10 +229,9 @@ export default {
177229
StoreTab,
178230
},
179231
computed: {
180-
...mapState(["exportAsTypescript"]),
232+
...mapState(["exportAsTypescript", "toggleTutorial"]),
181233
},
182234
methods: {
183-
...mapActions(["toggleTutorial"]),
184235
hideRight() {
185236
this.right = !this.right;
186237
if (this.$refs.resizeBox.style.display === "none") {
@@ -431,7 +482,7 @@ background: #5c5e61;
431482
position: relative;
432483
display: block;
433484
vertical-align: top;
434-
width: 100%;
485+
width: 100px;
435486
height: 30px;
436487
padding: 3px;
437488
margin: 0 10px 10px 0;
@@ -453,7 +504,7 @@ background: #5c5e61;
453504
position: relative;
454505
display: block;
455506
height: inherit;
456-
font-size: 0.8rem;
507+
font-size: 10px;
457508
text-transform: uppercase;
458509
background: #eceeef;
459510
border-radius: inherit;
@@ -485,7 +536,7 @@ background: #5c5e61;
485536
opacity: 0;
486537
}
487538
.switch-input:checked ~ .switch-label {
488-
background: #42B883;
539+
background: #289ead;
489540
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
490541
}
491542
.switch-input:checked ~ .switch-label:before {
@@ -512,14 +563,14 @@ background: #5c5e61;
512563
left: 50%;
513564
margin: -6px 0 0 -6px;
514565
width: 12px;
515-
height: 12px ;
566+
height: 12px;
516567
background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
517568
background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
518569
border-radius: 6px;
519570
box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
520571
}
521572
.switch-input:checked ~ .switch-handle {
522-
left: 56%;
573+
left: 74px;
523574
box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
524575
}
525576
@@ -531,11 +582,4 @@ background: #5c5e61;
531582
-moz-transition: All 0.3s ease;
532583
-o-transition: All 0.3s ease;
533584
}
534-
.typescript{
535-
display: flex;
536-
justify-content: space-around;
537-
align-items: flex-end;
538-
width: 90%;
539-
flex-direction: row;
540-
}
541585
</style>

0 commit comments

Comments
 (0)