-
Notifications
You must be signed in to change notification settings - Fork 14
/
app.ts
50 lines (44 loc) · 1.19 KB
/
app.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import Vue from "vue";
import { Component } from "vue-property-decorator";
import Menu from "../component/menu.vue";
import DbInfo from "../component/db_info.vue";
import QueryExecutor from "../component/query_executor.vue";
import Start from "../component/start.vue";
import { vueEvent } from "../common_var";
import "../css/common.css";
import { Util } from "../util";
import { Config } from "jsstore";
import { EVENTS } from "../enums/events";
import { store } from "../store/store";
declare var ace;
ace.config.set("workerPath", "assets/scripts");
ace.config.set("themePath", "assets/scripts");
@Component({
components: {
Menu,
DbInfo,
QueryExecutor,
Start
}
})
export default class App extends Vue {
get isPageLoaded() {
return store.state.isPageLoaded;
}
constructor() {
super();
this.catchEvent();
this.setLogFromUrl();
}
setLogFromUrl() {
var log = Util.getParameterByName("log");
if (!Util.isNull(log)) {
Config.isLogEnabled = true;
}
}
private catchEvent() {
vueEvent.$on(EVENTS.OnError, errMessage => {
alert(errMessage);
});
}
}