Skip to content

Commit fef0a52

Browse files
committed
fix some bugs
1 parent 662acc3 commit fef0a52

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
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.6.0",
3+
"version": "0.6.1",
44
"private": false,
55
"description": "anubias desktop application",
66
"author": {

src/App.vue

+8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ export default {
3232
// go to verify
3333
self.$router.push('/projectLoaded');
3434
});
35+
36+
window.api.receive('build-success', (data) => {
37+
if (data && window.ide.isDebuging) {
38+
window.alertify.success('Hot reload! 🔥');
39+
window.api.send("update-project", {});
40+
}
41+
});
42+
3543
// get message receive command send by electron
3644
window.api.receive("message", (data) => {
3745
switch (data.type) {

src/assets/js/winVars.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
window.ide = {
66
majorVersion: 0,
77
minorVersion: 6,
8-
patchVersion: 0,
8+
patchVersion: 1,
99
version:function () {
1010
return this.majorVersion + '.' + this.minorVersion + '.' + this.patchVersion;
11-
}
11+
},
12+
isDebuging: false,
13+
isInitReload: false,
1214
};
1315
/**
1416
* sample application date

src/components/elements/AppMenuElement.vue

+8-14
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default {
129129
data: function () {
130130
return {
131131
appData: window.appData,
132-
startDebug: false,
132+
startDebug: window.ide.isDebuging,
133133
}
134134
},
135135
mounted() {
@@ -170,22 +170,15 @@ export default {
170170

171171
});
172172

173-
window.api.receive('build-success', (data) => {
174-
if(data && self.startDebug){
175-
window.alertify.success('Hot reload! 🔥');
176-
window.api.send("update-project", {});
177-
}
178-
});
179-
180173
}, methods: {
181-
hotReload:function () {
182-
if (!this.startDebug){
174+
hotReload: function () {
175+
if (!this.startDebug) {
183176
window.alertify.warning('Hot reload failed');
184-
}else{
177+
} else {
185178
this.save();
186179
let data = {
187180
isUpdate: true,
188-
command: './anubias-engine build ' + window.project.file ,
181+
command: './anubias-engine build ' + window.project.file,
189182
}
190183
window.api.send("command", data);
191184
}
@@ -203,10 +196,11 @@ export default {
203196
return false;
204197
}
205198
this.$parent.TerminalShow();
206-
this.startDebug= true;
199+
this.startDebug = true;
200+
window.ide.isDebuging = true;
207201
let data = {
208202
isDebug: true,
209-
command: './anubias-engine build ' + window.project.file +' && cd build && flutter run' ,
203+
command: './anubias-engine build ' + window.project.file + ' && cd build && flutter run',
210204
}
211205
window.api.send("command", data);
212206
},

src/components/elements/Simulator.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div v-if="type === 'appbar'">
99
<appbar :properties="properties" :scale="scale" :page="page"></appbar>
1010
</div>
11-
<div v-if="type === 'text'">
11+
<div v-if="type === 'text'" :style="properties.align == 'null'? 'text-align:'+page.align:''">
1212
<txt :properties="properties" :scale="scale" :page="page"></txt>
1313
</div>
1414
<div v-if="type === 'icon'">

src/components/pages/ProjectPage.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
<script>
6565
import titlec from '../elements/TitleElement';
66-
66+
// import {fnc} from '@/assets/js/functions';
6767
export default {
6868
name: "ProjectPage",
6969
data: function () {

0 commit comments

Comments
 (0)