diff --git a/index.css b/index.css index 4018ed6f..33bb7c7b 100644 --- a/index.css +++ b/index.css @@ -82,9 +82,9 @@ input:hover[type=button][name=trash] { background-color:red; color:white; } input:hover[type=button][name=delete] { background-color:red; color:white; } input:hover[type=button][name=remove] { background-color:red; color:white; } /* font */ -legend { font-size:1.2rem; line-height:32px; height:32px; } -select, input { font-size:1rem; height:32px; } input::placeholder { font-style:italic; } -textarea { tab-size:2; padding:5px; height:96px; width:100%; resize:vertical; } +legend { font-size:1.2rem; line-height:30px; height:32px; } +select, input { font-size:1rem; height:32px; } textarea::placeholder, input::placeholder { font-style:italic; } +textarea { font-size:1rem; tab-size:2; padding:5px; height:96px; width:100%; resize:vertical; } table.content, div.item, div.code, div.story[data-type=spark] { font-family:monospace; } table.content, div.item, div.code, div.story[data-type=spark] { white-space:pre; text-align:left; } div.story[data-type=spark] { padding:5px 10px; border-left:blue solid 5px; } @@ -107,8 +107,8 @@ body.zh fieldset.input.date>div.action>div.item.select.month select { width:81px fieldset>form.option>div.icon { font-size:26px; line-height:28px; padding:0 5px; height:32px; margin:0; } fieldset>form.option>div.item.icons>span.icon { font-size:26px; line-height:28px; padding:0 5px; height:32px; } fieldset>div.action>div.item.icons>span.icon { font-size:26px; line-height:28px; padding:0 5px; height:32px; } -fieldset>form.option>div.item.icons>span.icon.create { line-height:32px; } -fieldset>div.action>div.item.icons>span.icon.create { line-height:32px; } +fieldset>form.option>div.item.icons>span.icon.create { line-height:30px; } +fieldset>div.action>div.item.icons>span.icon.create { line-height:30px; } form.option>div.icon:first-child { margin-left:-5px; } form.option>div.icon.refresh { line-height:26px; } form.option>div.icon.goback { line-height:26px; } @@ -276,6 +276,7 @@ fieldset.inner.float>div.status { display:none; } fieldset.qrcode>div.output div.code { padding:0; } fieldset.xterm div.layout div.output { border-left:gray solid 1px; border-top:gray solid 1px; } fieldset.xterm div.layout div.output.select { border:blue solid 1px; } +fieldset.xterm>div.layout { clear:both; } fieldset.plan div.output div.content>table.content { height:100%; width:100%; } fieldset.draw>form.option>div.item.pid>input { width:60px; } fieldset.draw div.output svg { margin-bottom:-4px; } diff --git a/plugin/local/code/xterm.js b/plugin/local/code/xterm.js index 12c34d8a..8d363a37 100644 --- a/plugin/local/code/xterm.js +++ b/plugin/local/code/xterm.js @@ -49,8 +49,8 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { can.page.requireModules can.onengine.listen(can, chat.ONTHEMECHANGE, function() { can = can.core.Value(can.sup, chat._OUTPUTS_CURRENT) term.selectAll(), can.onimport._connect(can, item, output, tabs, can.base.trimSuffix(term.getSelection(), lex.NL)) }), can.page.style(can, output, html.BACKGROUND_COLOR, term._publicOptions.theme.background||cli.BLACK) - output.onclick = function() { output._tabs._current = output - can.onmotion.select(can, can._fields, html.DIV_OUTPUT, can._output = output), term.focus(), can.onexport.term(can, term) + output.onclick = function() { output._tabs._current = output, term.focus(), can.onexport.term(can, term) + can.page.Select(can, can._fields, html.DIV_OUTPUT, function(target) { can.page.ClassList.set(can, target, html.SELECT, target == output) }) }; return can.db = can.db||{}, can.db[item.hash] = term }, _resize: function(can, term, size) { can.runAction(can.request({}, size, term._item), web.RESIZE, [], function() { can.onexport.term(can, term) }) }, @@ -60,7 +60,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb) { can.page.requireModules } else { if (can._delay) { can._delay = false; var msg = can.request({}, {_handle: ice.TRUE}, term._item) can._keylist = can.onkeymap._parse({key: data, _msg: msg}, can, mdb.NORMAL, can._keylist||[], term); return - } can._output = term._output, can.runAction(can.request({}, term._item), web.INPUT, [btoa(data)], function() {}) + } can._output = term._output, can.runAction(can.request({}, {rows: term.rows, cols: term.cols}, term._item), web.INPUT, [btoa(data)], function() {}) } }, grow: function(can, msg) { var arg = msg.detail.slice(1), term = can.db[arg[0]]; arg[1] == "~~~end~~~"? can.onaction.delete(can, term._output): term.write(arg[1]); msg.Option(ice.LOG_DISABLE, ice.TRUE) }, diff --git a/proto.js b/proto.js index e1849062..b31a0cbb 100644 --- a/proto.js +++ b/proto.js @@ -77,8 +77,7 @@ var mdb = { EQ: ice.EQ, FS: ice.FS, } var web = {CHAT: "chat", - SHARE: "share", SPACE: "space", DREAM: "dream", - SPIDE: "spide", + SPACE: "space", DREAM: "dream", SHARE: "share", SPIDE: "spide", WEBSITE: "website", DRAW: "draw", PLAY: "play", CLEAR: "clear", REFRESH: "refresh", RESIZE: "resize", FILTER: "filter", INPUT: "input", CANCEL: "cancel", SUBMIT: "submit", UPLOAD: "upload", DOWNLOAD: "download", TOIMAGE: "toimage", SHARE_CACHE: "/share/cache/", SHARE_LOCAL: "/share/local/", @@ -87,15 +86,14 @@ var web = {CHAT: "chat", GET: "GET", PUT: "PUT", POST: "POST", DELETE: "DELETE", Accept: "Accept", ContentType: "Content-Type", ContentJSON: "application/json", ContentFORM: "application/x-www-form-urlencoded", IMAGE_PNG: "image/png", VIDEO_WEBM: "video/webm", + UPDATE: "update", TOGGLE: "toggle", HIDDEN: "hidden", - CHAT_MACOS_DESKTOP: "web.chat.macos.desktop", - CHAT_MACOS_SESSION: "web.chat.macos.session", CODE_GIT_REPOS: "web.code.git.repos", CODE_GIT_STATUS: "web.code.git.status", - CHAT_FAVOR: "web.chat.favor", CODE_XTERM: "web.code.xterm", CODE_VIMER: "web.code.vimer", CODE_INNER: "web.code.inner", WIKI_WORD: "web.wiki.word", WIKI_DRAW: "web.wiki.draw", WIKI_FEEL: "web.wiki.feel", + CHAT_MACOS_DESKTOP: "web.chat.macos.desktop", CHAT_MACOS_SESSION: "web.chat.macos.session", + CHAT_IFRAME: "web.chat.iframe", CHAT_FAVOR: "web.chat.favor", TEAM_PLAN: "web.team.plan", - UPDATE: "update", TOGGLE: "toggle", HIDDEN: "hidden", } var aaa = { LOGIN: "login", LOGOUT: "logout", INVITE: "invite", TOKEN: "token",