forked from x/icebergs
add some
This commit is contained in:
parent
ca6dc0f3c0
commit
248258d71d
@ -51,7 +51,7 @@ func init() {
|
|||||||
m.Push(arg[0], m.Option(ice.MSG_USERNAME))
|
m.Push(arg[0], m.Option(ice.MSG_USERNAME))
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
mdb.CREATE: {Name: "create usernick username* userrole=void,tech userzone", Hand: func(m *ice.Message, arg ...string) {
|
mdb.CREATE: {Name: "create usernick username* userrole=void,tech userzone language", Hand: func(m *ice.Message, arg ...string) {
|
||||||
_user_create(m, m.Option(USERNAME), m.OptionSimple(USERNICK, USERROLE, USERZONE, LANGUAGE, EMAIL, BACKGROUND, AVATAR)...)
|
_user_create(m, m.Option(USERNAME), m.OptionSimple(USERNICK, USERROLE, USERZONE, LANGUAGE, EMAIL, BACKGROUND, AVATAR)...)
|
||||||
}},
|
}},
|
||||||
}, mdb.ImportantHashAction(mdb.SHORT, USERNAME, mdb.FIELD, "time,usernick,username,userrole,userzone,language"))},
|
}, mdb.ImportantHashAction(mdb.SHORT, USERNAME, mdb.FIELD, "time,usernick,username,userrole,userzone,language"))},
|
||||||
@ -83,13 +83,14 @@ func UserZone(m *ice.Message, username ice.Any) (zone string) {
|
|||||||
return UserInfo(m, username, USERZONE, ice.MSG_USERZONE)
|
return UserInfo(m, username, USERZONE, ice.MSG_USERZONE)
|
||||||
}
|
}
|
||||||
func UserRoot(m *ice.Message, arg ...string) *ice.Message {
|
func UserRoot(m *ice.Message, arg ...string) *ice.Message {
|
||||||
|
language := kit.Select("", arg, 4)
|
||||||
userzone := kit.Select("", arg, 3)
|
userzone := kit.Select("", arg, 3)
|
||||||
userrole := kit.Select(ROOT, arg, 2)
|
userrole := kit.Select(ROOT, arg, 2)
|
||||||
username := kit.Select(ice.Info.Username, arg, 1)
|
username := kit.Select(ice.Info.Username, arg, 1)
|
||||||
usernick := kit.Select(UserNick(m, username), arg, 0)
|
usernick := kit.Select(UserNick(m, username), arg, 0)
|
||||||
if len(arg) > 0 {
|
if len(arg) > 0 {
|
||||||
ice.Info.Username = username
|
ice.Info.Username = username
|
||||||
m.Cmd(USER, mdb.CREATE, usernick, username, userrole, userzone)
|
m.Cmd(USER, mdb.CREATE, usernick, username, userrole, userzone, language)
|
||||||
}
|
}
|
||||||
return SessAuth(m, kit.Dict(USERNICK, usernick, USERNAME, username, USERROLE, userrole))
|
return SessAuth(m, kit.Dict(USERNICK, usernick, USERNAME, username, USERROLE, userrole))
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,9 @@ import (
|
|||||||
|
|
||||||
func _serve_address(m *ice.Message) string { return HostPort(m, tcp.LOCALHOST, m.Option(tcp.PORT)) }
|
func _serve_address(m *ice.Message) string { return HostPort(m, tcp.LOCALHOST, m.Option(tcp.PORT)) }
|
||||||
func _serve_start(m *ice.Message) {
|
func _serve_start(m *ice.Message) {
|
||||||
kit.If(m.Option(aaa.USERNAME), func() { aaa.UserRoot(m, m.Option(aaa.USERNICK), m.Option(aaa.USERNAME)) })
|
kit.If(m.Option(aaa.USERNAME), func() {
|
||||||
|
aaa.UserRoot(m, m.Option(aaa.USERNICK), m.Option(aaa.USERNAME), "", ice.DEV, m.Option(aaa.LANGUAGE))
|
||||||
|
})
|
||||||
kit.If(m.Option(tcp.PORT) == tcp.RANDOM, func() { m.Option(tcp.PORT, m.Cmdx(tcp.PORT, aaa.RIGHT)) })
|
kit.If(m.Option(tcp.PORT) == tcp.RANDOM, func() { m.Option(tcp.PORT, m.Cmdx(tcp.PORT, aaa.RIGHT)) })
|
||||||
cli.NodeInfo(m, kit.Select(kit.Split(ice.Info.Hostname, nfs.PT)[0], m.Option(tcp.NODENAME)), SERVER)
|
cli.NodeInfo(m, kit.Select(kit.Split(ice.Info.Hostname, nfs.PT)[0], m.Option(tcp.NODENAME)), SERVER)
|
||||||
m.Go(func() {
|
m.Go(func() {
|
||||||
|
@ -323,7 +323,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
m.PushButton(kit.Select(OPEN, LOGIN, value[mdb.TYPE] == LOGIN), mdb.REMOVE)
|
m.PushButton(kit.Select(OPEN, LOGIN, value[mdb.TYPE] == LOGIN), mdb.REMOVE)
|
||||||
})
|
})
|
||||||
m.Sort("", kit.Simple(WEIXIN, PORTAL, WORKER, SERVER, MASTER))
|
m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, MASTER))
|
||||||
} else {
|
} else {
|
||||||
_space_send(m, arg[0], kit.Simple(kit.Split(arg[1]), arg[2:])...)
|
_space_send(m, arg[0], kit.Simple(kit.Split(arg[1]), arg[2:])...)
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ func init() {
|
|||||||
}},
|
}},
|
||||||
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) {
|
nfs.SOURCE: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
_footer_plugin(m, web.CODE_VIMER, func() []string {
|
_footer_plugin(m, web.CODE_VIMER, func() []string {
|
||||||
return nfs.SplitPath(m, ctx.GetCmdFile(m, arg[0]))
|
return nfs.SplitPath(m, kit.Split(ctx.GetCmdFile(m, arg[0]), "?")[0])
|
||||||
}, arg...)
|
}, arg...)
|
||||||
}},
|
}},
|
||||||
nfs.SCRIPT: {Hand: func(m *ice.Message, arg ...string) {
|
nfs.SCRIPT: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -7,6 +7,7 @@ fieldset.web.wiki.portal>div.output { padding:0; }
|
|||||||
fieldset.web.wiki.portal>div.output>div.header { background-color:rgb(22 31 49); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
|
fieldset.web.wiki.portal>div.output>div.header { background-color:rgb(22 31 49); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { display:flex; justify-content:center; }
|
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { display:flex; justify-content:center; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item { text-align:center; padding:var(--legend-padding); height:var(--portal-header-height); }
|
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item { text-align:center; padding:var(--legend-padding); height:var(--portal-header-height); }
|
||||||
|
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item { display:flex; align-items:center; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:first-child { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); }
|
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:first-child { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); }
|
||||||
body.mobile fieldset.web.wiki.portal.cmd>div.output>div.header div.story[data-name=navmenu] div.item { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); }
|
body.mobile fieldset.web.wiki.portal.cmd>div.output>div.header div.story[data-name=navmenu] div.item { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--output-bg-color); }
|
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--output-bg-color); }
|
||||||
@ -43,8 +44,8 @@ body.cmd.web.wiki.portal { background-color:rgb(22 31 49); }
|
|||||||
fieldset.web.wiki.portal.home>div.output>div.layout>div.main p { white-space:pre-wrap; text-align:center; }
|
fieldset.web.wiki.portal.home>div.output>div.layout>div.main p { white-space:pre-wrap; text-align:center; }
|
||||||
|
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.layout { background-color:var(--plugin-bg-color); --code-bg-color:var(--output-bg-color); }
|
body.dark fieldset.web.wiki.portal>div.output>div.layout { background-color:var(--plugin-bg-color); --code-bg-color:var(--output-bg-color); }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--plugin-bg-color); }
|
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:hover { background-color:var(--plugin-bg-color); }
|
body.dark fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:hover { background-color:var(--plugin-bg-color); }
|
||||||
|
body.dark fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--plugin-bg-color); }
|
||||||
body.white fieldset.web.wiki.portal>div.output>div.header { color:silver; }
|
body.white fieldset.web.wiki.portal>div.output>div.header { color:silver; }
|
||||||
body.light fieldset.web.wiki.portal>div.output>div.header { color:white; }
|
body.light fieldset.web.wiki.portal>div.output>div.header { color:white; }
|
||||||
body.light fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { --hover-fg-color:black; }
|
body.light fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { --hover-fg-color:black; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user