From d8d9ba3b244581f799bef464e64e110093c47356 Mon Sep 17 00:00:00 2001 From: shy Date: Mon, 26 Aug 2024 22:15:12 +0800 Subject: [PATCH] add some --- index.css | 8 ++++---- plugin/state.js | 3 ++- proto.js | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/index.css b/index.css index 5fbc01e7..c90e2b15 100644 --- a/index.css +++ b/index.css @@ -110,7 +110,7 @@ body.width1 { /* 320-640 手机竖屏 */ --table-button:2; --card-button:3; } body.en { --card-button:3; } -body.mobile { --project-width:240px; --footer-height:60px; --svg-font-size:13px; } +body.mobile { --project-width:240px; --footer-height:60px; --svg-font-size:13px; --qrcode-width:320px; } body.mobile.dark { --body-bg-color:var(--output-bg-color); --action-output-bg-color:var(--output-bg-color); } body.mobile.light { --body-bg-color:var(--output-bg-color); --action-output-bg-color:var(--output-bg-color); } body.cmd.web.code.vimer { --code-line-height:24px; } @@ -200,7 +200,7 @@ div.output.card>div.item>div.title>div.title>span.exists { color:var(--notice-bg div.output.card>div.item>div.title>img { height:var(--header-height); width:var(--header-height); margin:0; float:left; } div.output.card>div.item>div.title>img.jpg { padding:var(--input-padding); } div.item.card { position:relative; display:flex; align-items:center; padding:0; } -div.output>div.item.card { border:solid 5px var(--plugin-bg-color); } +// div.output>div.item.card { border:solid 5px var(--plugin-bg-color); } div.item.card img { height:60px; width:60px; margin:5px; } div.item.card div.info { width:100%; } div.item.card div.title { font-size:16px; } @@ -686,8 +686,8 @@ table.content.full { width:100%; } table.content col.time { width:180px; } table.content col.action { width:var(--project); } table.content.detail td:first-child { width:var(--input-width); box-shadow:var(--th-box-shadow); } -body.mobile table.content.detail td:first-child { max-width:120px; word-break:break-all; white-space:break-spaces; } -table.content.detail td { min-width:80px; } +body.mobile table.content.detail td:first-child { max-width:150px; word-break:break-all; white-space:break-spaces; } +table.content.detail td { min-width:90px; } fieldset.web.chat.island.portal>div.output>table.content.detail td { min-width:80px; text-align:center; } body.void fieldset.web.chat.island.portal>div.status { display:none; } table.content, div.code, div.story[data-type=spark] { white-space:pre; margin:0; } diff --git a/plugin/state.js b/plugin/state.js index 2a7d1160..f480a8a9 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -36,9 +36,10 @@ Volcanos(chat.ONIMPORT, { height = can.base.Max(html.STORY_HEIGHT, height) } } + var option = can.base.Obj(msg.Option("field.option")) msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash }) can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub]) - sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) } + sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}, option), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) } can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, !can.user.isMobile), cb && cb(sub) if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300) sub.onexport.output = function() { if (tabs) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION)) diff --git a/proto.js b/proto.js index 7b5aa467..3b2eaecc 100644 --- a/proto.js +++ b/proto.js @@ -117,7 +117,7 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {}, isAutoMode: function() { return can.Mode() == "" }, Mode: function(value) { return can.Conf(ice.MODE, value) }, ConfDefault: function(value) { can.core.Item(value, function(k, v) { can.Conf(k) || can.Conf(k, v) }) }, - ConfSpace: function(space) { if (space) { can.Conf(web.SPACE, space) } return can.Conf("_space")||can.Conf(web.SPACE)||"" }, + ConfSpace: function(space) { if (space) { can.Conf(web.SPACE, space) } return can.Conf("_space")||can.Conf(web.SPACE)||can.Conf("pod")||"" }, ConfIndex: function(index) { if (index) { can.Conf(ctx.INDEX, index) } return can.Conf("_command")||can.Conf(ctx.INDEX)||can.Conf("_index") }, ConfHeight: function(value) { return can.Conf(html.HEIGHT, value) }, ConfWidth: function(value) { return can.Conf(html.WIDTH, value)||can._output.offsetWidth },