Skip to content

Commit c2737bf

Browse files
committed
Merge branch 'master' into README
2 parents b854c34 + 10488d1 commit c2737bf

File tree

3 files changed

+48
-37
lines changed

3 files changed

+48
-37
lines changed

src/components/Footer.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<q-footer reveal class="gradient text-white" :style="{ height: `${height}vh` }">
2+
<q-footer reveal class="gradient text-white" :style="{ height: `${height}vh` }" v-on:click="handleHtmlDeselection">
33
<q-toolbar class="toolbar-background">
44
<q-btn flat color="subaccent" round @click="openBottomDrawer">
55
<i :class="[open ? down : up]" id="btn"></i>
@@ -44,7 +44,7 @@
4444
</template>
4545

4646
<script>
47-
import { mapState } from 'vuex'
47+
import { mapState, mapActions } from 'vuex'
4848
import Tree from './Tree'
4949
import HomeQueue from './HomeQueue'
5050
import CodeSnippet from './CodeSnippet'
@@ -56,7 +56,7 @@ export default {
5656
CodeSnippet
5757
},
5858
computed: {
59-
...mapState(['activeComponent', 'componentNameInputValue', 'selectedElementList'])
59+
...mapState(['activeComponent', 'componentNameInputValue', 'selectedElementList', 'activeHTML'])
6060
},
6161
data () {
6262
return {
@@ -68,13 +68,22 @@ export default {
6868
}
6969
},
7070
methods: {
71+
...mapActions(['setActiveHTML']),
7172
openBottomDrawer () {
7273
// 15in mb pro - 1027 px 3.75
7374
// big ass screens 2.5
7475
let minHeight =
7576
window.outerHeight < 900 ? 4.5 : window.outerHeight < 1035 ? 3.75 : 2.5
7677
this.height === 40 ? (this.height = minHeight) : (this.height = 40)
7778
this.open === true ? (this.open = false) : (this.open = true)
79+
},
80+
handleHtmlDeselection (event) {
81+
// method that will handle deselection from active HTML element
82+
// console.log('target html element: ', event.target)
83+
if (event.target.className !== 'list-group-item') {
84+
// if html element classname is not equal to this string that all html elements have
85+
if (!(this.activeHTML === '')) this.setActiveHTML(['']) // if activeHtml is not already deselected, do so
86+
}
7887
}
7988
},
8089
// toggles footer to "html" tab when existing component is not in focus

src/components/HomeQueue.vue

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
<template>
2-
<section class="home-queue" v-on:click="handleClick">
2+
<section class="home-queue">
33
<i v-if='this.activeLayer.id !== ""' class="fas fa fa-chevron-up fa-md" @click="setParentLayer"></i>
44
<span class='list-title' v-if='this.activeLayer.id !== ""'> Viewing Elements in '{{ this.activeComponent }} {{ this.depth }}' </span>
55
<span class='list-title' v-else-if='this.activeComponent !==""'> Viewing Elements in '{{ this.activeComponent }}' </span>
66
<span class='list-title' v-else> Elements in Queue </span>
77
<hr>
8-
<draggable
9-
v-model="renderList"
8+
<div
109
group="people"
1110
class="list-group"
12-
ghost-class="ghost"
13-
@start="drag = true"
14-
@end="drag = false"
1511
>
16-
<div :class="activeHTML === element[2] ? 'list-group-item-selected' : 'list-group-item'" @dblclick.self="setActiveElement(element)" v-for="(element) in renderList" :key="element[1] + Date.now()">
12+
13+
<div
14+
:class="activeHTML === element[2] ? 'list-group-item-selected' : 'list-group-item'"
15+
@dblclick.self="setActiveElement(element)"
16+
v-for="(element) in renderList" :key="element[1] + Date.now()"
17+
>
1718
<!-- <i class="fas fa fa-angle-double-down fa-md" @click="setLayer({text: element[0], id: element[2]})"></i> -->
1819
<i v-if='activeComponent === "" ' class="fas fa fa-angle-double-down fa-md" id="unavailable"></i>
1920
<i v-else class="fas fa fa-angle-double-down fa-md" @click="setLayer({text: element[0], id: element[2]})"></i>
20-
<!-- <i class="fas fa fa-angle-double-down fa-md" @click="setLayer({text: element[0], id: element[2]})"></i> -->
2121
{{ element[0] }}
2222
<i class="fas fa fa-trash fa-md" @click.self="deleteElement([element[1],element[2]])"></i>
2323
</div>
24-
</draggable>
24+
25+
</div>
2526
</section>
2627
</template>
2728

2829
<script>
29-
import draggable from 'vuedraggable'
3030
import { mapState, mapActions } from 'vuex'
3131
import { setSelectedElementList, deleteSelectedElement, deleteFromComponentHtmlList } from '../store/types'
3232
@@ -90,7 +90,9 @@ export default {
9090
else this.$store.dispatch(deleteFromComponentHtmlList, id[1])
9191
},
9292
setActiveElement (element) {
93-
this.setActiveHTML(element)
93+
if (this.activeComponent !== '') {
94+
this.setActiveHTML(element)
95+
}
9496
},
9597
setLayer (element) {
9698
this.setActiveLayer(element)
@@ -108,17 +110,8 @@ export default {
108110
newTitle += ` > ${el}`
109111
})
110112
this.depth = newTitle
111-
},
112-
handleClick (event) {
113-
console.log(event.target)
114-
if (event.target.className === 'home-queue') {
115-
if (!(this.activeHTML === '')) this.setActiveHTML([''])
116-
}
117113
}
118114
},
119-
components: {
120-
draggable
121-
},
122115
watch: {
123116
activeComponent: function () {
124117
// console.log('watching activeComponent in HomeQueue')
@@ -210,7 +203,7 @@ li {
210203
}
211204
212205
#unavailable {
213-
color: grey;
206+
color: #686868;
214207
cursor: default
215208
}
216209

src/css/app.styl

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,30 @@ main {
2727
// background: rgb(22,108,105);
2828
// background: linear-gradient(36deg, rgba(22,108,105,1) 0%, rgba(20,32,23,1) 100%);
2929
}
30-
// ::-webkit-scrollbar {
31-
// width: 2px;
32-
// }
3330

34-
::-webkit-scrollbar {
35-
width: 12px;
31+
::-webkit-scrollbar
32+
{
33+
width: 10px;
34+
background-color: $subsecondary;
3635
}
37-
38-
::-webkit-scrollbar-track {
39-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
40-
border-radius: 10px;
36+
37+
::-webkit-scrollbar-track
38+
{
39+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
40+
border-radius: 10px;
41+
background-color: $subsecondary;
4142
}
42-
43-
::-webkit-scrollbar-thumb {
44-
border-radius: 10px;
45-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
43+
44+
::-webkit-scrollbar-thumb
45+
{
46+
border-radius: 10px;
47+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
48+
background-color: #303030;
4649
}
4750

51+
::-webkit-scrollbar-thumb:hover
52+
{
53+
border-radius: 10px;
54+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
55+
background-color: #404040;
56+
}

0 commit comments

Comments
 (0)