Skip to content

Commit e1970f2

Browse files
authored
Merge pull request #12 from oslabs-beta/megan/left-sidebar
Sidebar UI Updates
2 parents badf89a + 7cbd839 commit e1970f2

19 files changed

+473
-129
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"dependencies": {
2626
"@quasar/extras": "^1.12.5",
27+
"@ssthouse/vue3-tree-chart": "^0.2.3",
2728
"core-js": "^3.21.1",
2829
"dotenv": "^16.0.0",
2930
"electron-deeplink": "^1.0.9",

src-electron/icons/icon.icns

43.1 KB
Binary file not shown.

src-electron/icons/icon.ico

-109 KB
Binary file not shown.

src-electron/icons/icon.png

8.39 KB
Loading

src/assets/OverVue_navLogo.png

2.4 KB
Loading

src/components/ComponentDisplay.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export default {
396396
};
397397
</script>
398398

399-
<style scoped>
399+
<style scoped lang="scss">
400400
.component-title {
401401
position: relative;
402402
font-size: 16px;
@@ -430,25 +430,25 @@ export default {
430430
background-color: rgba(223, 218, 218, 0.886);
431431
background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
432432
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
433-
background-image: -webkit-linear-gradient(white 2px, transparent 2px),
434-
-webkit-linear-gradient(0, white 2px, transparent 2px),
433+
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
434+
-webkit-linear-gradient(0, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
435435
-webkit-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
436436
-webkit-linear-gradient(0, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
437-
background-image: -moz-linear-gradient(white 2px, transparent 2px),
438-
-moz-linear-gradient(0, white 2px, transparent 2px),
437+
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
438+
-moz-linear-gradient(0, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
439439
-moz-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
440440
-moz-linear-gradient(0, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
441-
background-image: linear-gradient(white 2px, transparent 2px),
442-
linear-gradient(90deg, white 2px, transparent 2px),
441+
background-image: linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
442+
linear-gradient(90deg, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
443443
linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
444444
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
445-
-pie-background: linear-gradient(white 2px, transparent 2px) -2px -2px / 100px,
446-
linear-gradient(90deg, white 2px, transparent 2px) -2px -2px / 100px,
445+
-pie-background: linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px) -2px -2px / 100px,
446+
linear-gradient(90deg, rgba(255, 255, 255, 0.8) 1px, transparent 1px) -2px -2px / 100px,
447447
linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px) -1px -1px /
448448
20px,
449449
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px) -1px -1px /
450450
20px,
451-
#269;
451+
$secondary;
452452
behavior: url(/pie/PIE.htc);
453453
}
454454
.menu {
@@ -464,7 +464,7 @@ export default {
464464
position: absolute;
465465
}
466466
.active {
467-
background-color: rgba(105, 179, 190, 0.514);
467+
background-color: $accent;
468468
border: 1px dashed rgb(227, 203, 71);
469469
}
470470
.btn {

src/components/dashboard_items/Dashboard.vue

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,11 @@ Description:
2020
name="detail"
2121
label="Component Details"
2222
id="label-text"
23-
style="border-right: 3px solid black"
24-
><i class="fas fa-code"></i
25-
></q-tab>
23+
></q-tab>
2624
<q-tab name="tree" label="Project Tree" id="label-text"
27-
><i class="fas fa-code-branch fa-flip-vertical"
28-
/></q-tab>
25+
></q-tab>
2926
<q-tab name="routes" label="Routes" id="label-text"
30-
><i class="fas fa-project-diagram"></i
31-
></q-tab>
27+
></q-tab>
3228
</q-tabs>
3329
<q-tab-panels v-model="tab" animated class="html-bg text-white">
3430
<q-tab-panel name="detail">
@@ -164,23 +160,23 @@ i {
164160
// changes the length of the tab panels
165161
.q-tab-panels {
166162
padding: 0px !important;
167-
border-top: 3px solid black;
163+
// border-top: 3px solid black;
168164
}
169165
170166
.q-tabs {
171-
background: #11120f;
167+
background: $subprimary;
172168
}
173169
174170
.toolbar-background {
175-
background: black;
171+
background: $subprimary;
176172
}
177173
178174
#dashboard-cards {
179175
display: flex;
180176
flex-direction: column;
181177
height: 100%;
182178
border-radius: 0px;
183-
background: #737578;
179+
background: $subprimary;
184180
}
185181
.html-bg {
186182
/* // give html background color of grey */
@@ -191,8 +187,8 @@ i {
191187
height: 100%;
192188
}
193189
194-
.bord {
195-
border-left: 3px solid black;
196-
border-right: 3px solid black;
197-
}
190+
// .bord {
191+
// border-left: 3px solid black;
192+
// border-right: 3px solid black;
193+
// }
198194
</style>

src/components/dashboard_items/HTMLQueue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Description:
2020
@dblclick.self="setActiveElement(element)"
2121
v-for="(element) in renderList" :key="element[1] + Date.now()"
2222
>
23-
<i v-if='activeComponent === "" || exceptions.includes(element[0]) ' class="fas fa fa-angle-double-down fa-md" id="unavailable"></i>
23+
<i v-if='activeComponent === "" || exceptions.includes(element[0]) '></i>
2424
<i v-else class="fas fa fa-angle-double-down fa-md" @click="setLayer({text: element[0], id: element[2]})"></i>
2525
{{ element[0] }}
2626
<i class="fas fa fa-trash fa-md" @click.self="deleteElement([element[1],element[2]])"></i>

src/components/dashboard_items/Tree.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,14 @@ export default {
236236
margin: 6px;
237237
min-height: 28px;
238238
color: #FFFFFF;
239-
background-color: #289EAD;
239+
background-color: $secondary;
240240
text-align: center;
241241
line-height: 28px;
242242
}
243243
244244
.tree-node-active {
245-
background-color: #155158;
245+
background-color: $accent;
246+
color: #155158;
246247
border: 2px solid rgb(196, 154, 19);
247248
}
248249

src/components/home_sidebar_items/ComponentTab/ComponentTab.vue

Lines changed: 9 additions & 5 deletions
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 v-if="activeComponent === ''"/>
65
<CreateComponent v-if="activeComponent === ''"/>
76
<EditDeleteComponents v-if="activeComponent !== ''"/>
87
</q-card>
@@ -35,23 +34,28 @@ export default {
3534
<style lang="scss">
3635
// give html background color of grey
3736
.html-bg {
38-
background-color: #202122;
37+
background-color: $subprimary;
3938
}
4039
#store-cards {
4140
height: 100%;
4241
border-radius: 0px;
43-
background-color: #202122;
42+
background-color: $subprimary;
43+
4444
}
4545
.q-tab-panel {
4646
height: 100%;
47-
// matchs the code editor bg
47+
// matches the code editor bg
4848
background: $subprimary;
4949
// changes the length of the tab panels
5050
}
5151
.q-tab-panels {
5252
height: 100%;
5353
}
5454
.q-tabs {
55-
background: #11120F;
55+
background: $subprimary;
56+
}
57+
58+
.q-tab__content{
59+
padding: 10px 0;
5660
}
5761
</style>

src/components/home_sidebar_items/ComponentTab/CreateComponent.vue

Lines changed: 109 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,71 @@ Description:
66
<!-- 4.0 adjustment: conditional render to switch between new comp name input and editing active comp name, moved from EditDeleteComponents -->
77

88
<template>
9-
<div class="inner-div drawer-menu">
10-
<br />
11-
<form v-on:submit.prevent="createComponent">
12-
<!-- will render if creating new component -->
13-
<q-input
14-
v-if="activeComponent === ''"
15-
standout="bg-secondary text-white"
16-
bottom-slots
17-
v-on:keyup.delete.stop
18-
v-model="componentNameInputValue"
19-
label="Component Name"
20-
dense
21-
class="input-add"
22-
></q-input>
23-
</form>
24-
<div class="icon-container">
25-
<Icons
26-
class="icons"
27-
@getClickedIcon="addToSelectedElementList"
28-
@activeElement="addToComponentElementList"
29-
@activeHTML="addNestedHTML"
30-
@activeLayer="addNestedNoActive"
31-
/>
32-
</div>
33-
<ParentMultiselect v-if="activeComponent === ''"></ParentMultiselect>
34-
<br />
9+
<div class="create-component-div inner-div drawer-menu">
10+
<q-expansion-item group="accordion" label="Import Component">
11+
<ImportComponent v-if="activeComponent === ''" @imported="createComponent" />
12+
</q-expansion-item>
13+
<q-expansion-item group="accordion" label="Create Component">
14+
<form class="create-component-form" v-on:submit.prevent="createComponent">
15+
<!-- will render if creating new component -->
16+
<q-input
17+
v-if="activeComponent === ''"
18+
v-on:keyup.delete.stop
19+
v-model="componentNameInputValue"
20+
label="Set component name *"
21+
color="accent"
22+
dark
23+
dense
24+
outlined
25+
item-aligned
26+
padding="5px"
27+
class="input-add"
28+
reactive-rules
29+
:rules="[ val => val.length != 0 || 'Please set a component name', val => !Object.keys(this.componentMap).includes(val) || 'A component with this name already exists' ]"
30+
></q-input>
31+
</form>
3532

36-
<q-btn
37-
v-if="activeComponent === ''"
38-
id="add-component-btn"
39-
color="secondary"
40-
label="Create Component"
41-
@click="createComponent"
42-
:disabled="!componentNameInputValue.trim()"
43-
/>
44-
<ImportComponent v-if="activeComponent === ''" @imported="createComponent"/>
33+
<ParentMultiselect v-if="activeComponent === ''"></ParentMultiselect>
34+
<div class="subsection">HTML Elements</div>
35+
<div class="icon-container">
36+
<Icons
37+
class="icons"
38+
@getClickedIcon="addToSelectedElementList"
39+
@activeElement="addToComponentElementList"
40+
@activeHTML="addNestedHTML"
41+
@activeLayer="addNestedNoActive"
42+
/>
43+
</div>
44+
<div class="componentHTML">
45+
<CreateComponentHTMLQueue></CreateComponentHTMLQueue>
46+
</div>
47+
<br />
4548

49+
<q-btn
50+
id="create-component-btn"
51+
v-if="activeComponent === ''"
52+
color="secondary"
53+
label="Create Component"
54+
@click="createComponent"
55+
:disabled="!componentNameInputValue.trim() || Object.keys(this.componentMap).includes(componentNameInputValue.trim())"
56+
/>
57+
</q-expansion-item>
4658
</div>
4759
</template>
4860

4961
<script>
5062
import Icons from "./Icons.vue";
5163
import ParentMultiselect from "./ParentMultiselect.vue";
5264
import ImportComponent from "./ImportComponent.vue"
65+
import CreateComponentHTMLQueue from "./CreateComponentHTMLQueue.vue";
5366
import { mapState, mapActions } from "vuex";
5467
export default {
5568
name: "HomeSidebar",
5669
components: {
5770
Icons,
5871
ParentMultiselect,
59-
ImportComponent
72+
ImportComponent,
73+
CreateComponentHTMLQueue
6074
},
6175
computed: {
6276
...mapState([
@@ -152,25 +166,63 @@ export default {
152166
</script>
153167

154168
<style lang="scss" scoped>
155-
.is-primary {
156-
height: 45px;
157-
}
158-
#add-component-btn {
159-
height: 15px;
160-
margin: 0.75rem;
161-
width: 90%;
162-
}
163-
#import-component-btn {
164-
height: 15px;
165-
margin: 0 0.75rem;
166-
width: 90%;
167-
}
168-
.inner-div {
169-
display: flex;
170-
flex-direction: column;
171-
justify-content: flex-start;
172-
padding-left: 15px;
173-
padding-right: 15px;
174-
height: 100%;
175-
}
169+
.create-component-div {
170+
display: flex;
171+
flex-direction: column;
172+
justify-content: flex-start;
173+
align-items: stretch;
174+
margin: 20px;
175+
}
176+
.create-component-form {
177+
display: flex;
178+
flex-direction: column;
179+
justify-content: flex-start;
180+
align-items: stretch;
181+
padding: -20px;
182+
}
183+
.subsection {
184+
border-top: 1px solid rgba(245, 245, 245, 0.3);
185+
padding: 10px 0 0;
186+
margin: 20px 0 0;
187+
}
188+
.componentHTML {
189+
height: 100px;
190+
margin-top: 20px;
191+
background-color: rgba($subsecondary, .5);
192+
overflow-y: scroll;
193+
border: 1px solid rgba(245, 245, 245, 0.3);
194+
border-radius: 5px;
195+
display: flex;
196+
flex-direction: column;
197+
align-items: center;
198+
}
199+
200+
#create-component-btn {
201+
width: 100%;
202+
}
203+
.q-expansion-item {
204+
margin-bottom: 10px;
205+
}
206+
207+
// .is-primary {
208+
// height: 45px;
209+
// }
210+
// #add-component-btn {
211+
// height: 15px;
212+
// margin: 0.75rem;
213+
// width: 90%;
214+
// }
215+
// #import-component-btn {
216+
// height: 15px;
217+
// margin: 0 0.75rem;
218+
// width: 90%;
219+
// }
220+
// .inner-div {
221+
// display: flex;
222+
// flex-direction: column;
223+
// justify-content: flex-start;
224+
// padding-left: 15px;
225+
// padding-right: 15px;
226+
// height: 100%;
227+
// }
176228
</style>

0 commit comments

Comments
 (0)