1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-02-28 02:14:55 +08:00
parent 7f7a042951
commit 3e1d00f391
4 changed files with 33 additions and 6 deletions

View File

@ -29,9 +29,9 @@ func _matrix_list(m *ice.Message, domain, icon, typ string, fields ...string) (s
m.PushRecord(value, fields...).PushButton(button...)
switch typ {
case MYSELF:
button = []ice.Any{PORTAL, WORD, STATUS, VIMER, COMPILE, cli.RUNTIME, MESSAGE, XTERM, DESKTOP, ADMIN, OPEN}
button = []ice.Any{PORTAL, WORD, STATUS, VIMER, COMPILE, MESSAGE, cli.RUNTIME, XTERM, DESKTOP, ADMIN, OPEN}
case SERVER:
button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, UPGRADE, cli.RUNTIME, MESSAGE, WORD, STATUS, VIMER, XTERM}
button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, UPGRADE, MESSAGE, cli.RUNTIME, WORD, STATUS, VIMER, XTERM}
default:
button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, XTERM, cli.RUNTIME, WORD, STATUS, VIMER}
}
@ -115,6 +115,18 @@ func init() {
m.OptionDefault(nfs.BINARY, UserHost(m)+S(m.Option(mdb.NAME)))
}
_matrix_dream(m, mdb.CREATE, kit.Simple(m.OptionSimple(mdb.ICONS, nfs.REPOS, nfs.BINARY))...)
m.Cmd(SPACE, kit.Keys(m.Option(DOMAIN), m.Option(mdb.NAME)), MESSAGE, mdb.CREATE,
mdb.TYPE, aaa.VOID,
mdb.ZONE, "ops.dev",
mdb.ICONS, "usr/icons/icebergs.jpg",
"target", "ops.dev",
)
m.Cmd(SPACE, m.Option(mdb.NAME), MESSAGE, mdb.CREATE,
mdb.TYPE, aaa.VOID,
mdb.ZONE, kit.Keys("ops", m.Option(DOMAIN), m.Option(mdb.NAME)),
mdb.ICONS, "usr/icons/icebergs.jpg",
"target", kit.Keys("ops", m.Option(DOMAIN), m.Option(mdb.NAME)),
)
}},
}, ctx.ConfAction(mdb.FIELD, "time,domain,status,type,name,text,icons,repos,binary,module,version", ctx.TOOLS, kit.Simple(STATUS, VERSION))), Hand: func(m *ice.Message, arg ...string) {
if kit.HasPrefixList(arg, ctx.ACTION) {

View File

@ -27,6 +27,12 @@ fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>
fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.myself div.container>span.from { float:right; }
fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.myself div.container { display:flex; flex-direction:column; align-items:flex-end; }
fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.text div.content { white-space:pre; padding:var(--input-padding) var(--button-padding); }
fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content div.item.text.path>input {
width:var(--input-width);
}
fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content legend {
// float:unset;
}
fieldset.web.chat.message>div.output>div.layout>div.layout>div.content>div.list>div.item.plug>div.container>div.content {
box-shadow:var(--box-shadow);
}

View File

@ -37,6 +37,10 @@ func init() {
messageInsert(m, web.DREAM, mdb.TYPE, "plug", ctx.INDEX, IFRAME, ctx.ARGS, web.S(m.Option(mdb.NAME)))
}
}},
ctx.COMMAND: {Hand: func(m *ice.Message, arg ...string) {
m.Cmdy(web.Space(m, m.Option("target")), ctx.COMMAND, arg[0]).ProcessField(ctx.ACTION, ctx.RUN, m.Option("target"), arg[0])
}},
ctx.RUN: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(web.Space(m, arg[0]), arg[1], arg[2:]) }},
}, web.DreamAction(), web.DreamTablesAction(), mdb.ZoneAction(
mdb.SHORT, mdb.ZONE, mdb.FIELD, "time,hash,type,zone,icons,title,count,target", mdb.FIELDS, "time,id,avatar,usernick,username,type,name,text,space,index,args,style,display",
)), Hand: func(m *ice.Message, arg ...string) {

View File

@ -12,7 +12,7 @@ Volcanos(chat.ONIMPORT, {
msg.Table(function(value) {
var _target = can.page.Append(can, can.ui.project, [{view: html.ITEM, list: [
{img: can.misc.Resource(can, value.icons||"usr/icons/Messages.png")}, {view: html.CONTAINER, list: [
{view: wiki.TITLE, list: [{text: value.title||value.zone||"[未命名]"}, {text: [can.base.TimeTrim(value.time), "", mdb.TIME]}]},
{view: wiki.TITLE, list: [{text: value.title||can.base.trimPrefix(value.zone, "ops.")||"[未命名]"}, {text: [can.base.TimeTrim(value.time), "", mdb.TIME]}]},
{view: wiki.CONTENT, list: [{text: value.target||"[未知消息]"}]},
]},
], onclick: function(event) { can.isCmdMode() && can.misc.SearchHash(can, value.zone), can.onimport._switch(can, false)
@ -47,7 +47,7 @@ Volcanos(chat.ONIMPORT, {
},
_message: function(can, msg) { var now = new Date(), last = ""
msg.Table(function(value) { can.db.zone.id = value.id
value.space = value.space||can.base.trimPrefix(can.db.zone.target, "ops.")
// value.space = value.space||can.base.trimPrefix(can.db.zone.target, "ops.")
var myself = value.username == can.user.info.username, time = can.base.TimeTrim(value.time)
var t = new Date(value.time); if (!last || (t - last > 3*60*1000)) { last = t
can.page.Append(can, can.ui.message, [{view: [[html.ITEM, mdb.TIME], "", time]}])
@ -119,13 +119,18 @@ Volcanos(chat.ONFIGURE, {
}
}}
},
plug: function(can, value) {
var height = can.onexport.plugHeight(can, value), width = can.onexport.plugWidth(can, value)
plug: function(can, value) { var height = can.onexport.plugHeight(can, value), width = can.onexport.plugWidth(can, value)
return {view: wiki.CONTENT, style: {height: height+2, width: width}, _init: function(target) { value.type = chat.STORY
value._commands = {target: can.db.zone.target}
can.onappend.plugin(can, value, function(sub) {
sub.onexport.output = function() { sub.onimport.size(sub, height, width)
can.page.style(can, target, html.HEIGHT, sub._target.offsetHeight+2, html.WIDTH, sub._target.offsetWidth)
}
sub.onexport.link = function() {
var args = sub.Option(); args.pod = can.core.Keys(can.ConfSpace()||can.misc.Search(can, ice.POD), can.db.zone.target), args.cmd = sub.ConfIndex()
can.core.Item(args, function(key, value) { !value && delete(args[key]) })
return can.misc.MergePodCmd(can, args, true)
}
}, target)
}}
},