From 39eca2c53df01cf3a774799b35d2290c72ead8f6 Mon Sep 17 00:00:00 2001 From: Xuan Sang LE Date: Mon, 19 Feb 2018 23:22:30 +0100 Subject: [PATCH] safari bug when booting --- src/core/gui.coffee | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/core/gui.coffee b/src/core/gui.coffee index b41e81c..3263b76 100644 --- a/src/core/gui.coffee +++ b/src/core/gui.coffee @@ -107,20 +107,21 @@ self.OS.GUI = js = path + "/main.js" js.asFileHandler().read (d) -> - #load css file - css = "#{path}/main.css" - css.asFileHandler().onready (d) -> - el = $ '', { rel: 'stylesheet', type: 'text/css', 'href': "#{_API.handler.get}/#{css}" } - .appendTo 'head' - _OS.APP[app].style = el[0] if _OS.APP[app] - , () -> - #launch # load app meta data "#{path}/package.json".asFileHandler().read (data) -> data.path = path _OS.APP[app].meta = data if _OS.APP[app] _OS.APP[v].meta = data for v in data.services if data.services - ok app + #load css file + css = "#{path}/main.css" + css.asFileHandler().onready (d) -> + el = $ '', { rel: 'stylesheet', type: 'text/css', 'href': "#{_API.handler.get}/#{css}" } + .appendTo 'head' + _OS.APP[app].style = el[0] if _OS.APP[app] + ok app + , () -> + #launch + ok app , "json" #ok app , "script"