add wait cursor when system is loading

This commit is contained in:
Xuan Sang LE
2020-05-21 13:10:35 +02:00
parent a3960766d1
commit 52ac96c18a
2 changed files with 7 additions and 6 deletions

View File

@ -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%"