1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-03-05 17:44:21 +08:00
parent 476880c344
commit 39518a878c
2 changed files with 11 additions and 2 deletions

View File

@ -164,6 +164,8 @@ const (
USR_ICONS_CONTEXTS = "usr/icons/contexts.jpg" USR_ICONS_CONTEXTS = "usr/icons/contexts.jpg"
USR_ICONS_ICEBERGS = "usr/icons/icebergs.png" USR_ICONS_ICEBERGS = "usr/icons/icebergs.png"
USR_ICONS_VOLCANOS = "usr/icons/volcanos.png" USR_ICONS_VOLCANOS = "usr/icons/volcanos.png"
USR_ICONS = "usr/icons/"
USR_LOCAL_IMAGE = "usr/local/image/"
TYPE_ALL = "all" TYPE_ALL = "all"
TYPE_BIN = "bin" TYPE_BIN = "bin"

View File

@ -21,7 +21,12 @@ func init() {
ice.CTX_OPEN: {Hand: func(m *ice.Message, arg ...string) { ice.CTX_OPEN: {Hand: func(m *ice.Message, arg ...string) {
if m.Cmd(DESKTOP).Length() == 0 { if m.Cmd(DESKTOP).Length() == 0 {
DeskAppend(m, "Books.png", web.WIKI_WORD) DeskAppend(m, "Books.png", web.WIKI_WORD)
DeskAppend(m, "Photos.png", web.WIKI_FEEL) if nfs.Exists(m, nfs.USR_LOCAL_IMAGE) {
DeskAppend(m, "Photos.png", web.WIKI_FEEL, ctx.ARGS, nfs.USR_LOCAL_IMAGE)
} else {
DeskAppend(m, "Photos.png", web.WIKI_FEEL, ctx.ARGS, nfs.USR_ICONS)
}
DeskAppend(m, "Grapher.png", web.WIKI_DRAW) DeskAppend(m, "Grapher.png", web.WIKI_DRAW)
DeskAppend(m, "Calendar.png", web.TEAM_PLAN) DeskAppend(m, "Calendar.png", web.TEAM_PLAN)
DeskAppend(m, "Messages.png", web.CHAT_MESSAGE) DeskAppend(m, "Messages.png", web.CHAT_MESSAGE)
@ -52,4 +57,6 @@ func init() {
}) })
} }
func DeskAppend(m *ice.Message, icon, index string) { install(m, DESKTOP, icon, index) } func DeskAppend(m *ice.Message, icon, index string, arg ...string) {
install(m, DESKTOP, icon, index, arg...)
}