Skip to content

Commit bf55aa9

Browse files
authored
Merge pull request #9 from deanfchung/electron
merge from electron to master
2 parents 3b7ac9a + 96a991b commit bf55aa9

15 files changed

+123
-99
lines changed

quasar.conf.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ module.exports = function (ctx) {
115115
// workboxPluginMode: 'InjectManifest',
116116
// workboxOptions: {}, // only for NON InjectManifest
117117
manifest: {
118-
// name: 'PreVue 2.0',
119-
// short_name: 'PreVue 2.0',
120-
// description: 'Vue Prototype DevTool',
118+
// name: 'Quasar App',
119+
// short_name: 'Quasar App',
120+
// description: 'A Quasar Framework app',
121121
display: 'standalone',
122122
orientation: 'portrait',
123123
background_color: '#ffffff',
@@ -158,7 +158,7 @@ module.exports = function (ctx) {
158158
},
159159

160160
electron: {
161-
bundler: 'builder', // or 'packager'
161+
// bundler: 'builder', // or 'packager'
162162

163163
extendWebpack (cfg) {
164164
// do something with Electron main process Webpack cfg
@@ -181,8 +181,8 @@ module.exports = function (ctx) {
181181
builder: {
182182
// https://www.electron.build/configuration/configuration
183183

184-
// appId: 'prevue2'
184+
// appId: 'quasar-example'
185185
}
186186
}
187187
}
188-
}
188+
}

src/components/CodeSnippet.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<template>
2-
<div>
2+
<div class="codesnippet-container">
33
<!-- <input type="checkbox" v-model="lineNumbers"> Linenumbers -->
4-
{{ `${activeComponent}.vue` }}
4+
<div class="top-p" v-if="activeComponent === ''" >Select a component</div>
5+
<div v-else >{{ `${activeComponent}.vue` }}</div>
56
<prism-editor
67
v-model="code"
78
language="js"
@@ -23,7 +24,7 @@ import 'vue-prism-editor/dist/VuePrismEditor.css'
2324
export default {
2425
data () {
2526
return {
26-
code: `Select a component`,
27+
code: `Your component boilerplate will be displayed here.`,
2728
lineNumbers: true,
2829
height: null
2930
}
@@ -44,12 +45,10 @@ export default {
4445
// calls createTemplate and createBoiler to generate snippet
4546
createCodeSnippet (componentName, children) {
4647
let result = `${this.createTemplate(componentName, children)}${this.createBoiler(componentName, children)}`
47-
//console.log(`createCodeSnippet result: ${result}`)
4848
return result
4949
},
5050
createTemplate (componentName, children) {
5151
let output = ``
52-
// let htmlArr = this.componentMap[compName].htmlList;
5352
output += ` <div>\n`
5453
children.forEach(name => {
5554
output += ` <${name}>\n </${name}>\n`
@@ -105,8 +104,6 @@ export default {
105104
106105
this.getWindowHeight()
107106
})
108-
// set code to this new string literal mofo
109-
// this.code = `${this.createCodeSnippet(this.activeComponent, this.componentMap[this.activeComponent].children)}`
110107
},
111108
// updates code snippet, but broken cause children undefined, shows `function () { [native code] }`
112109
updated () {
@@ -122,6 +119,13 @@ export default {
122119
<style lang="stylus" scoped>
123120
// resize handled by vue lifecycle methods
124121
.code-editor {
125-
font-size: 11px;
122+
font-size: 12px;
126123
}
124+
.codesnippet-container {
125+
margin-bottom: 1rem;
126+
}
127+
::-webkit-scrollbar {
128+
display: none;
129+
}
130+
127131
</style>

src/components/ComponentDisplay.vue

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
<div class="component-title">
1919
<p>{{ componentData.componentName }}</p>
2020
</div>
21-
<div class="component-children">
22-
<p># of children: {{ componentMap[componentData.componentName].children.length }} </p>
23-
<p>children: {{ componentMap[componentData.componentName].children }}</p>
21+
<ul class="component-children">
22+
<li># of children: {{ componentMap[componentData.componentName].children.length }} </li>
23+
<li>children: {{ componentMap[componentData.componentName].children }}</li>
2424
<!-- <p v-for="child in childList" :key="childList.indexOf(child)"> {{ child.text }}</p> -->
25-
</div>
26-
<q-menu context-menu>
27-
<q-list>
25+
</ul>
26+
<q-menu context-menu >
27+
<q-list class="menu">
2828
<q-item clickable v-ripple v-close-popup @click="handleAddChild">
2929
<q-item-section>Add Children</q-item-section>
3030
<q-item-section avatar><q-icon color="primary" name="add"/></q-item-section>
@@ -78,6 +78,7 @@ export default {
7878
window.addEventListener('keyup', event => {
7979
if (event.key === 'Backspace') {
8080
if (this.activeComponent && this.activeComponentData.isActive) {
81+
// console.log('this:', this)
8182
this.$store.dispatch('deleteActiveComponent')
8283
}
8384
}
@@ -179,13 +180,14 @@ export default {
179180
top: 0rem;
180181
left: 2px;
181182
color: black;
183+
list-style: none;
182184
}
183185
.component-display {
184186
/* border: 3px dashed rgb(159, 122, 122); */
185187
/* height: 500px; */
186188
/* width: 500px; */
187-
/* original is 70vh */
188-
height: 95vh;
189+
/* original is 70 */
190+
height: 90vh;
189191
width: 100%;
190192
position: relative;
191193
background: darkslategray;
@@ -214,16 +216,19 @@ export default {
214216
#269;
215217
behavior: url(/pie/PIE.htc);
216218
}
219+
.menu {
220+
margin-bottom: 0px !important;
221+
}
217222
.component-box {
218223
color: white;
219-
border: 1px dashed rgb(227, 203, 71);
220-
background-color: rgba(186, 99, 99, 0.529);
224+
border: 1.2px dashed rgb(231, 203, 75);
225+
background-color: rgba(172, 83, 83, 0.42);
221226
-webkit-transition: background-color 200ms linear;
222227
-ms-transition: background-color 200ms linear;
223228
transition: background-color 200ms linear;
224229
}
225230
.active {
226-
background-color: rgba(57, 63, 84, 0.5);
231+
background-color: rgba(105, 179, 190, 0.514);
227232
border: 1px dashed rgb(227, 203, 71);
228233
}
229234
</style>

src/components/CreateComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<br />
55
<form v-on:submit.prevent="handleClick" v-on:click="resetActiveComponent">
66
<q-input
7-
standout="secondary text-secondary"
7+
standout="bg-secondary text-white"
88
bottom-slots
99
v-model="componentNameInputValue"
1010
label="Component Name"

src/components/ExportProject.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!-- electron build
33
<q-btn class="glossy" color="secondary" label="Export Project" @click="exportProject"/>
44
-->
5-
<q-btn class="glossy" color="secondary" label="Export Project"/>
5+
<q-btn class=" export-btn" color="secondary" label="Export Project"/>
66
</template>
77

88
<script>

src/components/Footer.vue

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<q-footer reveal class="gradient text-white" :style="{ height: `${height}vh` }">
3-
<q-toolbar>
3+
<q-toolbar class="toolbar-background">
44
<q-btn flat color="subaccent" round @click="openBottomDrawer">
55
<i :class="[open ? down : up]" id="btn" ></i>
66
</q-btn>
7-
<q-toolbar-title>Dashboard</q-toolbar-title>
7+
<q-toolbar-title >Dashboard</q-toolbar-title>
88
</q-toolbar>
99
<q-card>
1010
<q-tabs
@@ -21,7 +21,7 @@
2121
<q-tab name="html" label="HTML Elements" id="label-text"/>
2222
</q-tabs>
2323

24-
<q-tab-panels v-model="tab" animated class="bg-primary text-white">
24+
<q-tab-panels v-model="tab" animated class="bg-primary text-white full-footer">
2525
<q-tab-panel name="code">
2626
<CodeSnippet />
2727
</q-tab-panel>
@@ -58,7 +58,7 @@ export default {
5858
return {
5959
tab: 'code',
6060
open: true,
61-
height: 35,
61+
height: 40,
6262
up: 'fas fa-chevron-up',
6363
down: 'fas fa-chevron-down'
6464
}
@@ -68,7 +68,7 @@ export default {
6868
// 15in mb pro - 1027 px 3.75
6969
// big ass screens 2.5
7070
let minHeight = (window.outerHeight < 900) ? 4.5 : (window.outerHeight < 1035) ? 3.75 : 2.5
71-
this.height === 35 ? (this.height = minHeight) : (this.height = 35)
71+
this.height === 40 ? (this.height = minHeight) : (this.height = 40)
7272
this.open === true ? this.open = false : this.open = true
7373
}
7474
}
@@ -80,7 +80,7 @@ i {
8080
font-size: 11px;
8181
}
8282
.q-btn {
83-
background: $secondary;
83+
// background: $secondary;
8484
font-size: 8px;
8585
margin: 5px;
8686
}
@@ -90,7 +90,7 @@ i {
9090
transition-timing-function: ease-in;
9191
transition: 0.2s;
9292
// background: #313131;
93-
background: black;
93+
background: #272822;
9494
}
9595
// changes the footer toolbar height
9696
.q-toolbar {
@@ -106,9 +106,9 @@ i {
106106
// this class selector does not change anything
107107
.q-tab__label {
108108
// font-size not changing
109-
font-size: 10px !important;
110-
line-height: 1.718em;
111-
font-weight: 500;
109+
font-size: 10px !important;
110+
line-height: 1.718em;
111+
font-weight: 500;
112112
}
113113
// changes the tab label styling
114114
#label-text {
@@ -124,9 +124,16 @@ i {
124124
// changes the length of the tab panels
125125
.q-tab-panels {
126126
height: 31vh;
127+
padding: 0px !important;
127128
}
128-
129129
.q-tabs {
130130
background: #11120F;
131131
}
132+
.toolbar-background {
133+
background: black;
134+
}
135+
.full-footer {
136+
// height: 100vh;
137+
padding-bottom: 0px;
138+
}
132139
</style>

src/components/HomeSideDropDownItems/ComponentList.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ export default {
4444
}
4545
},
4646
methods: {
47-
...mapActions(['setActiveComponent','deleteComponent']),
47+
...mapActions(['setActiveComponent','deleteComponent', 'deleteActiveComponent']),
4848
onActivated (componentData) {
4949
this.setActiveComponent(componentData.componentName)
5050
this.activeComponentData.isActive = true
5151
},
5252
handleClick (componentData) {
53-
this.deleteComponent(componentData)
54-
this.setActiveComponent('')
53+
54+
this.setActiveComponent(componentData.componentName)
55+
this.deleteActiveComponent(componentData.componentName)
56+
5557
}
5658
}
5759
}

src/components/OpenProjectComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<q-btn class="glossy mr-sm" color="secondary" label="Open Project"/>
2+
<q-btn class=" export-btn" color="secondary" label="Open Project"/>
33
<!--<q-btn class="glossy mr-sm" color="secondary" label="Open Project" @click="openProjectJSON"/>-->
44
</template>
55

src/components/RouteDisplay.vue

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
<template>
2-
<div>
3-
<q-input
4-
@keyup.enter.native="handleEnterKeyPress"
5-
standout="bg-secondary text-white"
6-
bottom-slots
7-
v-model="newRoute"
8-
label="Enter new route"
9-
:dense="dense"
10-
class="input-add"
11-
>
12-
</q-input>
13-
<!--<div class="route-display">-->
2+
<div>
3+
<q-input
4+
@keyup.enter.native="handleEnterKeyPress"
5+
standout="bg-secondary text-white"
6+
bottom-slots
7+
v-model="newRoute"
8+
label="Enter new route"
9+
:dense="dense"
10+
class="input-add"
11+
></q-input>
12+
<!--<div class="route-display">-->
1413
<!--
1514
1615
-->
@@ -19,34 +18,34 @@
1918
</template>
2019

2120
<script>
22-
import Routes from './Routes'
23-
import { mapState, mapActions } from 'vuex'
21+
import Routes from "./Routes";
22+
import { mapState, mapActions } from "vuex";
2423
2524
export default {
26-
name: 'RouteDisplay',
25+
name: "RouteDisplay",
2726
components: {
2827
Routes
2928
},
3029
computed: {
31-
...mapState(['routes'])
30+
...mapState(["routes"])
3231
},
33-
data () {
32+
data() {
3433
return {
35-
newRoute: ''
36-
}
34+
newRoute: ""
35+
};
3736
},
3837
methods: {
39-
...mapActions(['addRouteToRouteMap', 'setRoutes']),
40-
handleEnterKeyPress () {
38+
...mapActions(["addRouteToRouteMap", "setRoutes"]),
39+
handleEnterKeyPress() {
4140
this.addRouteToRouteMap(this.newRoute)
4241
.then(() => {
43-
this.newRoute = ''
42+
this.newRoute = "";
4443
})
4544
46-
.catch(err => console.log(err))
45+
.catch(err => console.log(err));
4746
}
4847
}
49-
}
48+
};
5049
</script>
5150

5251
<style scoped>

src/components/Routes.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22

3-
<div>
3+
<div class="home-sidebar">
44
<!--<div class="route-view">-->
55
<a
66
:class="route === activeRoute ? 'panel-block is-active' : 'panel-block'"

0 commit comments

Comments
 (0)