1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-01-14 13:11:08 +08:00
parent 98e621c0bd
commit 2f36d36600
6 changed files with 16 additions and 10 deletions

View File

@ -167,7 +167,7 @@ fieldset.input.date>div.status>div.today { padding:var(--input-padding); }
fieldset.input.icon img { height:var(--desktop-icon-size); width:var(--desktop-icon-size); cursor:pointer; } fieldset.input.icon img { height:var(--desktop-icon-size); width:var(--desktop-icon-size); cursor:pointer; }
/* float */ /* float */
body div.float { padding:var(--plugin-padding); box-shadow:var(--box-shadow); } body div.float { padding:var(--plugin-padding); box-shadow:var(--box-shadow); }
body>div.toast div.title { font-style:italic; word-break:break-all; color:var(--notice-bg-color); float:left; cursor:copy; } body>div.toast div.title { color:var(--notice-bg-color); font-style:italic; white-space:pre; max-width:280px; overflow:auto; float:left; cursor:copy; }
body>div.toast div.delete { color:var(--notice-bg-color); float:right; cursor:pointer; } body>div.toast div.delete { color:var(--notice-bg-color); float:right; cursor:pointer; }
body>div.toast div.delete:hover { background-color:var(--hover-bg-color); } body>div.toast div.delete:hover { background-color:var(--hover-bg-color); }
body>div.toast div.duration { color:var(--disable-fg-color); float:right; } body>div.toast div.duration { color:var(--disable-fg-color); float:right; }
@ -690,7 +690,7 @@ body>div.carte.header.avatar img { width:370px; }
body>fieldset.story.web.chat.wx.agent { position:fixed; left:0; bottom:0; } body>fieldset.story.web.chat.wx.agent { position:fixed; left:0; bottom:0; }
body.zh fieldset.inner>div.output>div.project>div.zone>div.item { letter-spacing:10px; border-top:var(--box-border); } body.zh fieldset.inner>div.output>div.project>div.zone>div.item { letter-spacing:10px; border-top:var(--box-border); }
body.white fieldset.inner.cmd>div.output>div.layout>div.tabs div:not(.select):not(:hover) { background-color:transparent; } body.white fieldset.inner.cmd>div.output>div.layout>div.tabs div:not(.select):not(:hover) { background-color:transparent; }
body.mobile fieldset.inner>form.option input[name=file] { width:160px; } /* body.mobile fieldset.inner>form.option input[name=file] { width:160px; } */
body.mobile fieldset.word>form.option>div.item>input[name=path] { width:180px; } body.mobile fieldset.word>form.option>div.item>input[name=path] { width:180px; }
body.mobile fieldset.word fieldset.inner>form.option input[type=text] { display:none; } body.mobile fieldset.word fieldset.inner>form.option input[type=text] { display:none; }
body.mobile fieldset.Action>div.output>fieldset.plugin:not(.output):not(.float):not(.full):not(.cmd):not(:first-child) { margin:20px 0; } body.mobile fieldset.Action>div.output>fieldset.plugin:not(.output):not(.float):not(.full):not(.cmd):not(:first-child) { margin:20px 0; }

View File

