mirror of
https://shylinux.com/x/icebergs
synced 2025-04-25 17:18:05 +08:00
add some
This commit is contained in:
parent
472f72889a
commit
d4c73ce195
@ -87,6 +87,7 @@ func init() {
|
|||||||
roleHandle(m, role, list...)
|
roleHandle(m, role, list...)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
m.Cmd(ROLE, WHITE, VOID, ROLE, "action", RIGHT)
|
||||||
}},
|
}},
|
||||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
if arg[0] == mdb.KEY {
|
if arg[0] == mdb.KEY {
|
||||||
|
@ -309,6 +309,7 @@ func init() {
|
|||||||
for _, p := range []string{"server.conf", "location.conf", "upstream.conf"} {
|
for _, p := range []string{"server.conf", "location.conf", "upstream.conf"} {
|
||||||
m.Cmd(nfs.SAVE, kit.Format("%s/conf/portal/%s/%s", dir, m.Option(mdb.NAME), p), m.Template(p)+lex.NL)
|
m.Cmd(nfs.SAVE, kit.Format("%s/conf/portal/%s/%s", dir, m.Option(mdb.NAME), p), m.Template(p)+lex.NL)
|
||||||
}
|
}
|
||||||
|
m.Cmd(cli.SYSTEM, "sudo", kit.Path("usr/local/daemon/10000/sbin/nginx"), "-p", kit.Path("usr/local/daemon/10000/"), "-s", "reload")
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
}, gdb.EventsAction(SERVE_START), mdb.HashAction(
|
}, gdb.EventsAction(SERVE_START), mdb.HashAction(
|
||||||
|
@ -458,6 +458,10 @@ func init() {
|
|||||||
})
|
})
|
||||||
m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, ORIGIN))
|
m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, ORIGIN))
|
||||||
} else {
|
} else {
|
||||||
|
if ice.Info.NodeType != WORKER && arg[0] == ice.OPS {
|
||||||
|
m.Cmdy(arg[1:])
|
||||||
|
return
|
||||||
|
}
|
||||||
if kit.IsIn(arg[0], "", ice.CONTEXTS, ice.Info.NodeName) {
|
if kit.IsIn(arg[0], "", ice.CONTEXTS, ice.Info.NodeName) {
|
||||||
m.Cmdy(arg[1:])
|
m.Cmdy(arg[1:])
|
||||||
return
|
return
|
||||||
|
@ -299,9 +299,9 @@ func init() {
|
|||||||
m.Cmd("", mdb.CREATE, kit.Select("https://shylinux.com", conf[cli.CTX_SHY]), ice.SHY, ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, kit.Select("https://shylinux.com", conf[cli.CTX_SHY]), ice.SHY, ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
m.Cmd("", mdb.CREATE, kit.Select("https://mail.shylinux.com", conf[cli.CTX_MAIL]), ice.MAIL, "usr/icons/Mail.png", "mail")
|
m.Cmd("", mdb.CREATE, kit.Select("https://mail.shylinux.com", conf[cli.CTX_MAIL]), ice.MAIL, "usr/icons/Mail.png", "mail")
|
||||||
m.Cmd("", mdb.CREATE, kit.Select("https://demo.shylinux.com", conf[cli.CTX_DEMO]), ice.DEMO, ice.SRC_MAIN_ICO, "demo")
|
m.Cmd("", mdb.CREATE, kit.Select("https://demo.shylinux.com", conf[cli.CTX_DEMO]), ice.DEMO, ice.SRC_MAIN_ICO, "demo")
|
||||||
m.Cmd("", mdb.CREATE, "https://2023-ContextOS.shylinux.com", "2023-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, "https://2023.shylinux.com", "2023-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
m.Cmd("", mdb.CREATE, "https://2024-ContextOS.shylinux.com", "2024-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, "https://2024.shylinux.com", "2024-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
m.Cmd("", mdb.CREATE, "https://2025-ContextOS.shylinux.com", "2025-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
m.Cmd("", mdb.CREATE, "https://2025.shylinux.com", "2025-ContextOS", ice.SRC_MAIN_ICO, nfs.REPOS)
|
||||||
}},
|
}},
|
||||||
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.SEARCH: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
if mdb.IsSearchPreview(m, arg) {
|
if mdb.IsSearchPreview(m, arg) {
|
||||||
|
@ -44,7 +44,7 @@ func _autogen_defs(m *ice.Message, arg ...string) {
|
|||||||
}
|
}
|
||||||
func _autogen_import(m *ice.Message, main string, ctx string, mod string) string {
|
func _autogen_import(m *ice.Message, main string, ctx string, mod string) string {
|
||||||
m.Cmd(nfs.DEFS, ice.ETC_MISS_SH, m.Template("miss.sh"))
|
m.Cmd(nfs.DEFS, ice.ETC_MISS_SH, m.Template("miss.sh"))
|
||||||
_autogen_defs(m, ice.README_MD, ice.MAKEFILE, ice.LICENSE)
|
// _autogen_defs(m, ice.README_MD, ice.MAKEFILE, ice.LICENSE)
|
||||||
_autogen_defs(m, ice.SRC_MAIN_GO, ice.ETC_MISS_SH, ice.README_MD, ice.MAKEFILE, ice.LICENSE)
|
_autogen_defs(m, ice.SRC_MAIN_GO, ice.ETC_MISS_SH, ice.README_MD, ice.MAKEFILE, ice.LICENSE)
|
||||||
begin, done, list := false, false, []string{}
|
begin, done, list := false, false, []string{}
|
||||||
imports := kit.Format(`_ "%s/src/%s"`, mod, ctx)
|
imports := kit.Format(`_ "%s/src/%s"`, mod, ctx)
|
||||||
@ -159,6 +159,11 @@ func init() {
|
|||||||
m.Cmd(nfs.DEFS, ice.ETC_MISS_SH, m.Cmdx(nfs.CAT, ice.ETC_MISS_SH))
|
m.Cmd(nfs.DEFS, ice.ETC_MISS_SH, m.Cmdx(nfs.CAT, ice.ETC_MISS_SH))
|
||||||
m.Cmdy(nfs.DIR, ice.ETC_MISS_SH).Cmdy(nfs.CAT, ice.ETC_MISS_SH)
|
m.Cmdy(nfs.DIR, ice.ETC_MISS_SH).Cmdy(nfs.CAT, ice.ETC_MISS_SH)
|
||||||
}},
|
}},
|
||||||
|
nfs.REPOS: {Help: "仓库", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
_autogen_defs(m, ice.SRC_MAIN_GO, ice.SRC_MAIN_SHY, ice.ETC_MISS_SH, ice.README_MD, ice.MAKEFILE, ice.LICENSE)
|
||||||
|
_autogen_mod(m, ice.GO_MOD)
|
||||||
|
ReposAddFile(m, "", ice.GO_MOD)
|
||||||
|
}},
|
||||||
nfs.MODULE: {Name: "module name*=hi help type*=Hash,Zone,Data,Lang,Code main*=main.go@key zone top", Help: "模块", Hand: func(m *ice.Message, arg ...string) {
|
nfs.MODULE: {Name: "module name*=hi help type*=Hash,Zone,Data,Lang,Code main*=main.go@key zone top", Help: "模块", Hand: func(m *ice.Message, arg ...string) {
|
||||||
if m.WarnNotFound(!nfs.Exists(m, kit.Path(".git")), "未初始化代码库") {
|
if m.WarnNotFound(!nfs.Exists(m, kit.Path(".git")), "未初始化代码库") {
|
||||||
return
|
return
|
||||||
|
@ -2,6 +2,7 @@ package wiki
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
"path"
|
||||||
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/nfs"
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
@ -19,7 +20,12 @@ const IMAGE = "image"
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
IMAGE: {Name: "image path", Help: "图片", Hand: func(m *ice.Message, arg ...string) {
|
IMAGE: {Name: "image path", Help: "图片", Actions: ice.Actions{
|
||||||
|
"material": {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
m.Info("what %v", m.FormatChain())
|
||||||
|
m.Cmdy("", path.Join("usr/material", strings.TrimPrefix(path.Dir(m.Option("_script")), "usr/"), arg[0]))
|
||||||
|
}},
|
||||||
|
}, Hand: func(m *ice.Message, arg ...string) {
|
||||||
arg = _name(m, arg)
|
arg = _name(m, arg)
|
||||||
_image_show(m, arg[0], arg[1], arg[2:]...)
|
_image_show(m, arg[0], arg[1], arg[2:]...)
|
||||||
}},
|
}},
|
||||||
|
@ -2,7 +2,9 @@ fieldset.web.wiki.portal { --portal-max-width:1200px; --portal-header-height:64p
|
|||||||
fieldset.web.wiki.portal.home { --portal-max-width:1500px; }
|
fieldset.web.wiki.portal.home { --portal-max-width:1500px; }
|
||||||
fieldset.web.wiki.portal>div.header { display:none; }
|
fieldset.web.wiki.portal>div.header { display:none; }
|
||||||
fieldset.web.wiki.portal>div.output { padding:0; }
|
fieldset.web.wiki.portal>div.output { padding:0; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header { background-color:var(--panel-bg-color); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
|
fieldset.web.wiki.portal>div.output>div.header {
|
||||||
|
border-bottom:var(--box-border);
|
||||||
|
background-color:var(--panel-bg-color); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.list { display:flex; }
|
fieldset.web.wiki.portal>div.output>div.header div.list { display:flex; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { --hover-fg-color:white; }
|
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { --hover-fg-color:white; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story div.item span { white-space:pre; overflow:hidden; }
|
fieldset.web.wiki.portal>div.output>div.header div.story div.item span { white-space:pre; overflow:hidden; }
|
||||||
|
@ -448,6 +448,8 @@ func init() {
|
|||||||
m.Cmd(nfs.DEFS, path.Join(m.Option(nfs.PATH), _GITIGNORE), nfs.Template(m, IGNORE))
|
m.Cmd(nfs.DEFS, path.Join(m.Option(nfs.PATH), _GITIGNORE), nfs.Template(m, IGNORE))
|
||||||
git.PlainInit(m.Option(nfs.PATH), false)
|
git.PlainInit(m.Option(nfs.PATH), false)
|
||||||
_repos_insert(m, m.Option(nfs.PATH))
|
_repos_insert(m, m.Option(nfs.PATH))
|
||||||
|
m.Cmd(code.AUTOGEN, nfs.REPOS)
|
||||||
|
m.Cmd(STATUS, web.DEV_CREATE_TOKEN, kit.Dict(web.ORIGIN, web.UserHost(m), web.TOKEN, m.Cmdx(web.SPACE, ice.OPS, web.TOKEN, mdb.CREATE, mdb.TYPE, STATUS, mdb.NAME, m.Option(ice.MSG_USERNAME), mdb.TEXT, web.UserHost(m))))
|
||||||
m.ProcessRefresh()
|
m.ProcessRefresh()
|
||||||
}},
|
}},
|
||||||
INSTEADOF: {Name: "insteadof remote", Help: "代理", Icon: "bi bi-clouds", Hand: func(m *ice.Message, arg ...string) {
|
INSTEADOF: {Name: "insteadof remote", Help: "代理", Icon: "bi bi-clouds", Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user