diff --git a/const.js b/const.js index a2baca3f..e29ed341 100644 --- a/const.js +++ b/const.js @@ -312,6 +312,7 @@ var html = {value: { ACTION_BUTTON: 3, TABLE_BUTTON: 5, CODE_FONT_SIZE: 14, QRCODE_WIDTH: 360, + CARD_BUTTON: 5, CARD_WIDTH: 320, CARD_HEIGHT: 160, PLUG_WIDTH: 800, PLUG_HEIGHT: 480, STORY_HEIGHT: 480, FLOAT_HEIGHT: 480, FLOAT_WIDTH: 1200, DESKTOP_WIDTH: 1200, DESKTOP_HEIGHT: 684, }, diff --git a/frame.js b/frame.js index 8fde5f85..bf3e0e26 100644 --- a/frame.js +++ b/frame.js @@ -363,7 +363,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { var name = can.core.Split(item.nick||item.name||"").pop()||""; can.base.isIn(name, tcp.SERVER, tcp.CLIENT, web.STUDIO, web.SERVICE, mdb.SEARCH, ) && (name = (item.index||"").split(".").slice(-2).join(".")), (type != html.PLUG) && (name = can.core.Keys(item.space||item._space, name)) - var title = item.title || (can.user.isMobile? item.help: (item.help && item.help != name && !can.user.isEnglish(can)? name+"("+can.core.Split(item.help)[0]+")": name)) + var title = item.title || can.user.isMobile && (can.user.isEnglish(can)? name: (item.help||name)) || (!item.help || name == item.help || can.user.isEnglish(can)? name: name+"("+can.core.Split(item.help)[0]+")") target = can.base.isFunc(target)? target(): target return can.page.Append(can, target||can._output, [{view: [type, html.FIELDSET], style: item.style, list: [{type: html.LEGEND, list: [item.icon && {icon: item.icon}, {text: title}]}, {view: [html.OPTION, html.FORM]}, html.ACTION, html.OUTPUT, html.STATUS]}]) }, diff --git a/index.css b/index.css index 4db248bd..ee074850 100644 --- a/index.css +++ b/index.css @@ -60,6 +60,7 @@ body { --plug-height:var(--float-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; --body-font-family:sans-serif; --legend-font-family:var(--input-font-family); --status-font-family:var(--body-font-family); @@ -75,6 +76,7 @@ body.width1 { /* 320-640 手机竖屏 */ --river-width:280px; --project-width:120px; --input-width:80px; --river-margin:0; --plugin-margin:0; --button-margin:5px; --table-button:2; + --card-button:3; --form-width:320px; } body.width2 { /* 640-960 手机横屏 平板竖屏 笔记本调试 */ diff --git a/lib/user.js b/lib/user.js index d38a8395..7fb1d565 100644 --- a/lib/user.js +++ b/lib/user.js @@ -44,7 +44,7 @@ Volcanos("user", { if (window.parent && window.parent.openurl) { return window.parent.openurl(url) } window.openurl? window.openurl(url): this.open(url) }, - open: function(url) { + open: function(url) { if (!url) { return } if (location.search.indexOf("debug=true") > 0 && url.indexOf("debug=true") == -1) { var ls = url.split("#"); ls[0] += (ls[0].indexOf("?") > 0? "&": "?") + "debug=true", url = ls.join("#") } diff --git a/plugin/table.js b/plugin/table.js index bb58b064..bc20d6fd 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -16,7 +16,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { {view: [wiki.TITLE, html.DIV], list: [ value.icon && {img: img}, {view: wiki.TITLE, list: [{text: value.name}, can.onappend.label(can, value)]}, ]}, {view: [wiki.CONTENT, html.DIV, value.text]}, - {view: html.ACTION, inner: value.action, _init: function(target) { can.onappend.mores(can, target, value, 5) }}, + {view: html.ACTION, inner: value.action, _init: function(target) { can.onappend.mores(can, target, value, html.CARD_BUTTON) }}, ]} }) can.onimport.layout = can.onimport.layout||function() { var height = can.onlayout.expand(can, target); can.sup.onexport.outputMargin = function() { return height } }