mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-26 09:28:21 +01:00
add wait cursor when system is loading
This commit is contained in:
parent
a3960766d1
commit
52ac96c18a
@ -58,7 +58,7 @@ class MarketPlace extends this.OS.GUI.BaseApplication
|
||||
.then () => @notify __("Package updated")
|
||||
.catch (e) => @error e.toString(), e
|
||||
@remoteInstall()
|
||||
.then () => @notify __("Package installed")
|
||||
.then (n) => @notify __("Package installed: {0}", n)
|
||||
.catch (e) => @error e.toString(), e
|
||||
|
||||
@btremove.set "onbtclick", (e) =>
|
||||
@ -195,8 +195,8 @@ class MarketPlace extends this.OS.GUI.BaseApplication
|
||||
data: @systemsetting.system.repositories
|
||||
}
|
||||
when "install"
|
||||
@localInstall().then () =>
|
||||
@notify __("Package installed")
|
||||
@localInstall().then (n) =>
|
||||
@notify __("Package installed: {0}", n)
|
||||
.catch (e) => @error __("Unable to install package"), e
|
||||
else
|
||||
|
||||
@ -210,7 +210,7 @@ class MarketPlace extends this.OS.GUI.BaseApplication
|
||||
@_api.blob app.download
|
||||
.then (data) =>
|
||||
@install data, app
|
||||
.then () -> resolve()
|
||||
.then (n) -> resolve(n)
|
||||
.catch (e) -> reject(e)
|
||||
.catch (e) -> reject e
|
||||
|
||||
@ -229,7 +229,7 @@ class MarketPlace extends this.OS.GUI.BaseApplication
|
||||
idx = apps.indexOf n
|
||||
if idx >= 0
|
||||
@applist.set "selected", idx
|
||||
resolve()
|
||||
resolve(n)
|
||||
.catch (e) -> reject(e)
|
||||
.catch (e) -> reject e
|
||||
.catch (e) -> reject e
|
||||
@ -269,7 +269,6 @@ class MarketPlace extends this.OS.GUI.BaseApplication
|
||||
v.iconclass = "fa fa-adn" unless v.iconclass or v.icon
|
||||
v.path = pth
|
||||
@systemsetting.system.packages[v.app] = v
|
||||
@notify __("Application installed")
|
||||
@appDetail app_meta
|
||||
resolve(v.name)
|
||||
.catch (e) -> reject e
|
||||
|
@ -51,12 +51,14 @@ class PushNotification extends this.OS.GUI.BaseService
|
||||
|
||||
@subscribe "loading", (o) =>
|
||||
@pending.push o.id
|
||||
$(@_gui.workspace).css "cursor", "wait"
|
||||
@spin true
|
||||
|
||||
@subscribe "loaded", (o) =>
|
||||
i = @pending.indexOf o.id
|
||||
@pending.splice i, 1 if i >= 0
|
||||
@spin false if @pending.length is 0
|
||||
$(@_gui.workspace).css "cursor", "auto"
|
||||
|
||||
@nzone.set "height", "100%"
|
||||
@fzone.set "height", "100%"
|
||||
|
Loading…
Reference in New Issue
Block a user