mirror of
https://shylinux.com/x/icebergs
synced 2025-06-27 02:37:31 +08:00
add some
This commit is contained in:
parent
7f7a042951
commit
3e1d00f391
@ -29,9 +29,9 @@ func _matrix_list(m *ice.Message, domain, icon, typ string, fields ...string) (s
|
|||||||
m.PushRecord(value, fields...).PushButton(button...)
|
m.PushRecord(value, fields...).PushButton(button...)
|
||||||
switch typ {
|
switch typ {
|
||||||
case MYSELF:
|
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:
|
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:
|
default:
|
||||||
button = []ice.Any{PORTAL, DESKTOP, ADMIN, OPEN, XTERM, cli.RUNTIME, WORD, STATUS, VIMER}
|
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)))
|
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))...)
|
_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) {
|
}, 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) {
|
if kit.HasPrefixList(arg, ctx.ACTION) {
|
||||||
|
@ -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>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.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.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 {
|
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);
|
box-shadow:var(--box-shadow);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,10 @@ func init() {
|
|||||||
messageInsert(m, web.DREAM, mdb.TYPE, "plug", ctx.INDEX, IFRAME, ctx.ARGS, web.S(m.Option(mdb.NAME)))
|
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(
|
}, 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",
|
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) {
|
)), Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
@ -12,7 +12,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
msg.Table(function(value) {
|
msg.Table(function(value) {
|
||||||
var _target = can.page.Append(can, can.ui.project, [{view: html.ITEM, list: [
|
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: [
|
{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||"[未知消息]"}]},
|
{view: wiki.CONTENT, list: [{text: value.target||"[未知消息]"}]},
|
||||||
]},
|
]},
|
||||||
], onclick: function(event) { can.isCmdMode() && can.misc.SearchHash(can, value.zone), can.onimport._switch(can, false)
|
], 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 = ""
|
_message: function(can, msg) { var now = new Date(), last = ""
|
||||||
msg.Table(function(value) { can.db.zone.id = value.id
|
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 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
|
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]}])
|
can.page.Append(can, can.ui.message, [{view: [[html.ITEM, mdb.TIME], "", time]}])
|
||||||
@ -119,13 +119,18 @@ Volcanos(chat.ONFIGURE, {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
plug: function(can, value) {
|
plug: function(can, value) { var height = can.onexport.plugHeight(can, value), width = can.onexport.plugWidth(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
|
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) {
|
can.onappend.plugin(can, value, function(sub) {
|
||||||
sub.onexport.output = function() { sub.onimport.size(sub, height, width)
|
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)
|
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)
|
}, target)
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user