Skip to content

Commit f806edb

Browse files
committed
made aesthetic changes
1 parent ca93368 commit f806edb

File tree

4 files changed

+54
-69
lines changed

4 files changed

+54
-69
lines changed

src/components/ComponentDetails.vue

Lines changed: 19 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@
1414
<q-tab name="props" label="Component Props" id="label-text" />
1515
</q-tabs>
1616
<q-tab-panels v-model="tab" animated class="html-bg text-white">
17-
<q-tab-panel name="state" v-model="activeState">
17+
<q-tab-panel name="state">
1818
<ul id="stateList">
19-
<li v-for="comp in activeState" :key="comp">
19+
<li v-for="comp in compObj.state" :key="comp">
2020
{{ comp }}
2121
</li>
2222
</ul>
2323
</q-tab-panel>
24-
<q-tab-panel name="actions" v-model="activeActions">
24+
<q-tab-panel name="actions">
2525
<ul id="actionList">
26-
<li v-for="comp in activeActions" :key="comp">
26+
<li v-for="comp in compObj.actions" :key="comp">
2727
{{ comp }}
2828
</li>
2929
</ul>
3030
</q-tab-panel>
31-
<q-tab-panel name="props" v-model="activeProps">
31+
<q-tab-panel name="props">
3232
<ul id="propsList">
33-
<li v-for="comp in activeProps" :key="comp">
33+
<li v-for="comp in compObj.props" :key="comp">
3434
{{ comp }}
3535
</li>
3636
</ul>
3737
</q-tab-panel>
3838
</q-tab-panels>
3939
</q-card>
40-
<q-card v-else>Select a component to show details</q-card>
40+
<q-card id="blank-card" v-else>Select a component to show details</q-card>
4141
</div>
4242
</template>
4343

