1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 01:04:06 +08:00
This commit is contained in:
harveyshao 2022-11-02 19:35:59 +08:00
parent 13ee6498b7
commit 20318a125c
5 changed files with 8 additions and 7 deletions

View File

@ -119,7 +119,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
sub._trans = can.base.Copy(sub._trans||{}, can.core.Value(sub, [chat.ONACTION, chat._TRANS])), meta.inputs && sub.onappend._option(sub, meta, sub._option, meta.msg)
if (meta.msg) { var msg = sub.request(); msg.Copy(can.base.Obj(meta.msg)), sub.onappend._output(sub, msg, meta.display||msg.Option(ice.MSG_DISPLAY)||meta.feature.display) }
can.core.Value(can, sub._legend, chat.ONMOUSEENTER, function(event) {
can.core.Value(sub._legend, chat.ONMOUSEENTER, function(event) {
can.user.carte(event, sub, sub.onaction, sub.onaction.list.concat([[ctx.ACTION].concat(can.core.Item(meta.feature._trans))]), function(event, button, meta) {
var _sub = can.core.Value(sub, chat._OUTPUTS_CURRENT)
var cb = can.core.Value(_sub, [chat.ONACTION, button]); if (can.base.isFunc(cb)) { return cb(event, _sub, button) }

View File

@ -95,9 +95,8 @@ Volcanos("user", {info: {}, agent: {
}); can.onmotion.story.auto(can, ui._target)
return can._toast && (can._toast.close(), delete(can._toast)), can._toast = action
},
share: function(can, msg, cmd) { can.run(msg, cmd||[ctx.ACTION, chat.SHARE], function(msg) {
share: function(can, msg, cmd) { can.run(msg, cmd||[ctx.ACTION, chat.SHARE], function(msg) { can.user.copy(msg._event, can, msg.Append(mdb.NAME))
can.user.toast(can, {title: msg.Append(mdb.NAME), duration: -1, content: msg.Append(mdb.TEXT), action: [cli.CLOSE, cli.OPEN]})
can.user.copy(msg._event, can, msg.Append(mdb.NAME))
}) },
copy: function(event, can, text) { if (!text) { return }
if (navigator.clipboard) { var ok = false; navigator.clipboard.writeText(text).then(function() { ok = true })
@ -145,7 +144,7 @@ Volcanos("user", {info: {}, agent: {
item.mode = chat.SIMPLE, can.onappend.figure(can, item, target)
}; return {type: html.TR, list: [{type: html.TD, list: [{text: item.name||""}, {text: item.need == "must"? "*": "", style: {color: cli.RED}}]}, {type: html.TD, list: [can.page.input(can, item)]}]}
})}]}, html.ACTION,
]}]); can.onmotion.delay(can, function() { can.onlayout.figure(event, can, ui._target), action.focus() })
]}])
var action = can.onappend._action(can, button||[html.SUBMIT, html.CANCEL], ui.action, {
focus: function() { can.onmotion.focus(can, can.page.Select(can, ui.first, html.INPUT_ARGS)[0]) },
cancel: function() { can.page.Remove(can, ui._target) },
@ -156,7 +155,8 @@ Volcanos("user", {info: {}, agent: {
}); if (err) { return } can.onkeymap.prevent(event)
can.core.CallFunc(cb, {event: can.request(event, {_handle: ice.TRUE})._event, button: button, data: data, list: list, args: args}) || action.cancel()
}, _target: ui._target, _engine: function(event, can, button) { action.submit(event, can, button) },
}); return button === true && action.submit(event, can, html.SUBMIT), action
}); can.onlayout.figure(event, can, ui._target), can.onmotion.delay(can, function() { action.focus() })
return button === true && action.submit(event, can, html.SUBMIT), action
},
select: function(event, can, type, fields, cb, cbs) {
can.search(can.request(event, {fields: fields||"type,name,text"}), ["Search.onimport.select", type, "", ""], function(list) {

View File

@ -125,6 +125,8 @@ select { font-size:1.1rem; height:31px; }
input { font-size:1.1rem; height:31px; }
table.content th, table.content td, div.zone>div.name, div.item, div.code, code.story, div.story[data-type=spark] { font-size:1.1rem; font-family:monospace; }
div.status>div.item>label { font-size:0.6rem; font-family:monospace; }
fieldset.plugin>form.option>div.item { height:31px; }
fieldset.plugin>div.action>div.item { height:31px; }
div.status>div.item { padding:4px; height:22px; }
div.action>div.tabs { padding:5px 10px; height:21px; }
svg { font-family:monospace; }

View File

@ -143,6 +143,7 @@ Volcanos(chat.ONACTION, {_init: function(can, target) {
can.page.ClassList.add(can, can._target, can.Conf(chat.LAYOUT, button))
can._header_tabs && can.onmotion.hidden(can, can._header_tabs)
can.user.isMobile || can.isCmdMode() || (can.onmotion.toggle(can, can._root.River._target, true), can.onmotion.toggle(can, can._root.Footer._target, true))
can.user.isMobile && can.isCmdMode() && can.page.style(can, can._target, html.WIDTH, "", html.HEIGHT, "")
can.onlayout._init(can); var cb = can.onlayout[button]; if (can.base.isFunc(cb) && cb(can, silent)) { return } can.onlayout._plugin(can, button)
},
help: function(can, button) { can.user.open("/help/"+button+".shy") },

View File

@ -114,8 +114,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.onmotion.clear(
can.onimport._content(can, msg, head, list, key, get, set)
},
layout: function(can) {
can.onmotion.toggle(can, can._action, !can.isFloatMode() && !(can.user.isMobile && can.page.height() < can.page.width()))
can.onmotion.toggle(can, can._status, !can.isFloatMode() && !(can.user.isMobile && can.page.height() < can.page.width()))
can.page.styleWidth(can, can.ui.content, can.ConfWidth()-can.ui.project.offsetWidth-can.ui.profile.offsetWidth)
if (true || !can.isAutoMode() || can.isStoryType()) { can.page.styleHeight(can, can._output, can.ConfHeight())
var height = can._display_heights[can.sup.task? [can.sup.task.zone, can.sup.task.id].join(ice.FS): ""]||html.ACTION_HEIGHT