Skip to content

Commit f913177

Browse files
authored
Merge pull request #2 from deanfchung/dean
updated version 6/5
2 parents a0439c0 + fc73e7e commit f913177

18 files changed

+1259
-54
lines changed

package-lock.json

Lines changed: 968 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@
1616
"localforage": "^1.7.3",
1717
"mousetrap": "^1.6.3",
1818
"quasar": "^1.0.0",
19+
"vue-drag-resize": "^1.3.2",
1920
"vue-draggable-resizable": "^2.0.0-rc2",
2021
"vue-loader": "^15.7.0",
2122
"vue-multiselect": "^2.1.6",
22-
"vued3tree": "^3.7.1"
23+
"vued3tree": "^3.7.1",
24+
"vuex": "^3.1.1"
2325
},
2426
"devDependencies": {
2527
"@quasar/app": "^1.0.0",
2628
"@vue/eslint-config-standard": "^4.0.0",
2729
"babel-eslint": "^10.0.1",
2830
"devtron": "^1.4.0",
2931
"electron": "^5.0.6",
32+
"electron-builder": "^20.44.4",
3033
"electron-debug": "^3.0.1",
3134
"electron-devtools-installer": "^2.2.4",
3235
"eslint": "^5.10.0",

quasar.conf.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ module.exports = function (ctx) {
5252
'QTabs',
5353
'QTab',
5454
'QRouteTab',
55-
'QTabPanels'
55+
'QTabPanels',
56+
'QTabPanel',
57+
'QFab',
58+
'QFabAction'
5659
],
5760

5861
directives: [
@@ -147,7 +150,7 @@ module.exports = function (ctx) {
147150
},
148151

149152
electron: {
150-
// bundler: 'builder', // or 'packager'
153+
bundler: 'builder', // or 'packager'
151154

152155
extendWebpack (cfg) {
153156
// do something with Electron main process Webpack cfg

src/components/ComponentDisplay.vue

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
:w="componentData.w"
1010
:h="componentData.h"
1111
:parent="true"
12+
class-name-resizable="my-resizable-class"
1213
@activated="onActivated(componentData)"
1314
@deactivated="onDeactivated(componentData)"
1415
@dragging="onDrag"
1516
@resizing="onResize"
16-
@dblclick.native="onDoubleClick(componentData)"
1717
>
1818
<h3>{{ componentData.componentName }}</h3>
1919
</VueDraggableResizable>
@@ -22,6 +22,7 @@
2222
<script>
2323
import { mapState, mapActions } from 'vuex'
2424
import VueDraggableResizable from 'vue-draggable-resizable'
25+
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
2526
2627
export default {
2728
name: 'ComponentDisplay',
@@ -59,7 +60,7 @@ export default {
5960
}
6061
},
6162
methods: {
62-
...mapActions(['setActiveComponent', 'updateOpenModal']),
63+
...mapActions(['setActiveComponent']),
6364
onResize: function (x, y, width, height) {
6465
this.activeComponentData.x = x
6566
this.activeComponentData.y = y
@@ -76,26 +77,54 @@ export default {
7677
},
7778
onDeactivated () {
7879
this.activeComponentData.isActive = false
79-
},
80-
onDoubleClick (compData) {
81-
this.setActiveComponent(compData.componentName)
82-
this.activeComponentData.isActive = true
8380
}
81+
// @dblclick.native="onDoubleClick(componentData)"
82+
// onDoubleClick (compData) {
83+
// this.setActiveComponent(compData.componentName)
84+
// this.activeComponentData.isActive = true
85+
// }
8486
}
8587
}
8688
</script>
8789

8890
<style scoped>
8991
.component-display {
90-
border: 2px dotted rgb(14, 14, 14);
91-
background-color: rgba(242, 234, 228, 0.61);
92-
height: 70vh;
93-
width: 70vw;
92+
/* border: 3px dashed rgb(159, 122, 122); */
93+
/* height: 500px; */
94+
/* width: 500px; */
95+
/* original is 70vh */
96+
height: 87vh;
97+
width: 100vw;
9498
position: relative;
99+
background-color: rgba(124, 126, 145, 0.44);
100+
/* background-color: #269; */
101+
background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
102+
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
103+
background-image: -webkit-linear-gradient(white 2px, transparent 2px),
104+
-webkit-linear-gradient(0, white 2px, transparent 2px),
105+
-webkit-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
106+
-webkit-linear-gradient(0, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
107+
background-image: -moz-linear-gradient(white 2px, transparent 2px),
108+
-moz-linear-gradient(0, white 2px, transparent 2px),
109+
-moz-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
110+
-moz-linear-gradient(0, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
111+
background-image: linear-gradient(white 2px, transparent 2px),
112+
linear-gradient(90deg, white 2px, transparent 2px),
113+
linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
114+
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
115+
-pie-background: linear-gradient(white 2px, transparent 2px) -2px -2px / 100px,
116+
linear-gradient(90deg, white 2px, transparent 2px) -2px -2px / 100px,
117+
linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px) -1px -1px /
118+
20px,
119+
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px) -1px -1px /
120+
20px,
121+
#269;
122+
behavior: url(/pie/PIE.htc);
95123
}
96124
97125
.component-box {
98126
color: white;
99-
border: 1px solid salmon;
127+
border: 3px dashed rgb(227, 203, 71);
128+
background-color: rgba(186, 99, 99, 0.529);
100129
}
101130
</style>

src/components/CreateComponent.vue

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,23 @@
1616
<div class="icon-container">
1717
<Icons @getClickedIcon="addToSelectedElementList" />
1818
</div>
19-
<!-- <ChildrenMultiselect /> -->
19+
<ParentMultiselect />
2020
<br />
21-
<!-- <button
22-
class="button is-primary"
23-
id="add-component-btn"
24-
@click="handleClick"
25-
:disabled="!componentNameInputValue"
26-
>Add Component</button> -->
2721
<q-btn id="add-component-btn" class="primary" color="secondary" label="Create Component" icon-right="add" @click="handleClick" :disabled="!componentNameInputValue" />
2822
</div>
2923
</template>
3024

3125
<script>
3226
import Icons from './Icons'
33-
// import ChildrenMultiselect from '@/components/ChildrenMultiselect';
27+
import ParentMultiselect from '../components/ParentMultiselect'
3428
import { mapState, mapActions } from 'vuex'
3529
// import * as types from '../store/types.js'
3630
3731
export default {
3832
name: 'HomeSidebar',
3933
components: {
40-
// ChildrenMultiselect,
41-
Icons
34+
Icons,
35+
ParentMultiselect
4236
},
4337
computed: {
4438
...mapState(['componentMap', 'selectedElementList']),

src/components/Footer.vue

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<template>
2+
<q-footer reveal elevated class="gradient text-white" :style="{ height: `${height}vh` }">
3+
<q-toolbar>
4+
<q-btn flat color="subaccentbtn" round @click="openBottomDrawer">
5+
<i :class="[open ? down : up]"></i>
6+
</q-btn>
7+
<q-toolbar-title>Dashboard</q-toolbar-title>
8+
</q-toolbar>
9+
<q-card>
10+
<q-tabs
11+
v-model="tab"
12+
dense
13+
class="bg-subaccent text-white"
14+
active-color="secondary"
15+
indicator-color="secondary"
16+
align="left"
17+
>
18+
<q-tab name="code" label="Code" />
19+
<q-tab name="tree" label="Tree" />
20+
<q-tab name="html" label="HTML Elements" />
21+
</q-tabs>
22+
23+
<q-tab-panels v-model="tab" animated class="bg-primary text-white">
24+
<q-tab-panel name="code">
25+
<div class="text-h6">Code Snippet</div>Code Snippet Component Here
26+
<br />asdfadsfasdf
27+
</q-tab-panel>
28+
29+
<q-tab-panel name="tree">
30+
<div class="text-h6">Tree</div>Tree Component Here
31+
</q-tab-panel>
32+
33+
<q-tab-panel name="html">
34+
<div class="text-h6">HTML Elements</div>HTML Element Component Here
35+
</q-tab-panel>
36+
</q-tab-panels>
37+
</q-card>
38+
</q-footer>
39+
</template>
40+
41+
<script>
42+
export default {
43+
data () {
44+
return {
45+
tab: 'code',
46+
open: true,
47+
height: 35,
48+
up: 'fas fa-chevron-up',
49+
down: 'fas fa-chevron-down'
50+
}
51+
},
52+
methods: {
53+
openBottomDrawer () {
54+
this.height === 35 ? (this.height = 6.5) : (this.height = 35)
55+
this.open === true ? this.open = false : this.open = true
56+
}
57+
}
58+
}
59+
</script>
60+
61+
<style lang="stylus">
62+
.q-footer {
63+
// height: 35vh;
64+
transition-timing-function: ease-in;
65+
transition: 0.2s;
66+
}
67+
68+
.q-tab-panel {
69+
background: #454d66;
70+
}
71+
72+
.q-tab-panels {
73+
background: yellow;
74+
height: 100%;
75+
}
76+
77+
.q-tabs {
78+
background: #2c384d;
79+
}
80+
</style>

src/components/FooterTabView.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<q-tabs
44
v-model="tab"
55
dense
6-
class="text-grey"
7-
active-color="primary"
6+
class="text-white"
7+
active-color="secondary"
88
indicator-color="primary"
99
align="justify"
1010
narrow-indicator
@@ -18,7 +18,10 @@
1818
<q-list>
1919
<q-tab-panels v-model="tab" animated>
2020
<q-tab-panel name="Tree">
21-
<div class="text-h6">Tree</div>Lorem ipsum dolor sit amet consectetur adipisicing elit.
21+
<div class="text-h6">Tree</div>
22+
<q-card>
23+
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
24+
</q-card>
2225
</q-tab-panel>
2326

2427
<q-tab-panel name="Code">
@@ -35,6 +38,7 @@
3538

3639
<script>
3740
export default {
41+
name: 'FooterTabView.vue',
3842
data () {
3943
return {
4044
tab: 'tree'

src/components/HomeSideDropDown.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
-->
2323
<a v-for="componentData in activeRouteDisplay"
2424
:key="componentData.componentName"
25+
v-on:click="onActivated(componentData)"
2526
>
2627
<q-list bordered separator>
2728
<q-item clickable v-ripple>
@@ -96,7 +97,7 @@
9697
</template>
9798
<script>
9899
import RouteDisplay from '../components/RouteDisplay'
99-
import { mapState } from 'vuex'
100+
import { mapState, mapActions } from 'vuex'
100101
101102
export default {
102103
components: {
@@ -108,8 +109,22 @@ export default {
108109
activeRouteDisplay () {
109110
// console.log('active route array method', this.routes[this.activeRoute])
110111
let component = this.routes[this.activeRoute]
111-
console.log('component:', component)
112+
// console.log('component:', component)
112113
return component
114+
},
115+
activeComponentData () {
116+
// find out what this does
117+
return this.activeRouteDisplay.filter(componentData => {
118+
return componentData.componentName === this.activeComponent
119+
})[0]
120+
}
121+
},
122+
methods: {
123+
...mapActions(['setActiveComponent']),
124+
onActivated (componentData) {
125+
this.setActiveComponent(componentData.componentName)
126+
this.activeComponentData.isActive = true
127+
console.log('this.activeComponent', this.activeComponent)
113128
}
114129
}
115130
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<ul id="comp-list" class="component-list">
3+
<h3>hello world</h3>
4+
<li
5+
v-for="item in componentMap"
6+
:key="item.indexOf()"
7+
class="component-container"
8+
>{{ component }} </li>
9+
</ul>
10+
</template>
11+
12+
<script>
13+
import { mapState } from 'vuex'
14+
15+
export default {
16+
el: '#comp-list',
17+
computed: {
18+
...mapState(['componentMap']),
19+
componentMap () {
20+
return Object.keys(this.componentMap)
21+
}
22+
}
23+
}
24+
</script>
25+
26+
<style>
27+
</style>

0 commit comments

Comments
 (0)