mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
e574bca6a8
commit
6fc261bae5
3
const.js
3
const.js
@ -108,6 +108,7 @@ var web = {CHAT: "chat", PORTAL: "portal", STUDIO: "studio", SERVICE: "service",
|
||||
WIKI_PORTAL: "web.wiki.portal",
|
||||
CHAT_HEADER: "web.chat.header",
|
||||
CHAT_IFRAME: "web.chat.iframe",
|
||||
CHAT_MESSAGE: "web.chat.message",
|
||||
CHAT_OAUTH_CLIENT: "web.chat.oauth.client",
|
||||
CHAT_MACOS_DESKTOP: "web.chat.macos.desktop",
|
||||
CHAT_MACOS_SESSION: "web.chat.macos.session",
|
||||
@ -316,6 +317,7 @@ var html = {value: {
|
||||
BODY: "body", FORM: "form", LABEL: "label", TITLE: "title", INNER: "inner", SPACE: "space", CLICK: "click",
|
||||
SELECT: "select", INPUT: "input", TEXT: "text", FILE: "file", TEXTAREA: "textarea", BUTTON: "button",
|
||||
CHECKBOX: "checkbox",
|
||||
CONTAINER: "container",
|
||||
MORE: "more",
|
||||
CANCEL: "cancel", SUBMIT: "submit", UPLOAD: "upload", USERNAME: "username", PASSWORD: "password",
|
||||
TABLE: "table", THEAD: "thead", TBODY: "tbody", TR: "tr", TH: "th", TD: "td",
|
||||
@ -374,6 +376,7 @@ var icon = {
|
||||
record1: "bi bi-images", record2: "bi bi-record-circle", record: "bi bi-record-circle",
|
||||
full: "bi bi-arrows-fullscreen", open: "bi bi-box-arrow-up-right",
|
||||
search: "bi bi-search", favor: "bi bi-star", qrcode: "bi bi-qr-code",
|
||||
chat: "bi bi-chat-dots",
|
||||
notifications: "bi bi-chat-right-text",
|
||||
help: "bi bi-question-square", doc: "bi bi-question-square",
|
||||
|
||||
|
2
frame.js
2
frame.js
@ -231,7 +231,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
var _can = can._fields? can.sup: can
|
||||
list.length == 0 && can.Conf("inputs").length == 0 || can.isCmdMode() || can.base.beginWith(can.ConfIndex(), "can.", "web.chat.macos.") ||
|
||||
can.page.tagis(can._fields||can._target, html.FIELDSET_PANEL, html.FIELDSET_PLUG) || action == can._action && can.page.Append(can, action,
|
||||
can.core.Item(can.user.isMobile? {open: "打开链接"}: {full: "切换全屏", qrcode: "生成链接", open: "打开链接"}, function(key, value) {
|
||||
can.core.Item(can.user.isMobile? {open: "打开链接"}: {full: "切换全屏", chat: "发送聊天", qrcode: "生成链接", open: "打开链接"}, function(key, value) {
|
||||
return {view: [[html.ITEM, html.BUTTON, key, "icons"]], list: [{icon: icon[key]}], title: can.user.trans(can, key), onclick: function(event) {
|
||||
_can.onaction[value](event, _can, value, _can.sub)
|
||||
}}
|
||||
|
@ -2,7 +2,8 @@
|
||||
Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var river = can.Conf(chat.RIVER), storm = can.Conf(chat.STORM), list = can.db.list
|
||||
can.onmotion.clear(can), can.core.Next(msg.Table(), function(item, next, index) { item.type = chat.PLUGIN, item.mode = can.Mode(); if (item.deleted == ice.TRUE) { return next() }
|
||||
item.width = can.ConfWidth()-can.Conf(html.MARGIN_X); if (item.style == html.OUTPUT) { item.width = can.ConfWidth()-2*html.PLUGIN_MARGIN-2*html.PLUGIN_PADDING }
|
||||
if (msg.Length() == 1) { item.height = can.ConfHeight()-can.Conf(html.MARGIN_Y), can.base.isIn(item.index, web.CHAT_MACOS_DESKTOP, web.WIKI_PORTAL) && (item.style = html.OUTPUT) }
|
||||
if (msg.Length() == 1) { item.height = can.ConfHeight()-can.Conf(html.MARGIN_Y), can.base.isIn(item.index,
|
||||
web.CHAT_MACOS_DESKTOP, web.CHAT_MESSAGE, web.WIKI_PORTAL) && (item.style = html.OUTPUT) }
|
||||
list.length == 0 && item.index == "web.dream" && (list = [river, storm, item.index])
|
||||
can.onappend.plugin(can, item, function(sub, meta, skip) { if (meta.index == "can._notfound" && !can.misc.isDebug(can)) { return skip || next() }
|
||||
sub.onexport.output = function() { msg.Length() > 1 && can.onexport.isauto(can) && can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, "") }
|
||||
|
@ -156,6 +156,11 @@ Volcanos(chat.ONACTION, {list: ["刷新数据", "刷新界面", "切换浮动",
|
||||
"打开首页": function(event, can) { can.user.open(location.origin) },
|
||||
"打开空间": function(event, can) { can.user.open(can.misc.MergePodCmd(can, {pod: can.ConfSpace()||can.misc.Search(can, ice.POD)})) },
|
||||
"打开链接": function(event, can) { can.user.open(can.onexport.link(can)) },
|
||||
"发送聊天": function(event, can) {
|
||||
can.user.input(event, can, [{name: "message", value: "dream"}], 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())])
|
||||
})
|
||||
},
|
||||
"生成链接": function(event, can) { can.onmotion.share(event, can, [], [web.LINK, can.user.copy(event, can, can.onexport.link(can))]) },
|
||||
"生成脚本": function(event, can) { var args = can.Input().join(lex.SP), list = [
|
||||
"export ctx_dev="+location.origin+"; ctx_temp=$(mktemp); curl -o $ctx_temp -fsSL $ctx_dev;"+" source $ctx_temp cmd "+(can.Conf(ctx.INDEX))+lex.SP+args,
|
||||
|
Loading…
x
Reference in New Issue
Block a user