diff --git a/const.js b/const.js index 6e52eba6..081e9f08 100644 --- a/const.js +++ b/const.js @@ -403,6 +403,9 @@ var icon = { upgrade: "bi bi-rocket-takeoff", install: "bi bi-box-arrow-in-down", runtime: "bi bi-info-square", + template: "bi bi-file-earmark-medical", + binary: "bi bi-disc", + name: "bi bi-textarea-t", word: "bi bi-book", repos: "bi bi-git", diff --git a/frame.js b/frame.js index 293ec06f..48c4b28a 100644 --- a/frame.js +++ b/frame.js @@ -87,16 +87,8 @@ Volcanos(chat.ONDAEMON, {_init: function(can, name, type, cbs) { if (can.user.is confirm: function(event) { toast.close(), can.run(can.request(event, {name: arg[0]}), [ctx.ACTION, ctx.RUN, web.SPACE, aaa.LOGIN]) }, }, [html.CANCEL, html.CONFIRM])}) }, - grow: function(can, msg, sub, arg) { - var _can = sub._fields && sub.sup? sub.sup: sub - if (!_can.onimport._grow) { debugger } - _can.onimport._grow(_can, msg, arg.join("")) - }, - rich: function(can, msg, sub, arg) { - var _can = sub._fields && sub.sup? sub.sup: sub - if (!_can.onimport._rich) { debugger } - _can.onimport._rich(_can, msg, arg) - }, + grow: function(can, msg, sub, arg) { var _can = sub._fields && sub.sup? sub.sup: sub; _can.onimport._grow(_can, msg, arg.join("")) }, + rich: function(can, msg, sub, arg) { var _can = sub._fields && sub.sup? sub.sup: sub; _can.onimport._rich(_can, msg, arg) }, action: function(can, msg, sub, arg) { if (arg[0] == "ctrl") { var list = [] can.page.Select(can, can._root._target, html.INPUT, function(target, index) { list[index] = target diff --git a/index.css b/index.css index 3c6084f8..53b77a4d 100644 --- a/index.css +++ b/index.css @@ -53,17 +53,16 @@ body { --header-height:48px; --footer-height:var(--action-height); --action-height:32px; --status-height:var(--action-height); --river-width:var(--project-width); --project-width:230px; --input-width:140px; --button-width:60px; --form-width:320px; - --url-input-width:320px; - --qrcode-height:364px; --qrcode-width:360px; + --url-input-width:320px; --textarea-height:96px; + --qrcode-width:360px; --qrcode-height:364px; --iframe-height:420px; - --textarea-height:96px; --card-height:160px; --card-width:320px; --story-height:480px; --float-height:var(--story-height); --float-width:1200px; --plug-height:var(--story-height); --plug-width:var(--float-width); --desktop-height:684px; --desktop-width:var(--float-width); --desktop-icon-size:80px; - --action-button:10; --table-button:5; --river-margin:80px; --action-margin:200px; - --card-button:5; + --action-button:10; --table-button:5; --card-button:5; + --river-margin:80px; --action-margin:200px; --body-font-family:sans-serif; --legend-font-family:var(--body-font-family); --status-font-family:var(--body-font-family); @@ -73,9 +72,7 @@ body { --code-font-size:14px; --code-line-height:24px; --code-tabs-height:48px; --icon-font-size:var(--legend-font-size); --svg-font-size:24px; --svg-stroke-width:1; } -body.en { - --card-button:3; -} +body.en { --card-button:3; } body.mobile { --footer-height:60px; --qrcode-height:284px; --svg-font-size:13px; } body.width1 { /* 320-640 手机竖屏 */ --river-width:280px; --project-width:120px; --input-width:80px; --url-input-width:160px; --form-width:320px; @@ -95,7 +92,7 @@ body.width5 { /* 1600-1920 */ } body.width6 { /* 1920-2240 显示器 */ --river-width:280px; --input-width:180px; --card-height:160px; - --project-width:280px; + --project-width:280px; --qrcode-width:420px; --float-height:640px; --float-width:1400; } /* element */ @@ -134,6 +131,7 @@ h1 { text-align:center; margin:var(--title-margin) 0; } h2 { margin:var(--title- ol, ul { margin-left:var(--title-margin); } p { margin:var(--title-margin) 0; } kbd { padding:0 var(--input-padding); } +img.qrcode { width:var(--qrcode-width); } /* output style */ div.title>div.status { line-height:20px; display:flex; } div.title>div.status>div.item { font-size:var(--status-font-size); font-weight:normal; margin-right:var(--button-margin); float:left; } diff --git a/lib/user.js b/lib/user.js index 57da3985..db517d70 100644 --- a/lib/user.js +++ b/lib/user.js @@ -87,7 +87,7 @@ Volcanos("user", { 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.hash && can.misc.isDebug(can) && (meta.title += " "+meta.hash.slice(0, 6)), meta.action = meta.action||[""] - var width = meta.width||390; 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 } var ui = can.page.Append(can, meta.action.list || meta.action.length > 1? document.body: can._root.Action._toast, [{view: [[chat.TOAST, meta.style, chat.FLOAT]], style: {width: width}, list: [ {view: [wiki.TITLE, "", meta.title||""], title: "点击复制", onclick: function(event) { can.user.copy(event, can, meta.title) }}, {view: [cli.CLOSE, "", can.page.unicode.close], title: "点击关闭", onclick: function() { action.close() }}, diff --git a/panel/action.js b/panel/action.js index 8e5b3947..103875a9 100644 --- a/panel/action.js +++ b/panel/action.js @@ -109,7 +109,8 @@ Volcanos(chat.ONACTION, {_init: function(can, target) { can.db.list = can.misc.S can._root.River && can._river_show === false && can.onmotion.hidden(can, can._root.River._target), skip || can.onlayout._init(can) can.getActionSize(function(height, width) { var cb = can.onlayout[button]; can.base.isFunc(cb) && cb(can, height, width) || can.onlayout._plugin(can, button) }) }, - _menus: [[html.LAYOUT, ALL, TABS, TABVIEW, VERTICAL, HORIZON, GRID, FREE, FLOW, PAGE], web.STORE, web.DREAM, web.DESKTOP, web.PORTAL], + // _menus: [[html.LAYOUT, ALL, TABS, TABVIEW, VERTICAL, HORIZON, GRID, FREE, FLOW, PAGE], web.STORE, web.DREAM, web.DESKTOP, web.PORTAL], + _menus: [[html.LAYOUT, ALL, TABS, TABVIEW, VERTICAL, HORIZON, GRID, FREE, FLOW, PAGE]], _trans: kit.Dict(html.LAYOUT, "布局", ALL, "详情布局", TABS, "标签布局", TABVIEW, "标签分屏", VERTICAL, "上下分屏", HORIZON, "左右分屏", GRID, "网格布局", FREE, "自由布局", FLOW, "流动布局", PAGE, "网页布局"), }) Volcanos(chat.ONLAYOUT, { diff --git a/panel/header.css b/panel/header.css index 14656924..ea861217 100644 --- a/panel/header.css +++ b/panel/header.css @@ -21,7 +21,7 @@ fieldset.Header>div.output div.search.title { padding:7px 5px; margin-left:15px; fieldset.Header>div.output div.search>i { color:unset; padding:7px; left:3px; } fieldset.Header>div.output div.search>input { padding-left:25px; } fieldset.Header>div.output div.search>span.icon { padding:var(--input-padding) var(--button-padding); } -fieldset.Header>div.output div.Action>div.tabs { padding-left:40px; height:100%; overflow:auto; } +fieldset.Header>div.output div.Action>div.tabs { height:100%; display:flex; justify-content:center; flex-wrap:wrap; overflow:auto; white-space:pre; } fieldset.Header>div.output div.Action>div.tabs div.item { font-style:italic; } fieldset.Header>div.output div.Action>div.tabs div.item.select { border-bottom:var(--notice-bg-color) solid 5px; } fieldset.Header>div.output div.Action>div.tabs div.item:only-child { display:none; }