@@ -48,39 +48,11 @@ export default {
4848
name: "ComponentDetails",
4949
computed: {
5050
...mapState(["activeComponentObj"]),
51-
activeState: {
52-
get() {
53-
if (this.activeComponentObj) return this.activeComponentObj.state;
54-
return []
55-
},
56-
},
57-
activeProps: {
58-
get() {
59-
if (this.activeComponentObj) return this.activeComponentObj.props;
60-
return [];
61-
},
62-
},
63-
activeActions: {
64-
get() {
65-
if (this.activeComponentObj) return this.activeComponentObj.actions;
66-
return [];
67-
},
68-
},
69-
// componentActions: {
70-
// get() {
71-
// return this.$store.state.activeComponentObj.actions;
72-
// },
73-
// },
74-
// componentState: {
75-
// get() {
76-
// return this.$store.state.activeComponentObj.state;
77-
// },
78-
// },
79-
// componentProps: {
80-
// get() {
81-
// return this.$store.state.activeComponentObj.props;
82-
// },
83-
// },
51+
compObj: {
52+
get(){
53+
return this.activeComponentObj
54+
}
55+
}
8456
},
8557
data() {
8658
return {
@@ -143,20 +115,17 @@ i
143115
background black
144116
145117
#store-cards
146-
height 100%
118+
height 80%
147119
border-radius 0
148120
background #737578
149121
122+
#blank-card
123+
height 80%
124+
border-radius 0
125+
background-color #202122
126+
127+
150128
.html-bg
151129
// give html background color of grey
152130
background-color #202122
153131
</style>
154-
155-
156-
let active = (state.routes[state.activeRoute].filter(comp => {
157-
return comp.componentName === state.activeComponent
158-
})[0])
159-
160-
active.props
161-
active.state
162-
active.actions

src/components/DashboardVuexStore.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ i
107107
background black
108108
109109
#store-cards
110-
height 100%
110+
height 80%
111111
border-radius 0
112112
background #737578
113113

src/components/HomeSideDropDownItems/VuexForm.vue

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Description:
2121
</q-input>
2222
<template>
2323
<div id="action-select">
24-
<br />
2524
<multiselect
2625
v-model="selectAction"
26+
class="multiselect"
2727
placeholder="Select Action"
2828
:multiple="true"
2929
:close-on-select="false"
@@ -39,15 +39,16 @@ Description:
3939
</template>
4040
<template>
4141
<div>
42-
<br />
4342
<q-btn
4443
id="add-actions-btn"
44+
class="add-btn"
4545
color="secondary"
4646
label="Add Action(s)"
4747
@click="addActionToComp"
4848
/>
4949
</div>
5050
</template>
51+
<br/>
5152
<!-- STATE PORTION -->
5253
<q-input
5354
standout="bg-secondary text-white"
@@ -63,9 +64,9 @@ Description:
6364
</q-input>
6465
<template>
6566
<div id="state-select">
66-
<br />
6767
<multiselect
6868
v-model="selectState"
69+
class="multiselect"
6970
placeholder="Select State"
7071
:multiple="true"
7172
:close-on-select="false"
@@ -81,16 +82,17 @@ Description:
8182
</template>
8283
<template>
8384
<div>
84-
<br />
8585
<q-btn
86-
id="add-actions-btn"
86+
id="add-state-btn"
87+
class="add-btn"
8788
color="secondary"
88-
label="Add State(s)"
89+
label="Add State"
8990
@click="addStateToComp"
9091
/>
9192
</div>
9293
</template>
9394
<!-- PROPS PORTION -->
95+
<br />
9496
<q-input
9597
standout="bg-secondary text-white"
9698
bottom-slots
@@ -105,9 +107,9 @@ Description:
105107
</q-input>
106108
<template>
107109
<div id="props-select">
108-
<br />
109110
<multiselect
110111
v-model="selectProps"
112+
class="multiselect"
111113
placeholder="Select Props"
112114
:multiple="true"
113115
:close-on-select="false"
@@ -123,9 +125,9 @@ Description:
123125
</template>
124126
<template>
125127
<div>
126-
<br />
127128
<q-btn
128129
id="add-props-btn"
130+
class="add-btn"
129131
color="secondary"
130132
label="Add Prop(s)"
131133
@click="addPropsToComp"
@@ -268,11 +270,22 @@ export default {
268270

269271
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
270272
<style scoped>
271-
#parent-select {
273+
.multiselect {
272274
height: 30px;
273275
margin: 0.75rem;
274276
width: 90%;
275277
}
278+
.add-btn {
279+
height: 15px;
280+
margin: 0.75rem;
281+
width: 90%;
282+
}
283+
.home-sidebar {
284+
margin: 1rem;
285+
padding: 0.5rem;
286+
border-radius: 5px;
287+
}
288+
276289
</style>
277290

278291
<style lang="stylus" scoped>

src/store/mutations.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ const mutations = {
9292
},
9393

9494
[types.ADD_ACTION_TO_COMPONENT]: (state, payload) => {
95-
let active = (state.routes[state.activeRoute].filter(comp => {
96-
return comp.componentName === state.activeComponent
97-
})[0])
95+
// let active = (state.routes[state.activeRoute].filter(comp => {
96+
// return comp.componentName === state.activeComponent
97+
// })[0])
98+
let active = state.activeComponentObj
9899

99100
if (!active.actions) {
100101
active.actions = payload
@@ -121,9 +122,10 @@ const mutations = {
121122
},
122123

123124
[types.ADD_PROPS_TO_COMPONENT]: (state, payload) => {
124-
let active = (state.routes[state.activeRoute].filter(comp => {
125-
return comp.componentName === state.activeComponent
126-
})[0])
125+
// let active = (state.routes[state.activeRoute].filter(comp => {
126+
// return comp.componentName === state.activeComponent
127+
// })[0])
128+
let active = state.activeComponentObj
127129

128130
if (!active.props) {
129131
active.props = payload
@@ -148,9 +150,10 @@ const mutations = {
148150
},
149151

150152
[types.ADD_STATE_TO_COMPONENT]: (state, payload) => {
151-
let active = (state.routes[state.activeRoute].filter(comp => {
152-
return comp.componentName === state.activeComponent
153-
})[0])
153+
// let active = (state.routes[state.activeRoute].filter(comp => {
154+
// return comp.componentName === state.activeComponent
155+
// })[0])
156+
let active = state.activeComponentObj
154157

155158
if (!active.state) {
156159
active.state = payload

0 commit comments

Comments
 (0)