1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 08:48:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-06-19 09:11:33 +08:00
parent 20950d875f
commit ad17b22061
5 changed files with 11 additions and 6 deletions

View File

@ -922,7 +922,7 @@ Volcanos(chat.ONAPPEND, {
sub.Status(html.HEIGHT, sub._output.offsetHeight), sub.Status(html.WIDTH, sub._output.offsetWidth)
}
can.core.CallFunc(on, {event: event, can: can, meta: meta, cb: _cb, target: target, sub: target._can, mod: can.onfigure[input],last: last, cbs: function(cb) {
target._can? show(target._can, cb): can.onappend._init(can, {type: html.INPUT, name: input, style: meta.name, mode: chat.FLOAT}, [path, meta.display], function(sub) { sub.Conf(meta)
target._can? show(target._can, cb): can.onappend._init(can, {type: html.INPUT, name: input, style: can.core.Keys(can.ConfIndex(), meta.name), mode: chat.FLOAT}, [path, meta.display], function(sub) { sub.Conf(meta)
can.page.Append(can, sub._target, [{text: [can.page.unicode.remove, "", "close"], onclick: function() { sub.close() }}])
sub.run = function(event, cmds, cb) { var msg = sub.request(event)
if (meta.range) { for (var i = meta.range[0]; i < meta.range[1]; i += meta.range[2]||1) { msg.Push(mdb.VALUE, i) } cb(msg); return }

View File

@ -294,6 +294,7 @@ fieldset.input.key div.action { display:none; }
fieldset.input.key div.action div.item.state { display:none; }
fieldset.input.key div.output table.content { font-family:var(--code-font-family); width:100%; }
fieldset.input.key div.output table.content td:first-child { cursor:pointer; }
fieldset.input.key div.output table.content.checkbox td:nth-child(2) { cursor:pointer; }
fieldset.input.key div.output table.content:not(.checkbox) td:not(:first-child) { background-color:unset !important; color:var(--disable-fg-color); cursor:default; }
fieldset.input.key>div.output>div.item:not(.hide) { display:flex; align-items:center; }
fieldset.input.key>div.output>div.item img { height:var(--header-height); width:var(--header-height); }
@ -597,6 +598,8 @@ fieldset>div.status>legend.select { box-shadow:var(--legend-box-shadow); }
fieldset>div.status>legend:hover { box-shadow:var(--legend-box-shadow); }
fieldset.Action>div.toast>div.toast:hover { box-shadow:var(--notice-box-shadow); }
table.content th { box-shadow:var(--th-box-shadow); }
fieldset.input.key table.content th { box-shadow:none; }
fieldset.input.key table.content.checkbox td:first-child { box-shadow:none; }
table.content.checkbox td:first-child { box-shadow:var(--th-box-shadow); }
table.content.action td:last-child { box-shadow:var(--th-box-shadow); }
table.content.detail tr.action td { box-shadow:var(--th-box-shadow); }
@ -627,7 +630,7 @@ legend>img { margin-right:var(--input-margin); height:28px; display:block; float
legend>span.icon:first-child { margin-right:var(--input-margin); }
legend>i:first-child { margin-right:var(--input-margin); }
select, input { font-size:var(--body-font-size); height:var(--action-height); } input::placeholder, textarea::placeholder { font-style:italic; color:var(--disable-fg-color); }
input[type=checkbox] { height:16px; width:16px; }
input[type=checkbox] { height:16px; width:16px; cursor:pointer; }
textarea { font-family:var(--input-font-family); font-size:var(--body-font-size); padding:var(--input-padding); height:var(--textarea-height); width:100%; outline:none; resize:vertical; }
table.content.full { width:100%; }
table.content col.time { width:180px; }

View File

@ -221,7 +221,7 @@ Volcanos("misc", {
return socket
},
ResourceFavicon: function(can, path, space) { return can.misc.Resource(can, path||can.user.info.favicon||nfs.SRC_MAIN_ICO, space) },
Resource: function(can, path, space, serve) {
Resource: function(can, path, space, serve) { if (!path) { return "" }
if (!can.base.beginWith(path, web.HTTP, nfs.PS)) {
path = nfs.P+path+(path.indexOf("usr/icons/") == -1? (space? can.core.Split(_version, "&")[0]: _version): "")
}
@ -373,3 +373,4 @@ Volcanos("misc", {
_signal: function(args) { this._list.push(args) }, _list: [], _skip: navigator && navigator.userAgent.indexOf("Chrome") > -1? 3: 3,
})

View File

@ -211,7 +211,8 @@ Volcanos("user", {
item.type = item.type||(item.values? html.SELECT: item.name == html.TEXT? html.TEXTAREA: html.TEXT), need[item.name] = item.need
item._init = function(target) {
if (item.name && item.name != ctx.ACTION) { target.value = item.value||msg.Option(item.name)||can.Option(item.name)||target.value||"" }
item.mode = chat.SIMPLE, can.onappend.figure(can, can.base.Copy({space: msg.Option(web.SPACE), run: function(event, cmds, cb) { var _msg = can.request(event, {_handle: ice.TRUE, action: msg.Option(html.ACTION)}, msg, can.Option())
// item.mode = chat.SIMPLE,
can.onappend.figure(can, can.base.Copy({space: msg.Option(web.SPACE), run: function(event, cmds, cb) { var _msg = can.request(event, {_handle: ice.TRUE, action: msg.Option(html.ACTION)}, msg, can.Option())
can.page.Select(can, ui.table, html.OPTION_ARGS, function(item) { item.name && item.value && _msg.Option(item.name, item.value) }); (item.run||can.run)(event, cmds, cb, true)
}, _enter: function(event) { return action.submit(event, can, html.SUBMIT), true }}, item), target)
}, item.onkeydown = function(event) { if (event.key == code.ESCAPE) { event.target.blur() } }
@ -324,7 +325,7 @@ Volcanos("user", {
{text: [can.user.trans(can, "or oauth login", "或第三方授权: "), html.LABEL]},
{view: [["sso", html.FLEX]], list: _msg.Table(function(value) {
return value.type == "oauth" && {view: [[html.ITEM, html.FLEX]], title: "点击跳转,授权登录", list: [
{img: can.misc.Resource(can, value.icons)}, {text: value.name},
{img: can.misc.Resource(can, value.icons)}, {text: can.user.trans(can, value.name, value.help)},
], onclick: function() {
can.user.jumps(can.base.MergeURL(value.link, ice.BACK, location.href))
}, _init: function(target) {

View File

@ -10,7 +10,7 @@ Volcanos(chat.ONFIGURE, {key: {
_show: function(can, msg, cb, target, name) {
// msg.Option(ice.TABLE_CHECKBOX, "")
if (msg.Option(ice.TABLE_CHECKBOX) == ice.TRUE) { target._hold = true
can.onappend._action(can, [html.CANCEL, html.CONFIRM, html.FILTER], can._action, {
can.onappend._action(can, [html.CANCEL, html.CONFIRM, msg.Length() > 5? html.FILTER: ""], can._action, {
cancel: function() {
can.onmotion.focus(can, target), can.onmotion.hidden(can, can._target)
},