1
0
mirror of https://shylinux.com/x/icebergs synced 2025-06-26 10:27:31 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-09-09 18:38:07 +08:00
parent 7f8e0c4d90
commit 0a1a28f13e
4 changed files with 15 additions and 3 deletions

View File

@ -112,7 +112,8 @@ func CmdInputs(m *ice.Message, arg ...string) {
}
func PodCmd(m *ice.Message, arg ...ice.Any) bool {
Upload(m)
for _, key := range []string{ice.SPACE, ice.POD} {
// for _, key := range []string{ice.SPACE, ice.POD} {
for _, key := range []string{ice.POD} {
if pod := m.Option(key); pod != "" {
m.Options(key, []string{}, ice.MSG_USERPOD, pod).Cmdy(append(kit.List(ice.SPACE, pod), arg...)...)
return true

View File

@ -54,6 +54,7 @@ func _space_fork(m *ice.Message) {
m.Option(TOKEN) != "" && m.Cmdv(TOKEN, m.Option(TOKEN), mdb.TIME) > m.Time()) || mdb.HashSelect(m.Spawn(), name).Length() > 0 {
name, text = kit.Hashs(name), kit.Select(addr, m.Option(mdb.NAME), m.Option(mdb.TEXT))
}
args := kit.Simple(mdb.TYPE, kit.Select(WORKER, m.Option(mdb.TYPE)), mdb.NAME, name, mdb.TEXT, text, m.OptionSimple(cli.DAEMON, ice.MSG_USERUA), m.OptionSimple(nfs.MODULE, nfs.VERSION))
if c, e := websocket.Upgrade(m.W, m.R); !m.Warn(e) {
gdb.Go(m, func() {
@ -65,8 +66,13 @@ func _space_fork(m *ice.Message) {
case CHROME:
m.Go(func() { m.Cmd(SPACE, name, cli.PWD, name) })
case LOGIN:
m.Debug("what %v", m.Option(ice.MSG_USERNAME))
if m.Option(ice.MSG_SESSID) != "" && m.Option(ice.MSG_USERNAME) != "" {
m.Cmd(SPACE, name, ice.MSG_SESSID, m.Option(ice.MSG_SESSID))
}
gdb.Event(m, SPACE_LOGIN, args)
}
m.Debug("what %v", m.Option(ice.MSG_USERNAME))
_space_handle(m, false, name, c)
}, kit.Join(kit.Simple(SPACE, name), lex.SP))
}

View File

@ -79,10 +79,14 @@ func (s Client) User(m *ice.Message, arg ...string) {
m.OptionSimple(aaa.EMAIL, aaa.LANGUAGE, aaa.AVATAR_URL))
}
}
func (s Client) Sso(m *ice.Message, arg ...string) {
mdb.Conf(m, "web.chat.header", kit.Keym("sso.gitea.url"), kit.MergeURL2(m.Option(web.DOMAIN), m.Option(OAUTH_URL), m.OptionSimple(CLIENT_ID), REDIRECT_URI, s.RedirectURI(m), RESPONSE_TYPE, CODE, STATE, m.Option(mdb.HASH)))
mdb.Conf(m, "web.chat.header", kit.Keym("sso.gitea.icon"), "usr/icons/gitea.png")
}
func (s Client) Orgs(m *ice.Message, arg ...string) {}
func (s Client) Repo(m *ice.Message, arg ...string) {}
func (s Client) List(m *ice.Message, arg ...string) {
if s.Hash.List(m, arg...).PushAction(s.User, s.Auth, s.Remove); len(arg) == 0 {
if s.Hash.List(m, arg...).PushAction(s.Sso, s.User, s.Auth, s.Remove); len(arg) == 0 {
m.EchoScript(s.RedirectURI(m))
} else {
m.EchoScript("config header sso " + kit.MergeURL2(m.Append(web.DOMAIN), m.Append(OAUTH_URL), m.AppendSimple(CLIENT_ID), REDIRECT_URI, s.RedirectURI(m), RESPONSE_TYPE, CODE, STATE, arg[0]))

View File

@ -18,6 +18,7 @@ Volcanos(chat.ONIMPORT, {
{view: html.ACTION, inner: value.action, _init: function(target) { can.onappend.mores(can, target, value, 5) }},
]}
})), can.onappend.board(can, msg), can.onimport.layout(can)
can.onappend.scroll(can, can._output)
},
layout: function(can) { can.onlayout.expand(can, can._output, 380) },
}, [""])
}, [""])