Skip to content

Commit 9e66f50

Browse files
authored
Merge pull request #36 from drewngyen/master
Fixed some UI bugs
2 parents babec97 + a202fdb commit 9e66f50

12 files changed

+70
-55
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: 9 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,9 +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;
123+
}
124+
.codesnippet-container {
125+
margin-bottom: 1rem;
126126
}
127127
::-webkit-scrollbar {
128128
display: none;
129129
}
130+
130131
</style>

src/components/ComponentDisplay.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
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>
25+
</ul>
2626
<q-menu context-menu>
2727
<q-list>
2828
<q-item clickable v-ripple v-close-popup @click="handleAddChild">
@@ -179,13 +179,14 @@ export default {
179179
top: 0rem;
180180
left: 2px;
181181
color: black;
182+
list-style: none;
182183
}
183184
.component-display {
184185
/* border: 3px dashed rgb(159, 122, 122); */
185186
/* height: 500px; */
186187
/* width: 500px; */
187-
/* original is 70vh */
188-
height: 95vh;
188+
/* original is 70 */
189+
height: 90vh;
189190
width: 100%;
190191
position: relative;
191192
background: darkslategray;
@@ -217,13 +218,13 @@ export default {
217218
.component-box {
218219
color: white;
219220
border: 1px dashed rgb(227, 203, 71);
220-
background-color: rgba(186, 99, 99, 0.529);
221+
background-color: rgba(186, 99, 99, 0.420);
221222
-webkit-transition: background-color 200ms linear;
222223
-ms-transition: background-color 200ms linear;
223224
transition: background-color 200ms linear;
224225
}
225226
.active {
226-
background-color: rgba(57, 63, 84, 0.5);
227+
background-color: rgba(39, 78, 223, 0.3);
227228
border: 1px dashed rgb(227, 203, 71);
228229
}
229230
</style>

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

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'"

src/components/SaveProjectComponent.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="Save"/>
2+
<q-btn class=" export-btn" color="secondary" label="Save"/>
33
<!--<q-btn class="glossy mr-sm" color="secondary" label="Save" @click="saveProjectJSON"/> Uncomment and delete line above for electron build-->
44
</template>
55

src/css/app.styl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
main {
33
background: #f2f6f5;
44
overflow: auto;
5+
56
}
67
.gradient {
78
background: black;
89
// background: rgb(22,108,105);
910
// background: linear-gradient(36deg, rgba(22,108,105,1) 0%, rgba(20,32,23,1) 100%);
1011
}
12+
// ::-webkit-scrollbar {
13+
// width: 2px;
14+
// }

0 commit comments

Comments
 (0)