mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-28 10:18:21 +01:00
add user service
This commit is contained in:
parent
0578f41c9c
commit
4116573c71
@ -376,6 +376,7 @@ self.OS.GUI =
|
|||||||
# TODO: get services list from user setting
|
# TODO: get services list from user setting
|
||||||
_GUI.pushServices [
|
_GUI.pushServices [
|
||||||
"CoreServices/PushNotification",
|
"CoreServices/PushNotification",
|
||||||
|
"CoreServices/UserService",
|
||||||
"CoreServices/Spotlight",
|
"CoreServices/Spotlight",
|
||||||
"CoreServices/Calendar"
|
"CoreServices/Calendar"
|
||||||
]
|
]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
coffee_files = Calendar.coffee PushNotification.coffee Spotlight.coffee
|
coffee_files = Calendar.coffee PushNotification.coffee Spotlight.coffee UserService.coffee
|
||||||
|
|
||||||
jsfiles =
|
jsfiles =
|
||||||
|
|
||||||
|
26
src/packages/CoreServices/UserService.coffee
Normal file
26
src/packages/CoreServices/UserService.coffee
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
class UserService extends this.OS.GUI.BaseService
|
||||||
|
constructor: (args) ->
|
||||||
|
super "UserService", args
|
||||||
|
@text =@systemsetting.user.username
|
||||||
|
@iconclass = undefined
|
||||||
|
init: ->
|
||||||
|
me = @
|
||||||
|
@child = [
|
||||||
|
{
|
||||||
|
text: "About", dataid: "user-about",
|
||||||
|
iconclass: "fa fa-user-circle-o"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Logout", dataid: "sys-logout",
|
||||||
|
iconclass: "fa fa-user-times"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
@onmenuselect = (d) ->
|
||||||
|
return me._api.handler.logout() if d.item.data.dataid is "sys-logout"
|
||||||
|
me.notify "This feature is not implemented yet"
|
||||||
|
awake: (e) ->
|
||||||
|
|
||||||
|
cleanup: (evt) ->
|
||||||
|
|
||||||
|
|
||||||
|
this.OS.register "UserService",UserService
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"app":null,
|
"app":null,
|
||||||
"services": [ "Calendar", "PushNotification", "Spotlight" ],
|
"services": [ "Calendar", "PushNotification", "Spotlight", "UserService" ],
|
||||||
"name":"CoreServices",
|
"name":"CoreServices",
|
||||||
"description":"This is the core services",
|
"description":"This is the core services",
|
||||||
"info":{
|
"info":{
|
||||||
|
Loading…
Reference in New Issue
Block a user