Skip to content

Commit 97174b5

Browse files
Merge pull request #29 from oslabs-beta/update
Update branch
2 parents 77375c2 + bacda84 commit 97174b5

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

src/components/dashboard_items/ComponentDetails.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,23 @@ Description:
3232
<HTMLQueue />
3333
</q-tab-panel>
3434
<q-tab-panel name="state">
35+
<p v-if='!this.activeComponentObj.state.length'>No state in component</p>
3536
<ul id="stateList">
3637
<li v-for="comp in compObj.state" :key="comp">
3738
{{ comp }}
3839
</li>
3940
</ul>
4041
</q-tab-panel>
4142
<q-tab-panel name="actions">
43+
<p v-if='!this.activeComponentObj.actions.length'>No actions in component</p>
4244
<ul id="actionList">
4345
<li v-for="comp in compObj.actions" :key="comp">
4446
{{ comp }}
4547
</li>
4648
</ul>
4749
</q-tab-panel>
4850
<q-tab-panel name="props">
51+
<p v-if='!this.activeComponentObj.props.length'>No props in component</p>
4952
<ul id="propsList">
5053
<li v-for="comp in compObj.props" :key="comp">
5154
{{ comp }}

src/components/dashboard_items/DashboardVuexStore.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ Description:
2020
</q-tabs>
2121
<q-tab-panels v-model="tab" animated class="html-bg text-white">
2222
<q-tab-panel name="state">
23+
<p v-if='!this.stateOptions.length'>No state in store</p>
2324
<ul id="stateList">
2425
<li v-for="state in stateOptions" v-bind:key="state">
2526
{{ state }}
2627
</li>
2728
</ul>
2829
</q-tab-panel>
2930
<q-tab-panel name="actions">
31+
<p v-if='!this.actionOptions.length'>No actions in store</p>
3032
<ul id="actionList">
3133
<li v-for="action in actionOptions" :key="action">
3234
{{ action }}

src/components/dashboard_items/HTMLQueue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Description:
1414
group="people"
1515
class="list-group"
1616
>
17-
17+
<p v-if='!this.componentMap[this.activeComponent].htmlList.length'>No HTML elements in component</p>
1818
<div
1919
:class="activeHTML === element[2] ? 'list-group-item-selected' : 'list-group-item'"
2020
@dblclick.self="setActiveElement(element)"

src/components/home_sidebar_items/EditDeleteComponents.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Description:
9595
<toggle-button v-model="showState" class="toggle"/>
9696
</div>
9797
<hr v-if="showState">
98+
<p v-if='showState && !this.activeComponentObj.state.length'>No state in component</p>
9899
<a
99100
v-for="s in this.activeComponentData.state"
100101
:key="s"
@@ -118,6 +119,7 @@ Description:
118119
<toggle-button v-model="showActions" class="toggle"/>
119120
</div>
120121
<hr v-if="showActions">
122+
<p v-if='showActions && !this.activeComponentObj.actions.length'>No actions in component</p>
121123
<a
122124
v-for="action in this.activeComponentData.actions"
123125
:key="action"
@@ -141,6 +143,7 @@ Description:
141143
<toggle-button v-model="showProps" class="toggle" justify='end'/>
142144
</div>
143145
<hr v-if="showProps">
146+
<p v-if='showProps && !this.activeComponentObj.props.length'>No props in component</p>
144147
<a
145148
v-for="prop in this.activeComponentData.props"
146149
:key="prop"

src/store/mutations.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@ const mutations = {
334334
if (id === state.activeHTML) {
335335
state.activeHTML = ''
336336
}
337-
state.componentMap[componentName].htmlList = htmlList
337+
let newCompMap = state.componentMap
338+
newCompMap[componentName].htmlList = htmlList
339+
state.componentMap = Object.assign({}, newCompMap)
340+
// state.componentMap[componentName].htmlList = htmlList
338341
},
339342

340343
// deletes a element html tag from HTMLQueue

0 commit comments

Comments
 (0)