From 4d95c7758fc0de42189de6c17f205d86eeee90da Mon Sep 17 00:00:00 2001 From: rozetko Date: Mon, 4 Mar 2019 19:50:05 +0300 Subject: [PATCH] Fix app config --- src/config/config_ctrl.ts | 23 ----------------------- src/config/template.html | 13 +------------ 2 files changed, 1 insertion(+), 35 deletions(-) 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

-
-
- - -
-
+