Skip to content

Commit 32c589a

Browse files
Merge pull request #6 from oslabs-beta/html_display
Updated Footer File
2 parents d65ceca + 452a021 commit 32c589a

File tree

7 files changed

+87
-63
lines changed

7 files changed

+87
-63
lines changed

src/components/CodeSnippet.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Description:
3-
Dynamically renders Code Snippet in Footer
3+
Dynamically renders Code Snippet in Dashboard
44
Functionality includes: Displays children components and (nested) HTML elements in order of selection.
55
-->
66

src/components/ComponentDetails.vue

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,30 @@
4242
</template>
4343

4444
<script>
45-
import { mapState } from "vuex";
45+
import { mapState } from 'vuex'
4646
4747
export default {
48-
name: "ComponentDetails",
48+
name: 'ComponentDetails',
4949
computed: {
50-
...mapState(["activeComponentObj"]),
50+
...mapState(['activeComponentObj']),
5151
activeState: {
52-
get() {
53-
if (this.activeComponentObj) return this.activeComponentObj.state;
52+
get () {
53+
if (this.activeComponentObj) return this.activeComponentObj.state
5454
return []
55-
},
55+
}
5656
},
5757
activeProps: {
58-
get() {
59-
if (this.activeComponentObj) return this.activeComponentObj.props;
60-
return [];
61-
},
58+
get () {
59+
if (this.activeComponentObj) return this.activeComponentObj.props
60+
return []
61+
}
6262
},
6363
activeActions: {
64-
get() {
65-
if (this.activeComponentObj) return this.activeComponentObj.actions;
66-
return [];
67-
},
68-
},
64+
get () {
65+
if (this.activeComponentObj) return this.activeComponentObj.actions
66+
return []
67+
}
68+
}
6969
// componentActions: {
7070
// get() {
7171
// return this.$store.state.activeComponentObj.actions;
@@ -82,12 +82,12 @@ export default {
8282
// },
8383
// },
8484
},
85-
data() {
85+
data () {
8686
return {
87-
tab: "state",
88-
};
89-
},
90-
};
87+
tab: 'state'
88+
}
89+
}
90+
}
9191
</script>
9292

9393
<style lang="stylus" scoped>
@@ -98,13 +98,13 @@ i
9898
font-size 8px
9999
margin 5px
100100
101-
// styling for the entire footer
101+
// styling for the entire dashboard
102102
.q-footer
103103
transition-timing-function ease-in
104104
transition .2s
105105
background $subsecondary
106106
107-
// changes the footer toolbar height
107+
// changes the dashboard toolbar height
108108
.q-toolbar
109109
min-height 25px !important
110110
padding 0 6px !important
@@ -152,11 +152,10 @@ i
152152
background-color #202122
153153
</style>
154154

155-
156155
let active = (state.routes[state.activeRoute].filter(comp => {
157156
return comp.componentName === state.activeComponent
158157
})[0])
159158

160159
active.props
161160
active.state
162-
active.actions
161+
active.actions

