Skip to content

Commit be0b825

Browse files
committed
remove page
fix default values
1 parent 60b58bd commit be0b825

File tree

7 files changed

+178
-107
lines changed

7 files changed

+178
-107
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "anubias",
3-
"version": "0.0.3",
3+
"version": "0.1.0",
44
"private": true,
55
"description": "anubias desktop application",
66
"author": {

src/assets/css/style.css

+4
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,8 @@ label{
6161
}
6262
.nav-wrapper li.disabled:hover{
6363
background: transparent !important;
64+
}
65+
66+
.ajs-dialog{
67+
color: black;
6468
}

src/assets/json/defaults/defPage.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
2+
"type": "preloader",
23
"name": "page",
34
"scrollable": true,
45
"safeArea": false,
56
"bgColor": "Colors.transparent",
67
"padding": "15",
7-
"align": "center"
8+
"align": "center",
9+
"children": []
810
}

src/components/elements/PageElement.vue

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default {
2525
text-align: center;
2626
padding: 10px;
2727
min-width: 85px;
28+
position: relative;
2829
}
2930
3031
#page:hover{
+103-95
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,98 @@
11
<template>
22
<div id="property">
33
<table>
4-
<!-- <tr>-->
5-
<!-- <th>-->
6-
<!-- <label for="p1">-->
7-
<!-- Color-->
8-
<!-- </label>-->
9-
<!-- </th>-->
10-
<!-- <td>-->
11-
<!-- <input type="text" id="p1" value="red">-->
12-
<!-- </td>-->
13-
<!-- </tr>-->
14-
<!-- <tr>-->
15-
<!-- <th>-->
16-
<!-- <label for="p2">-->
17-
<!-- Text-->
18-
<!-- </label>-->
19-
<!-- </th>-->
20-
<!-- <td>-->
21-
<!-- <input type="text" value="title text here" id="p2">-->
22-
<!-- </td>-->
23-
<!-- </tr>-->
24-
<!-- <tr>-->
25-
<!-- <th>-->
26-
<!-- <label for="p3">-->
27-
<!-- Lock-->
28-
<!-- </label>-->
29-
<!-- </th>-->
30-
<!-- <td>-->
31-
<!-- <div class="switch">-->
32-
<!-- <label>-->
33-
<!-- <input type="checkbox">-->
34-
<!-- <span class="lever"></span>-->
35-
<!-- </label>-->
36-
<!-- </div>-->
37-
<!-- </td>-->
38-
<!-- </tr>-->
39-
<!-- <tr>-->
40-
<!-- <th>-->
41-
<!-- <label for="p4">-->
42-
<!-- Align-->
43-
<!-- </label>-->
44-
<!-- </th>-->
45-
<!-- <td>-->
46-
<!-- <select id="p4">-->
47-
<!-- <option value=""> left</option>-->
48-
<!-- <option value=""> center</option>-->
49-
<!-- <option value=""> right</option>-->
50-
<!-- </select>-->
51-
<!-- </td>-->
52-
<!-- </tr>-->
53-
<tr v-for="(p,k) in properties" :key="k" >
54-
<th>
55-
<label :for="k">
56-
{{k}}
57-
</label>
58-
</th>
59-
<td>
60-
<div v-if="k === 'hide' || k === 'safeArea' || k === 'scrollable'">
61-
<div class="switch">
62-
<label>
63-
<input type="checkbox" v-model="properties[k]">
64-
<span class="lever"></span>
65-
</label>
4+
<!-- <tr>-->
5+
<!-- <th>-->
6+
<!-- <label for="p1">-->
7+
<!-- Color-->
8+
<!-- </label>-->
9+
<!-- </th>-->
10+
<!-- <td>-->
11+
<!-- <input type="text" id="p1" value="red">-->
12+
<!-- </td>-->
13+
<!-- </tr>-->
14+
<!-- <tr>-->
15+
<!-- <th>-->
16+
<!-- <label for="p2">-->
17+
<!-- Text-->
18+
<!-- </label>-->
19+
<!-- </th>-->
20+
<!-- <td>-->
21+
<!-- <input type="text" value="title text here" id="p2">-->
22+
<!-- </td>-->
23+
<!-- </tr>-->
24+
<!-- <tr>-->
25+
<!-- <th>-->
26+
<!-- <label for="p3">-->
27+
<!-- Lock-->
28+
<!-- </label>-->
29+
<!-- </th>-->
30+
<!-- <td>-->
31+
<!-- <div class="switch">-->
32+
<!-- <label>-->
33+
<!-- <input type="checkbox">-->
34+
<!-- <span class="lever"></span>-->
35+
<!-- </label>-->
36+
<!-- </div>-->
37+
<!-- </td>-->
38+
<!-- </tr>-->
39+
<!-- <tr>-->
40+
<!-- <th>-->
41+
<!-- <label for="p4">-->
42+
<!-- Align-->
43+
<!-- </label>-->
44+
<!-- </th>-->
45+
<!-- <td>-->
46+
<!-- <select id="p4">-->
47+
<!-- <option value=""> left</option>-->
48+
<!-- <option value=""> center</option>-->
49+
<!-- <option value=""> right</option>-->
50+
<!-- </select>-->
51+
<!-- </td>-->
52+
<!-- </tr>-->
53+
<template v-for="(p,k) in properties" >
54+
55+
<tr v-if="k !== 'type' || k !== 'children'" :key="k">
56+
<th>
57+
<label :for="k">
58+
{{ k }}
59+
</label>
60+
</th>
61+
<td>
62+
<div v-if="k === 'hide' || k === 'safeArea' || k === 'scrollable'">
63+
<div class="switch">
64+
<label>
65+
<input type="checkbox" v-model="properties[k]">
66+
<span class="lever"></span>
67+
</label>
68+
</div>
69+
</div>
70+
<div v-else-if="k === 'name'">
71+
<input type="text" @blur="nameCheck($event,true)" @keyup="nameCheck($event,false)" :id="k"
72+
v-model="properties[k]">
73+
</div>
74+
<div v-else-if="k === 'align'">
75+
<select v-model="properties[k]" :id="k">
76+
<option value="left"> left</option>
77+
<option value="center"> center</option>
78+
<option value="right"> right</option>
79+
</select>
80+
</div>
81+
<div v-else-if="k.toLowerCase().indexOf('color') !== -1">
82+
<select v-model="properties[k]" :id="k">
83+
<option :value="cl.value" v-for="(cl,n) in colors" class="ui dropdown" v-bind:key="n"
84+
:style="'background:'+cl.color + (['white','transparent','yellow','lime','grey','default'].indexOf(cl.name) > -1?';color:black;':'')">
85+
{{ cl.name }}
86+
</option>
87+
</select>
6688
</div>
67-
</div>
68-
<div v-else-if="k === 'name'">
69-
<input type="text" @blur="nameCheck($event,true)" @keyup="nameCheck($event,false)" :id="k" v-model="properties[k]">
70-
</div>
71-
<div v-else-if="k === 'align'">
72-
<select v-model="properties[k]" :id="k">
73-
<option value="left"> left </option>
74-
<option value="center"> center </option>
75-
<option value="right"> right </option>
76-
</select>
77-
</div>
78-
<div v-else-if="k.toLowerCase().indexOf('color') !== -1">
79-
<select v-model="properties[k]" :id="k">
80-
<option :value="cl.value" v-for="(cl,n) in colors" class="ui dropdown" v-bind:key="n"
81-
:style="'background:'+cl.color + (['white','transparent','yellow','lime','grey','default'].indexOf(cl.name) > -1?';color:black;':'')"> {{cl.name}} </option>
82-
</select>
83-
</div>
84-
<div v-else>
85-
<input type="text" :id="k" v-model="properties[k]">
86-
</div>
87-
</td>
88-
</tr>
89+
<div v-else>
90+
<input type="text" :id="k" v-model="properties[k]">
91+
</div>
92+
</td>
93+
</tr>
94+
</template>
95+
8996
</table>
9097
</div>
9198
</template>
@@ -95,27 +102,27 @@ export default {
95102
name: "PropertyElement",
96103
mounted() {
97104
},
98-
data:function () {
105+
data: function () {
99106
return {
100107
colors: window.colors,
101108
}
102109
},
103-
props:{
110+
props: {
104111
properties: {
105112
default: function () {
106113
return {}
107114
},
108115
type: Object
109116
}
110-
},methods:{
111-
nameCheck:function (e,isBlur) {
117+
}, methods: {
118+
nameCheck: function (e, isBlur) {
112119
let name = e.target.value;
113-
if (!/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name)){
120+
if (!/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name)) {
114121
e.target.classList.add('invalid');
115-
}else {
122+
} else {
116123
e.target.classList.remove('invalid');
117124
}
118-
if(isBlur){
125+
if (isBlur) {
119126
e.target.focus();
120127
}
121128
}
@@ -124,9 +131,10 @@ export default {
124131
</script>
125132

126133
<style scoped>
127-
#property{
134+
#property {
128135
overflow-x: hidden;
129136
}
137+
130138
table {
131139
width: 100%;
132140
overflow: hidden;
@@ -139,14 +147,14 @@ th {
139147
border-bottom: 0;
140148
font-weight: normal;
141149
font-size: 12px;
142-
padding: 0 ;
150+
padding: 0;
143151
margin: 0;
144152
}
145153
146154
td {
147155
border: 1px solid rgba(0, 0, 0, 0.2);
148156
border-bottom: 0;
149-
padding: 0 ;
157+
padding: 0;
150158
margin: 0;
151159
}
152160
@@ -183,7 +191,7 @@ input[type='checkbox'] {
183191
width: auto !important;
184192
}
185193
186-
label{
194+
label {
187195
display: block;
188196
}
189197
</style>

src/components/elements/Simulator.vue

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<template>
2+
<div>
3+
simulate
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: "Simulator"
10+
}
11+
</script>
12+
13+
<style scoped>
14+
15+
</style>

0 commit comments

Comments
 (0)