@ -117,7 +117,8 @@ Volcanos("user", {
template: function(can, file) { return can.base.MergeURL(can.base.Path(nfs.SRC_TEMPLATE, can.Conf(ctx.INDEX), file), ice.POD, can.user.space(can)) }, template: function(can, file) { return can.base.MergeURL(can.base.Path(nfs.SRC_TEMPLATE, can.Conf(ctx.INDEX), file), ice.POD, can.user.space(can)) },
share: function(can, msg, cmds) { can.page.exportValue(can, msg) share: function(can, msg, cmds) { can.page.exportValue(can, msg)
can.run(msg, cmds||[ctx.ACTION, chat.SHARE], function(msg) { can.user.copy(msg._event, can, msg.Append(mdb.NAME)) can.run(msg, cmds||[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], resize: html.IMG}) var ui = can.user.toast(can, {title: msg.Append(mdb.NAME), duration: -1, content: msg.Append(mdb.TEXT), action: [cli.CLOSE, cli.OPEN], resize: html.IMG})
can.page.style(can, ui._target, html.TOP, (can.page.height() - 360)/2)
}) })
}, },
copy: function(event, can, text) { if (!text) { return } copy: function(event, can, text) { if (!text) { return }
@ -174,8 +175,7 @@ Volcanos("user", {
can.user.carteRight(event, can, {_trans: trans}, list, function(event, button) { can.Update(can.request(event, item), [ctx.ACTION, button]) }) can.user.carteRight(event, can, {_trans: trans}, list, function(event, button) { can.Update(can.request(event, item), [ctx.ACTION, button]) })
}, },
input: function(event, can, form, cb, button) { if (!form || form.length == 0) { return cb() } input: function(event, can, form, cb, button) { if (!form || form.length == 0) { return cb() }
event = event||{} event = event||{}; var msg = can.request(event); event = event._event||event; var need = {}
var msg = can.request(event); event = event._event||event; var need = {}
var title = msg.Option(wiki.TITLE) var title = msg.Option(wiki.TITLE)
var ui = can.page.Append(can, document.body, [{view: [[html.INPUT].concat((can.ConfIndex()||"").split("."), msg.Option(mdb.TYPE), [chat.FLOAT])], list: [ var ui = can.page.Append(can, document.body, [{view: [[html.INPUT].concat((can.ConfIndex()||"").split("."), msg.Option(mdb.TYPE), [chat.FLOAT])], list: [
title && {view: [wiki.TITLE, html.LEGEND, title]}, title && {view: [wiki.TITLE, html.LEGEND, title]},

View File

@ -2,7 +2,10 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var river = can.Conf(chat.RIVER), storm = can.Conf(chat.STORM), list = can.misc.SearchHash(can) Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var river = can.Conf(chat.RIVER), storm = can.Conf(chat.STORM), list = can.misc.SearchHash(can)
can.onmotion.clear(can), can.core.Next(msg.Table(), function(item, next, index) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() } can.onmotion.clear(can), can.core.Next(msg.Table(), function(item, next, index) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() }
item.width = can.ConfWidth()-can.Conf(html.MARGIN_X); if (item.style == html.OUTPUT) { item.width = can.ConfWidth()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING } item.width = can.ConfWidth()-can.Conf(html.MARGIN_X); if (item.style == html.OUTPUT) { item.width = can.ConfWidth()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING }
if (msg.Length() == 1) { item.height = can.ConfHeight()-can.Conf(html.MARGIN_Y) } list.length == 0 && item.index == "web.dream" && (list = [river, storm, item.index]) if (msg.Length() == 1) {
can.base.isIn(item.index, web.CHAT_MACOS_DESKTOP) && (item.style = html.OUTPUT)
item.height = can.ConfHeight()-can.Conf(html.MARGIN_Y)
} list.length == 0 && item.index == "web.dream" && (list = [river, storm, item.index])
can.onappend.plugin(can, item, function(sub, meta, skip) { if (meta.index == "can._notfound" && !can.misc.isDebug(can)) { return skip || next() } can.onappend.plugin(can, item, function(sub, meta, skip) { if (meta.index == "can._notfound" && !can.misc.isDebug(can)) { return skip || next() }
sub.onexport.output = function() { can.onexport.isauto(can) && can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, "") } sub.onexport.output = function() { can.onexport.isauto(can) && can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, "") }
sub.onaction._close = function() { can.onengine.signal(can, chat.ONACTION_REMOVE, can.request({river: river, storm: storm}, item)), can.page.Remove(can, sub._target) } sub.onaction._close = function() { can.onengine.signal(can, chat.ONACTION_REMOVE, can.request({river: river, storm: storm}, item)), can.page.Remove(can, sub._target) }
@ -120,7 +123,7 @@ Volcanos(chat.ONLAYOUT, {
_plugin: function(can, button) { can.core.List(can._plugins, function(sub) { _plugin: function(can, button) { can.core.List(can._plugins, function(sub) {
if (can.page.ClassList.has(can, sub._target, html.OUTPUT)) { return sub.onimport.size(sub, can.ConfHeight()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING, can.ConfWidth()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING, true) } if (can.page.ClassList.has(can, sub._target, html.OUTPUT)) { return sub.onimport.size(sub, can.ConfHeight()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING, can.ConfWidth()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING, true) }
if (can._plugins.length == 1) { return sub.onimport.size(sub, can.ConfHeight()-can.Conf(html.MARGIN_Y), can.ConfWidth()-can.Conf(html.MARGIN_X), false) } if (can._plugins.length == 1) { return sub.onimport.size(sub, can.ConfHeight()-can.Conf(html.MARGIN_Y), can.ConfWidth()-can.Conf(html.MARGIN_X), false) }
sub.onimport.size(sub, can.ConfHeight()-can.Conf(html.MARGIN_Y)-(button && button != ALL || sub.isCmdMode()? 0: html.ACTION_MARGIN), can.ConfWidth()-can.Conf(html.MARGIN_X), can.onexport.isauto(can)) && can.page.style(can, sub._output, html.MAX_HEIGHT, "") sub.onimport.size(sub, can.ConfHeight()-can.Conf(html.MARGIN_Y)-(button && button != ALL || sub.isCmdMode()? 0: html.ACTION_MARGIN), can.ConfWidth()-can.Conf(html.MARGIN_X), can.onexport.isauto(can)) && can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, "")
}) }, }) },
_storage: function(can, value) { return can.misc.sessionStorage(can, can.core.Keys(CAN_LAYOUT, location.pathname), value) }, _storage: function(can, value) { return can.misc.sessionStorage(can, can.core.Keys(CAN_LAYOUT, location.pathname), value) },
}) })

View File

@ -39,10 +39,11 @@ body.width3>fieldset.Header>div.output>div.item.avatar { margin-right:var(--plug
body.width3>fieldset.Header>div.output div.Action>div.tabs { padding-left:0; } body.width3>fieldset.Header>div.output div.Action>div.tabs { padding-left:0; }
body.width4>fieldset.Header>div.output div.Action>div.tabs { padding-left:0; } body.width4>fieldset.Header>div.output div.Action>div.tabs { padding-left:0; }
/* body.width4>fieldset.Header>div.output>div.item.theme { display:none; } */ /* body.width4>fieldset.Header>div.output>div.item.theme { display:none; } */
body.width2>fieldset.Header>div.output div.Action>div.tabs { padding-left:0; }
body.width2>fieldset.Header>div.output div.item.title:first-child img { margin-right:0; } body.width2>fieldset.Header>div.output div.item.title:first-child img { margin-right:0; }
body.width2>fieldset.Header>div.output div.item.title:first-child span { display:none; } body.width2>fieldset.Header>div.output div.item.title:first-child span { display:none; }
body.width2>fieldset.Header>div.output>div.item.avatar { margin-right:var(--plugin-margin); } body.width2>fieldset.Header>div.output>div.item.avatar { margin-right:var(--plugin-margin); }
/* body.width2>fieldset.Header>div.output>div.item.theme { display:none; } */ body.width2>fieldset.Header>div.output>div.item.theme { display:none; }
body.width2>fieldset.Header>div.output>div.item.time { display:none; } body.width2>fieldset.Header>div.output>div.item.time { display:none; }
body.width2>fieldset.Footer>div.output div.item.cmd { display:none; } body.width2>fieldset.Footer>div.output div.item.cmd { display:none; }
body.width2>fieldset.Footer>div.output div.item.title { display:none; } body.width2>fieldset.Footer>div.output div.item.title { display:none; }

View File

@ -105,7 +105,9 @@ Volcanos(chat.ONACTION, {_init: function(can) {},
onlayout: function(can, layout, before) { if (can.user.isMobile) { return } onlayout: function(can, layout, before) { if (can.user.isMobile) { return }
can.page.ClassList.del(can, can._target, before), can.page.ClassList.add(can, can._target, layout) can.page.ClassList.del(can, can._target, before), can.page.ClassList.add(can, can._target, layout)
}, },
onshare: function(can, msg, args) { can.user.share(can, msg, [ctx.ACTION, chat.SHARE].concat(args||[])) }, onshare: function(can, msg, args) {
can.user.share(can, msg, [ctx.ACTION, chat.SHARE].concat(args||[]))
},
onwebpack: function(can, msg) { can.user.input(msg._event, can, [{name: mdb.NAME, value: can.user.title()}], function(data) { onwebpack: function(can, msg) { can.user.input(msg._event, can, [{name: mdb.NAME, value: can.user.title()}], function(data) {
can.core.Item(Volcanos.meta.pack, function(key, msg) { can.core.List(["_event", "_can", "_xhr", ""], function(key) { delete(msg[key]) }) }) can.core.Item(Volcanos.meta.pack, function(key, msg) { can.core.List(["_event", "_can", "_xhr", ""], function(key) { delete(msg[key]) }) })
can.runAction(can.request({}, {args: "name,river,storm,title,theme,layout", _toast: "打包中...", content: JSON.stringify(Volcanos.meta.pack), can.runAction(can.request({}, {args: "name,river,storm,title,theme,layout", _toast: "打包中...", content: JSON.stringify(Volcanos.meta.pack),

View File

@ -269,7 +269,7 @@ Volcanos(chat.ONEXPORT, {
output: function(can, msg) {}, action: function(can, button, data) {}, record: function(can, value, key, data) {}, output: function(can, msg) {}, action: function(can, button, data) {}, record: function(can, value, key, data) {},
title: function(can, title) { can.isCmdMode() && can.user.title(title) }, title: function(can, title) { can.isCmdMode() && can.user.title(title) },
marginTop: function() { return 0 }, marginBottom: function() { return 0 }, marginTop: function() { return 0 }, marginBottom: function() { return 0 },
actionHeight: function(can) { return (can._option.childElementCount == 1 && can._action.childElementCount == 0 || can.page.ClassList.has(can, can._target, html.OUTPUT))? 0: html.ACTION_HEIGHT }, actionHeight: function(can) { return can.page.ClassList.has(can, can._target, html.OUTPUT)? 0: html.ACTION_HEIGHT },
outputHeight: function(can) { var height = can.ConfHeight() - can.onexport.actionHeight(can) - can.onexport.statusHeight(can) outputHeight: function(can) { var height = can.ConfHeight() - can.onexport.actionHeight(can) - can.onexport.statusHeight(can)
if (can.user.isMobile) { return height } height -= can.onexport.outputMargin(can) if (can.user.isMobile) { return height } height -= can.onexport.outputMargin(can)
can.page.SelectChild(can, can._output, html.TABLE, function(target) { height -= target.offsetHeight }) can.page.SelectChild(can, can._output, html.TABLE, function(target) { height -= target.offsetHeight })