diff --git a/const.js b/const.js index fc9e7da8..010837fa 100644 --- a/const.js +++ b/const.js @@ -409,6 +409,8 @@ var icon = { template: "bi bi-file-earmark-medical", binary: "bi bi-disc", name: "bi bi-textarea-t", + type: "bi bi-card-list", + send: "bi bi-send-check", word: "bi bi-book", repos: "bi bi-git", diff --git a/frame.js b/frame.js index c5d2e83d..371a896d 100644 --- a/frame.js +++ b/frame.js @@ -981,7 +981,8 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) { move: function(can, target, layout) { layout && can.page.style(can, target, layout), can.onmotion.resize(can, target, function() {}) }, resize: function(can, target, cb, top, left) { var begin, action top = top || can.getHeaderHeight(), left = left || can.getRiverWidth() - target.onmousedown = function(event) { if (event.which != 1 || event.target != target && !(can.page.ClassList.has(can, event.target, html.STATUS) && can.page.tagis(event.target, html.DIV))) { return } window._mousemove = target + target.onmousedown = function(event) { + if (event.which != 1 || event.target != target && !can.page.tagis(event.target, "div.action", "div.status", "div._space")) { return } window._mousemove = target begin = {left: target.offsetLeft, top: target.offsetTop, height: target.offsetHeight, width: target.offsetWidth, x: event.x, y: event.y} }, target.onmouseup = function(event) { begin = null, delete(window._mousemove) } target.onmousemove = function(event) { @@ -1000,9 +1001,9 @@ Volcanos(chat.ONMOTION, {_init: function(can, target) { } else { var p = can.page.position(event, target), margin = 10, cursor = "" if (p.x < margin) { cursor = "ew-resize", action = html.LEFT } else if (target.offsetWidth-margin < p.x) { cursor = "ew-resize", action = html.RIGHT - } else if (target.offsetHeight-margin < p.y || can.page.ClassList.has(can, event.target, html.STATUS) && can.page.tagis(event.target, html.DIV)) { cursor = "ns-resize", action = html.BOTTOM + } else if (target.offsetHeight-margin < p.y || can.page.tagis(event.target, "div.status")) { cursor = "ns-resize", action = html.BOTTOM } else if (p.y < margin) { cursor = "ns-resize", action = html.TOP - } else { cursor = event.target == target? "move": "", action = "" } can.page.style(can, target, "cursor", cursor) + } else { cursor = event.target == target || can.page.tagis(event.target, "div._space")? "move": "", action = "" } can.page.style(can, target, "cursor", cursor) } } }, diff --git a/index.css b/index.css index 8bc8d15a..f24d0d2c 100644 --- a/index.css +++ b/index.css @@ -271,7 +271,7 @@ body>div.input tr.img td:last-child>div>span.icon { display:none; } body>div.input tr.icon td:last-child { position:relative; } body>div.input tr.icon td:last-child img:first-child { height:28px; width:28px; position:absolute; left:12px; top:12px; } body>div.input tr.icon td:last-child input { padding-left:var(--action-height); } -body>div.input tr.icons td:last-child img:first-child { height:28px; width:28px; position:absolute; left:2px; top:2px; } +body>div.input tr.icons td:last-child img { height:28px; width:28px; position:absolute; left:2px; top:2px; } body>div.input tr.icons td:last-child span:not(.icon) { position:absolute; left:32px; } body>div.input tr.icons td:last-child input { padding-left:var(--action-height); } body>div.input td span.icon { margin-left:-20px; visibility:hidden; } @@ -463,6 +463,7 @@ input[type=button] { border-radius:var(--button-radius); } fieldset>form.option>div.item.select { border-radius:var(--button-radius); } fieldset>form.option>div.item.button { border-radius:var(--button-radius); } fieldset>div.action div.item.button { border-radius:var(--button-radius); } +fieldset>div.action div.item.button:last-child { margin-right:20px; } fieldset>div.action div.item.select:not(.button):not(.cmds) { border-radius:var(--button-radius); border-bottom:var(--notice-bg-color) solid 3px; } fieldset:not(.input):not(.panel):not(.full):not(.cmd) { border-radius:var(--plugin-radius); } fieldset>div.status>legend:not(:hover):not(.select) { border-radius:0; } diff --git a/plugin/state.js b/plugin/state.js index f1bce62c..8313657a 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -162,9 +162,7 @@ Volcanos(chat.ONACTION, {list: ["刷新数据", "打开链接": function(event, can) { can.user.open(can.onexport.link(can)) }, "发送聊天": function(event, can) { can.user.input(event, can, [{name: "message", display: "/require/usr/icebergs/core/chat/message.js", run: function(event, cmds, cb) { - can._root.Header.run(event, [ctx.ACTION, "message"].concat(cmds), function(msg) { - cb(msg) - }) + can._root.Header.run(event, [ctx.ACTION, "message"].concat(cmds), function(msg) { cb(msg) }) }}], function(list) { can._root.Header.run(event, [ctx.ACTION, "message", list[0], mdb.TYPE, "plug", web.SPACE, can.ConfSpace(), ctx.INDEX, can.ConfIndex(), ctx.ARGS, JSON.stringify(can.Option())]) })