diff --git a/src/config/config_ctrl.ts b/src/config/config_ctrl.ts index 6e125a4..49ee100 100644 --- a/src/config/config_ctrl.ts +++ b/src/config/config_ctrl.ts @@ -1,36 +1,13 @@ import template from './template.html'; -import { normalizeUrl } from '../utlis'; class ConfigCtrl { static template = template; appModel: any; - appEditCtrl: any; constructor() { if(this.appModel.jsonData === undefined) { this.appModel.jsonData = {}; } - - this.appEditCtrl.setPreUpdateHook(this.preUpdate.bind(this)); - this.appEditCtrl.setPostUpdateHook(this.postUpdate.bind(this)); - } - - preUpdate() { - this.normalizeUrl(); - return Promise.resolve(); - } - - postUpdate() { - // TODO: check whether hasticServerUrl is accessible - if(!this.appModel.enabled) { - return Promise.resolve(); - } - - return { message: 'Hastic app installed!' }; - } - - normalizeUrl() { - this.appModel.jsonData.hasticServerUrl = normalizeUrl(this.appModel.jsonData.hasticServerUrl); } } diff --git a/src/config/template.html b/src/config/template.html index 309c183..d3f5a12 100644 --- a/src/config/template.html +++ b/src/config/template.html @@ -1,12 +1 @@ -

Enter your Hastic config

-
-
- - -
-
+