mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
add some
This commit is contained in:
parent
1060a60a5e
commit
b2b4616ec1
@ -73,8 +73,6 @@ func _dream_list_icon(m *ice.Message) {
|
|||||||
return m.Spawn(kit.Dict(ice.MSG_USERPOD, m.Appendv(mdb.NAME)[index])).FileURI(value)
|
return m.Spawn(kit.Dict(ice.MSG_USERPOD, m.Appendv(mdb.NAME)[index])).FileURI(value)
|
||||||
} else if nfs.ExistsFile(m, value) {
|
} else if nfs.ExistsFile(m, value) {
|
||||||
return m.FileURI(value)
|
return m.FileURI(value)
|
||||||
} else {
|
|
||||||
return m.FileURI(nfs.USR_ICONS_ICEBERGS)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
@ -233,7 +231,7 @@ func init() {
|
|||||||
DREAM: {Name: "dream refresh", Help: "梦想家", Icon: "Launchpad.png", Role: aaa.VOID, Meta: kit.Dict(
|
DREAM: {Name: "dream refresh", Help: "梦想家", Icon: "Launchpad.png", Role: aaa.VOID, Meta: kit.Dict(
|
||||||
ice.CTX_TRANS, kit.Dict(html.INPUT, kit.Dict(WORKER, "空间", SERVER, "门户", ORIGIN, "主机")),
|
ice.CTX_TRANS, kit.Dict(html.INPUT, kit.Dict(WORKER, "空间", SERVER, "门户", ORIGIN, "主机")),
|
||||||
), Actions: ice.MergeActions(ice.Actions{
|
), Actions: ice.MergeActions(ice.Actions{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.AFTER_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
AddPortalProduct(m, "云空间", `
|
AddPortalProduct(m, "云空间", `
|
||||||
比虚拟机和容器,更加轻量,每个空间都是一个完整的系统,拥有各种软件与独立的环境。
|
比虚拟机和容器,更加轻量,每个空间都是一个完整的系统,拥有各种软件与独立的环境。
|
||||||
空间内所有的软件、配置、数据以源码库形式保存,每个空间都可以随时启动、停止、上传、下载、分享。
|
空间内所有的软件、配置、数据以源码库形式保存,每个空间都可以随时启动、停止、上传、下载、分享。
|
||||||
|
@ -13,15 +13,12 @@ const PRODUCT = "product"
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
PRODUCT: {Name: "product refresh", Help: "产品展示", Actions: mdb.HashAction(mdb.SHORT, "index", mdb.FIELD, "time,name,text,order,enable,index,args"), Hand: func(m *ice.Message, arg ...string) {
|
PRODUCT: {Name: "product refresh", Help: "产品展示", Actions: mdb.HashAction(mdb.SHORT, "index", mdb.FIELD, "time,name,text,order,disable,index,args"), Hand: func(m *ice.Message, arg ...string) {
|
||||||
mdb.HashSelect(m, arg...).SortInt(mdb.ORDER)
|
mdb.HashSelect(m, arg...).SortInt(mdb.ORDER)
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddPortalProduct(m *ice.Message, name, text string, order float64, arg ...string) {
|
func AddPortalProduct(m *ice.Message, name, text string, order float64, arg ...string) {
|
||||||
msg := m.Spawn()
|
m.Cmd("web.product", mdb.CREATE, mdb.NAME, name, mdb.TEXT, strings.TrimSpace(text), mdb.ORDER, order, ctx.INDEX, m.PrefixKey(), ctx.ARGS, kit.Format(arg))
|
||||||
m.GoSleep("300ms", func() {
|
|
||||||
msg.Cmd("web.product", mdb.CREATE, mdb.NAME, name, mdb.TEXT, strings.TrimSpace(text), mdb.ORDER, order, ctx.INDEX, msg.PrefixKey(), ctx.ARGS, kit.Format(arg))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ const STORE = "store"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
STORE: {Name: "store refresh", Help: "商店", Icon: "App Store.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
STORE: {Name: "store refresh", Help: "商店", Icon: "App Store.png", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.AFTER_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
AddPortalProduct(m, "云商店", `
|
AddPortalProduct(m, "云商店", `
|
||||||
每个用户都可以将自己的空间列表,以系统商店的方式分享给其它用户。
|
每个用户都可以将自己的空间列表,以系统商店的方式分享给其它用户。
|
||||||
同样的每个用户,也可以添加任意多个商店,直接将空间下载到本机使用。
|
同样的每个用户,也可以添加任意多个商店,直接将空间下载到本机使用。
|
||||||
|
15
conf.go
15
conf.go
@ -322,13 +322,14 @@ const ( // CTX
|
|||||||
CTX_SERVE = "serve"
|
CTX_SERVE = "serve"
|
||||||
CTX_CLOSE = "close"
|
CTX_CLOSE = "close"
|
||||||
|
|
||||||
CTX_INIT = "_init"
|
CTX_INIT = "_init"
|
||||||
CTX_EXIT = "_exit"
|
CTX_EXIT = "_exit"
|
||||||
CTX_OPEN = "_open"
|
CTX_OPEN = "_open"
|
||||||
CTX_TITLE = "_title"
|
CTX_TITLE = "_title"
|
||||||
CTX_TRANS = "_trans"
|
CTX_TRANS = "_trans"
|
||||||
CTX_ICONS = "_icons"
|
CTX_ICONS = "_icons"
|
||||||
CTX_STYLE = "_style"
|
CTX_STYLE = "_style"
|
||||||
|
AFTER_INIT = "afterInit"
|
||||||
)
|
)
|
||||||
const ( // LOG
|
const ( // LOG
|
||||||
LOG_CMDS = "cmds"
|
LOG_CMDS = "cmds"
|
||||||
|
@ -42,7 +42,7 @@ func init() {
|
|||||||
Notify(m, "usr/icons/Infomation.png", cli.RUNTIME, "系统启动成功", ctx.INDEX, cli.RUNTIME)
|
Notify(m, "usr/icons/Infomation.png", cli.RUNTIME, "系统启动成功", ctx.INDEX, cli.RUNTIME)
|
||||||
}},
|
}},
|
||||||
DESKTOP: {Help: "桌面", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
DESKTOP: {Help: "桌面", Role: aaa.VOID, Actions: ice.MergeActions(ice.Actions{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.AFTER_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
web.AddPortalProduct(m, "云桌面", `
|
web.AddPortalProduct(m, "云桌面", `
|
||||||
一款网页版的电脑桌面,打开网页即可随时随地的使用各种软件,
|
一款网页版的电脑桌面,打开网页即可随时随地的使用各种软件,
|
||||||
无论这些软件是运行在本机,还是远程,还是任何虚拟的空间,无论是内存还是磁盘。
|
无论这些软件是运行在本机,还是远程,还是任何虚拟的空间,无论是内存还是磁盘。
|
||||||
|
@ -75,7 +75,7 @@ const INNER = "inner"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
INNER: {Name: "inner path=src/ file=main.go line=1 auto", Help: "源代码", Role: aaa.VOID, Actions: ice.Actions{
|
INNER: {Name: "inner path=src/ file=main.go line=1 auto", Help: "源代码", Role: aaa.VOID, Actions: ice.Actions{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.AFTER_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
web.AddPortalProduct(m, "编辑器", `
|
web.AddPortalProduct(m, "编辑器", `
|
||||||
一款网页版的编辑器,打开网页即可随时随地的编程,
|
一款网页版的编辑器,打开网页即可随时随地的编程,
|
||||||
无论这些代码是保存在本机,还是远程,还是任何虚拟的空间,无论是内存还是磁盘。
|
无论这些代码是保存在本机,还是远程,还是任何虚拟的空间,无论是内存还是磁盘。
|
||||||
|
@ -69,7 +69,7 @@ const XTERM = "xterm"
|
|||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
XTERM: {Name: "xterm refresh", Help: "终端", Icon: "Terminal.png", Actions: ice.MergeActions(ice.Actions{
|
XTERM: {Name: "xterm refresh", Help: "终端", Icon: "Terminal.png", Actions: ice.MergeActions(ice.Actions{
|
||||||
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
ice.AFTER_INIT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
web.AddPortalProduct(m, "命令行", `
|
web.AddPortalProduct(m, "命令行", `
|
||||||
一款网页版的命令行,打开网页即可随时随地的敲命令,
|
一款网页版的命令行,打开网页即可随时随地的敲命令,
|
||||||
无论这些命令是运行在本机,还是远程,还是任何虚拟的空间,无论是内存还是磁盘。
|
无论这些命令是运行在本机,还是远程,还是任何虚拟的空间,无论是内存还是磁盘。
|
||||||
|
@ -140,7 +140,7 @@ open http://localhost:9020
|
|||||||
func _spark_product(m *ice.Message, arg ...string) {
|
func _spark_product(m *ice.Message, arg ...string) {
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
m.Cmd("web.product").Table(func(value ice.Maps) {
|
m.Cmd("web.product").Table(func(value ice.Maps) {
|
||||||
if value[mdb.ENABLE] == ice.TRUE {
|
if value[mdb.DISABLE] == ice.TRUE {
|
||||||
_spark_product(m, value[ctx.INDEX], value[mdb.NAME], value[mdb.TEXT])
|
_spark_product(m, value[ctx.INDEX], value[mdb.NAME], value[mdb.TEXT])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user