src/components/ComponentDisplay.vue

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,17 @@ Description:
3333
<div class="component-title">
3434
<p>{{ componentData.componentName }}</p>
3535
</div>
36-
<p> Elements in Component: </p>
37-
<p
38-
v-for="htmlElement in componentMap[componentData.componentName]
39-
.htmlList"
40-
:key="htmlElement"
41-
>
42-
{{ htmlElement.text }}
43-
</p>
36+
<div class="component-html-info">
37+
<p>Elements in Component:</p>
38+
<p
39+
class="list-of-elements"
40+
v-for="htmlElement in componentMap[componentData.componentName]
41+
.htmlList"
42+
:key="htmlElement"
43+
>
44+
{{ htmlElement.text }}
45+
</p>
46+
</div>
4447
<q-menu context-menu>
4548
<q-list color="black" class="menu">
4649
<q-item clickable v-ripple v-close-popup @click="handleAddChild">
@@ -393,6 +396,28 @@ export default {
393396
line-height: 1.2;
394397
z-index: -1;
395398
}
399+
/* .component-html-info {
400+
position: relative;
401+
font-size: 16px;
402+
top: -18px;
403+
left: 2px;
404+
color: black;
405+
-webkit-text-stroke: 0.4px white;
406+
font-weight: 800;
407+
line-height: 1.2;
408+
z-index: -1;
409+
} */
410+
.component-html-info {
411+
display: flex;
412+
/* flex-basis: auto; */
413+
flex-direction: column;
414+
/* flex-wrap: wrap; */
415+
/* justify-content: center; */
416+
/* flex-flow: column wrap; */
417+
/* align-content: stretch; */
418+
/* align-items: flex-start; */
419+
font-weight: 800;
420+
}
396421
.component-children {
397422
position: relative;
398423
top: 0rem;

src/components/Footer.vue renamed to src/components/Dashboard.vue

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Description:
3-
Displays OverVue's footer containing Code Snippet, component details (TBD), Project Tree, and HTML Elements tabs
3+
Displays OverVue's dashboard containing Code Snippet, component details (TBD), Project Tree, and HTML Elements tabs
44
Functionality includes: opening/closing drawer, deselecting active html, and
55
toggling to html elements tab during component creation
66
-->
@@ -13,7 +13,7 @@ Description:
1313
</q-btn>
1414
<q-toolbar-title>Dashboard</q-toolbar-title>
1515
</q-toolbar>
16-
<q-card id="footer-cards">
16+
<q-card id="dashboard-cards">
1717
<q-tabs
1818
v-model="tab"
1919
dense
@@ -85,7 +85,7 @@ export default {
8585
},
8686
methods: {
8787
...mapActions(['setActiveHTML']),
88-
// toggles open/close action of footer drawer
88+
// toggles open/close action of dashboard drawer
8989
openBottomDrawer () {
9090
// 15in mb pro - 1027 px 3.75
9191
// big screens 2.5
@@ -103,23 +103,23 @@ export default {
103103
}
104104
}
105105
},
106-
// toggles footer to "html" tab when existing component is not in focus
106+
// toggles dashboard to "html" tab when existing component is not in focus
107107
watch: {
108108
activeComponent: function () {
109-
// console.log('watching activeComponent in Footer');
109+
// console.log('watching activeComponent in Dashboard');
110110
if (this.activeComponent === '' && this.selectedElementList.length !== 0) {
111111
this.tab = 'html'
112112
}
113113
},
114-
// toggles footer to "html" tab if component name has value & elements are in queue
114+
// toggles dashboard to "html" tab if component name has value & elements are in queue
115115
componentNameInputValue: function () {
116116
// console.log('watching componentNameInputVal')
117117
if (this.componentNameInputValue !== '' && this.selectedElementList.length !== 0 && this.activeComponent === '') {
118118
// console.log(this.selectedElementList)
119119
this.tab = 'html'
120120
}
121121
},
122-
// toggles footer to "html" tab if elements are added to queue on component creation
122+
// toggles dashboard to "html" tab if elements are added to queue on component creation
123123
selectedElementList: function () {
124124
// console.log('watching selectedElementList')
125125
if (this.activeComponent === '' && this.selectedElementList.length !== 0) {
@@ -140,14 +140,14 @@ i {
140140
margin: 5px;
141141
}
142142
143-
// styling for the entire footer
143+
// styling for the entire dashboard
144144
.q-footer {
145145
transition-timing-function: ease-in;
146146
transition: 0.2s;
147147
background: $subsecondary;
148148
}
149149
150-
// changes the footer toolbar height
150+
// changes the dashboard toolbar height
151151
.q-toolbar {
152152
min-height: 25px !important;
153153
padding: 0 6px !important;
@@ -192,7 +192,7 @@ i {
192192
background: black;
193193
}
194194
195-
#footer-cards {
195+
#dashboard-cards {
196196
height: 100%;
197197
border-radius: 0px;
198198
background: #737578;

src/components/DashboardVuexStore.vue

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@
3333
</template>
3434

3535
<script>
36-
import { mapState } from "vuex";
36+
import { mapState } from 'vuex'
3737
3838
export default {
39-
name: "VuexStore",
39+
name: 'VuexStore',
4040
computed: {
41-
...mapState(["userActions", "userState"]),
42-
actionOptions() {
43-
return this.userActions;
44-
},
45-
stateOptions() {
46-
return this.userState;
41+
...mapState(['userActions', 'userState']),
42+
actionOptions () {
43+
return this.userActions
4744
},
45+
stateOptions () {
46+
return this.userState
47+
}
4848
},
49-
data() {
49+
data () {
5050
return {
51-
tab: "state",
52-
};
53-
},
54-
};
51+
tab: 'state'
52+
}
53+
}
54+
}
5555
</script>
5656

5757
<style lang="stylus" scoped>
@@ -62,13 +62,13 @@ i
6262
font-size 8px
6363
margin 5px
6464
65-
// styling for the entire footer
65+
// styling for the entire Dashboard
6666
.q-footer
6767
transition-timing-function ease-in
6868
transition .2s
6969
background $subsecondary
7070
71-
// changes the footer toolbar height
71+
// changes the Dashboard toolbar height
7272
.q-toolbar
7373
min-height 25px !important
7474
padding 0 6px !important

src/components/Tree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Description:
3-
Displays project tree in Footer
3+
Displays project tree in Dashboard
44
Functionality includes: formating componentMap object to displaying in tree form
55
-->
66

src/layouts/MyLayout.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--
22
Description:
3-
Displays OverVue application layout including undo/redo button, openProject, saveProject, and exportProject, side panels, and footer
3+
Displays OverVue application layout including undo/redo button, openProject, saveProject, and exportProject, side panels, and dashboard
44
Functionality includes: Toolbar to the left that can be toggled open/closed and undo/redo functionality
55
-->
66

@@ -37,13 +37,13 @@ Description:
3737
<q-page-container>
3838
<router-view />
3939
</q-page-container>
40-
<Footer />
40+
<Dashboard/>
4141
</q-layout>
4242
</template>
4343

4444
<script>
4545
import HomeSideDropDown from '../components/HomeSideDropDown'
46-
import Footer from '../components/Footer'
46+
import Dashboard from '../components/Dashboard'
4747
import CreateComponent from '../components/CreateComponent'
4848
import ExportProjectComponent from '../components/ExportProject'
4949
import SaveProjectComponent from '../components/SaveProjectComponent'
@@ -59,7 +59,7 @@ export default {
5959
},
6060
components: {
6161
HomeSideDropDown,
62-
Footer,
62+
Dashboard,
6363
CreateComponent,
6464
ExportProjectComponent,
6565
SaveProjectComponent,

0 commit comments

Comments
 (0)