1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
root 2025-02-25 10:52:06 +08:00
parent 030c018877
commit be66627287
3 changed files with 5 additions and 5 deletions

View File

@ -343,7 +343,8 @@ func init() {
return true return true
} }
}) })
kit.If(m.Option(mdb.NAME) == "", func() { m.Sleep("5s").Cmdy(ROUTE, cli.BUILD).ProcessInner() }) m.Sleep("3s")
// kit.If(m.Option(mdb.NAME) == "", func() { m.Sleep("5s").Cmdy(ROUTE, cli.BUILD).ProcessInner() })
}}, }},
PUBLISH: {Name: "publish name", Hand: func(m *ice.Message, arg ...string) { PUBLISH: {Name: "publish name", Hand: func(m *ice.Message, arg ...string) {
m.Option(ice.MSG_TITLE, kit.Keys(m.Option(ice.MSG_USERPOD0), m.Option(ice.MSG_USERPOD), m.CommandKey(), m.ActionKey())) m.Option(ice.MSG_TITLE, kit.Keys(m.Option(ice.MSG_USERPOD0), m.Option(ice.MSG_USERPOD), m.CommandKey(), m.ActionKey()))

View File

@ -357,11 +357,10 @@ func init() {
} }
}}, }},
mdb.CREATE: {Name: "create origin* name icons type token", Hand: func(m *ice.Message, arg ...string) { mdb.CREATE: {Name: "create origin* name icons type token", Hand: func(m *ice.Message, arg ...string) {
if m.Option(mdb.NAME) == "" || m.Option(mdb.ICONS) == "" { if m.Option(mdb.TYPE) == nfs.REPOS && (m.Option(mdb.NAME) == "" || m.Option(mdb.ICONS) == "") {
msg := m.Spawn().SplitIndex(m.Cmdx(SPIDE, ice.DEV, kit.MergeURL2(m.Option(ORIGIN), C(SPACE, ice.INFO)))) msg := m.Spawn().SplitIndex(m.Cmdx(SPIDE, ice.DEV, kit.MergeURL2(m.Option(ORIGIN), C(SPACE, ice.INFO))))
if m.OptionDefault(mdb.NAME, msg.Append(mdb.NAME)); msg.Append(mdb.ICONS) != "" { if m.OptionDefault(mdb.NAME, msg.Append(mdb.NAME)); msg.Append(mdb.ICONS) != "" {
m.OptionDefault(mdb.ICONS, m.Resource(msg.Append(mdb.ICONS), msg.Append(ORIGIN))) m.OptionDefault(mdb.ICONS, m.Resource(msg.Append(mdb.ICONS), msg.Append(ORIGIN)))
m.OptionDefault(mdb.TYPE, nfs.REPOS)
} }
} }
if u, e := url.Parse(m.Option(ORIGIN)); m.WarnNotValid(e != nil || u.Host == "", m.Option(ORIGIN)) { if u, e := url.Parse(m.Option(ORIGIN)); m.WarnNotValid(e != nil || u.Host == "", m.Option(ORIGIN)) {
@ -522,7 +521,7 @@ func HostPort(m *ice.Message, host, port string, arg ...string) string {
host = u.Hostname() host = u.Hostname()
} }
}) })
host = kit.Select("localhost", host) host = kit.Select("localhost", host)
if port == tcp.PORT_443 { if port == tcp.PORT_443 {
return kit.Format("https://%s", host) + p return kit.Format("https://%s", host) + p
} else if port == tcp.PORT_80 { } else if port == tcp.PORT_80 {

View File

@ -21,7 +21,7 @@ func init() {
Index.MergeCommands(ice.Commands{ Index.MergeCommands(ice.Commands{
GEOAREA: {Name: "geoarea path auto", Help: "地区", Actions: ice.Actions{ GEOAREA: {Name: "geoarea path auto", Help: "地区", Actions: ice.Actions{
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
m.Cmd(web.SPIDE, mdb.CREATE, "https://geo.datav.aliyun.com/areas_v3/bound/", GEOAREA) // m.Cmd(web.SPIDE, mdb.CREATE, "https://geo.datav.aliyun.com/areas_v3/bound/", GEOAREA)
}}, }},
nfs.PS: {Hand: func(m *ice.Message, arg ...string) { nfs.PS: {Hand: func(m *ice.Message, arg ...string) {
p := path.Join(ice.USR_GEOAREA, path.Join(arg...)) p := path.Join(ice.USR_GEOAREA, path.Join(arg...))