mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
add some
This commit is contained in:
parent
d5f0783828
commit
d6987088c3
6
frame.js
6
frame.js
@ -195,6 +195,11 @@ Volcanos(chat.ONAPPEND, {
|
|||||||
}), can.base.isFunc(cb) && cb(sub)
|
}), can.base.isFunc(cb) && cb(sub)
|
||||||
if (sub.isOutputStyle()) { return } if (can.user.isMobile && !can.user.isLandscape()) { return }
|
if (sub.isOutputStyle()) { return } if (can.user.isMobile && !can.user.isLandscape()) { return }
|
||||||
sub.isCmdMode() && !can.base.isIn(meta.index, web.CODE_VIMER, web.CODE_INNER, web.CHAT_MACOS_DESKTOP) && can.page.insertBefore(can, [{view: "header", list: can.user.header(sub)}], sub._output, sub._fields||sub._target)
|
sub.isCmdMode() && !can.base.isIn(meta.index, web.CODE_VIMER, web.CODE_INNER, web.CHAT_MACOS_DESKTOP) && can.page.insertBefore(can, [{view: "header", list: can.user.header(sub)}], sub._output, sub._fields||sub._target)
|
||||||
|
sub.isCmdMode() && can.onmotion.delay(can, function() { wx.ready(function () {
|
||||||
|
wx.updateAppMessageShareData({title: sub.Conf("help"), desc: "", link: location.href, imgUrl: sub.Conf(mdb.ICONS)})
|
||||||
|
wx.updateTimelineShareData({title: sub.Conf("help"), link: location.href, imgUrl: sub.Conf(mdb.ICONS)})
|
||||||
|
}) }, 300)
|
||||||
|
|
||||||
}); return sub
|
}); return sub
|
||||||
},
|
},
|
||||||
_option: function(can, meta, option, skip) { var index = -1, args = can.base.Obj(meta.args||meta.arg, []), opts = can.base.Obj(meta.opts, {})
|
_option: function(can, meta, option, skip) { var index = -1, args = can.base.Obj(meta.args||meta.arg, []), opts = can.base.Obj(meta.opts, {})
|
||||||
@ -613,6 +618,7 @@ Volcanos(chat.ONAPPEND, {
|
|||||||
function img(p) { return !msg.IsDetail()? can.page.Format(html.IMG, p, 48, 48): can.user.isMobile? can.page.Format(html.IMG, p, null, 320): can.page.Format(html.IMG, p, 320, null) }
|
function img(p) { return !msg.IsDetail()? can.page.Format(html.IMG, p, 48, 48): can.user.isMobile? can.page.Format(html.IMG, p, null, 320): can.page.Format(html.IMG, p, 320, null) }
|
||||||
if (key == mdb.ICON && value) { _value = can.base.contains(value, ".ico", ".png", ".jpg")? img(can.misc.Resource(can, data[key], data[ice.POD]||data[web.SPACE])): "<i class='"+value+"'></i>" }
|
if (key == mdb.ICON && value) { _value = can.base.contains(value, ".ico", ".png", ".jpg")? img(can.misc.Resource(can, data[key], data[ice.POD]||data[web.SPACE])): "<i class='"+value+"'></i>" }
|
||||||
if (key == mdb.ICONS && value) { _value = img(can.misc.Resource(can, data[key])) }
|
if (key == mdb.ICONS && value) { _value = img(can.misc.Resource(can, data[key])) }
|
||||||
|
if (key == aaa.AVATAR && value) { _value = img(can.misc.Resource(can, data[key])) }
|
||||||
if (key == nfs.IMAGE && value) { _value = can.core.List(can.core.Split(data[key]), function(item) { return img(can.misc.ShareCache(can, item, data.space)) }).join("") }
|
if (key == nfs.IMAGE && value) { _value = can.core.List(can.core.Split(data[key]), function(item) { return img(can.misc.ShareCache(can, item, data.space)) }).join("") }
|
||||||
// if (key == web.SPACE && value) { _value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) }
|
// if (key == web.SPACE && value) { _value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) }
|
||||||
// if (key == mdb.NAME && value) { _value = can.user.trans(can, value, null, html.INPUT) }
|
// if (key == mdb.NAME && value) { _value = can.user.trans(can, value, null, html.INPUT) }
|
||||||
|
@ -454,7 +454,7 @@ fieldset.vimer>div.output div.project fieldset.plug div.output.card>div.item { m
|
|||||||
div.float { position:fixed; }
|
div.float { position:fixed; }
|
||||||
div.output { position:relative; } div.content { position:relative; }
|
div.output { position:relative; } div.content { position:relative; }
|
||||||
div.output>div.code { position:sticky; left:0; }
|
div.output>div.code { position:sticky; left:0; }
|
||||||
div.output>div.code>img { margin:5px; }
|
div.output>div.code>img { margin:5px; max-width:100%; }
|
||||||
div.output.flex { overflow:hidden; align-items:flex-start; justify-content: flex-start; }
|
div.output.flex { overflow:hidden; align-items:flex-start; justify-content: flex-start; }
|
||||||
div.layout.flex>* { float:left; clear:none; }
|
div.layout.flex>* { float:left; clear:none; }
|
||||||
div.flex:not(.hide) { display:flex; align-items:center; justify-content:center; }
|
div.flex:not(.hide) { display:flex; align-items:center; justify-content:center; }
|
||||||
@ -484,7 +484,7 @@ input[type=button] { border:var(--input-border); border-radius:var(--button-radi
|
|||||||
input[type=button]:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
input[type=button]:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
||||||
input[type=button].danger:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
input[type=button].danger:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||||
input[type=button].notice:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
input[type=button].notice:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||||
input[type=button].danger { border:var(--box-danger); }
|
input[type=button].danger { color:var(--danger-bg-color) !important; }
|
||||||
input[type=button].notice { border:var(--box-notice); }
|
input[type=button].notice { border:var(--box-notice); }
|
||||||
table.content tr:hover { background-color:var(--tr-hover-bg-color); }
|
table.content tr:hover { background-color:var(--tr-hover-bg-color); }
|
||||||
table.content tr.select { background-color:var(--tr-hover-bg-color); }
|
table.content tr.select { background-color:var(--tr-hover-bg-color); }
|
||||||
|
@ -483,7 +483,7 @@ Volcanos("page", {
|
|||||||
},
|
},
|
||||||
buttonStyle: function(can, name) {
|
buttonStyle: function(can, name) {
|
||||||
return can.core.Value(can.onaction, ["_trans", "style", name])||(can.base.isIn(name, mdb.CREATE, mdb.INSERT, mdb.IMPORT, nfs.CLONE, cli.START, ctx.RUN, web.UPLOAD, web.CONFIRM, aaa.LOGIN, code.AUTOGEN, "sso", "add", "pull", "push", "commit", "preview", "auto-preview", ice.APP)? html.NOTICE:
|
return can.core.Value(can.onaction, ["_trans", "style", name])||(can.base.isIn(name, mdb.CREATE, mdb.INSERT, mdb.IMPORT, nfs.CLONE, cli.START, ctx.RUN, web.UPLOAD, web.CONFIRM, aaa.LOGIN, code.AUTOGEN, "sso", "add", "pull", "push", "commit", "preview", "auto-preview", ice.APP)? html.NOTICE:
|
||||||
can.base.isIn(name, mdb.REMOVE, mdb.DELETE, mdb.PRUNES, mdb.PRUNE, nfs.TRASH, cli.RESTART, cli.STOP, cli.CLOSE, cli.REBOOT, web.CANCEL, code.UPGRADE, "del", "drop", "access", "kill", "prockill")? html.DANGER: "")
|
can.base.isIn(name, mdb.REMOVE, mdb.DELETE, mdb.PRUNES, mdb.PRUNE, nfs.TRASH, cli.RESTART, cli.STOP, cli.CLOSE, cli.REBOOT, web.CANCEL, code.UPGRADE, "reject", "del", "drop", "access", "kill", "prockill")? html.DANGER: "")
|
||||||
},
|
},
|
||||||
exportValue: function(can, msg, target) { target = target||can._output
|
exportValue: function(can, msg, target) { target = target||can._output
|
||||||
msg.OptionDefault(ice.MSG_THEME, can.getHeaderTheme())
|
msg.OptionDefault(ice.MSG_THEME, can.getHeaderTheme())
|
||||||
|
@ -90,8 +90,9 @@ Volcanos("user", {
|
|||||||
toastFailure: function(can, content, title) { return can.user.toast(can, {content: "❌ "+(content||ice.FAILURE), title: title, duration: -1}) },
|
toastFailure: function(can, content, title) { return can.user.toast(can, {content: "❌ "+(content||ice.FAILURE), title: title, duration: -1}) },
|
||||||
toastSuccess: function(can, content, title) { return can.user.toast(can, {content: "✅ "+(content||ice.SUCCESS), title: title, duration: 3000}) },
|
toastSuccess: function(can, content, title) { return can.user.toast(can, {content: "✅ "+(content||ice.SUCCESS), title: title, duration: 3000}) },
|
||||||
toast: function(can, content, title, duration, progress, hash) { can = can._fields? can.sup: can
|
toast: function(can, content, title, duration, progress, hash) { can = can._fields? can.sup: can
|
||||||
|
if (title == can.ConfIndex()) { title = can.user.trans(can, title, can.Conf("help")) }
|
||||||
var meta = can.base.isObject(content)? content: {content: content, title: title, duration: duration, progress: progress, hash: hash}
|
var meta = can.base.isObject(content)? content: {content: content, title: title, duration: duration, progress: progress, hash: hash}
|
||||||
meta.title = meta.title||can.core.Keys(can.ConfSpace(), can.ConfIndex())||can._name.split(nfs.PS).slice(-2).join(nfs.PS)
|
meta.title = meta.title||can.user.trans(can, can.core.Keys(can.ConfSpace(), can.ConfIndex()), can.Conf("help"))||can._name.split(nfs.PS).slice(-2).join(nfs.PS)
|
||||||
meta.hash && can.misc.isDebug(can) && (meta.title += " "+meta.hash.slice(0, 6)), meta.action = meta.action||[""]
|
meta.hash && can.misc.isDebug(can) && (meta.title += " "+meta.hash.slice(0, 6)), meta.action = meta.action||[""]
|
||||||
var width = meta.width||(html.QRCODE_WIDTH+2*html.PLUGIN_PADDING+10); if (width < 0) { width = can.page.width() + width }
|
var width = meta.width||(html.QRCODE_WIDTH+2*html.PLUGIN_PADDING+10); if (width < 0) { width = can.page.width() + width }
|
||||||
meta.title = can.base.replaceAll(meta.title||"", "%2F", "/")
|
meta.title = can.base.replaceAll(meta.title||"", "%2F", "/")
|
||||||
|
@ -94,7 +94,7 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
|
|||||||
can.user.info.email = msg.Option(aaa.EMAIL)
|
can.user.info.email = msg.Option(aaa.EMAIL)
|
||||||
can.user.info.avatar = msg.Option(aaa.AVATAR)
|
can.user.info.avatar = msg.Option(aaa.AVATAR)
|
||||||
can.user.info.background = msg.Option(aaa.BACKGROUND)
|
can.user.info.background = msg.Option(aaa.BACKGROUND)
|
||||||
can.user.info.titles = msg.Option("titles")
|
can.user.info.titles = msg.Option("titles")||document.title
|
||||||
can.user.info.favicon = msg.Option("favicon")
|
can.user.info.favicon = msg.Option("favicon")
|
||||||
lang(msg, function() { can.onmotion.clear(can), can.onimport._init(can, can.request(), can._output), can.onengine.signal(can, chat.ONLOGIN) })
|
lang(msg, function() { can.onmotion.clear(can), can.onimport._init(can, can.request(), can._output), can.onengine.signal(can, chat.ONLOGIN) })
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user