mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
056d1ef39a
commit
76a213c323
14
frame.js
14
frame.js
@ -233,17 +233,17 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
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? {
|
||||
chat: "发送聊天",
|
||||
open: !can.isCmdMode() && "打开链接",
|
||||
}: {
|
||||
_space: "", full: !can.isCmdMode() && "切换全屏",
|
||||
chat: "发送聊天",
|
||||
}: {_space: "",
|
||||
full: !can.isCmdMode() && "切换全屏",
|
||||
open: !can.isCmdMode() && "打开链接",
|
||||
qrcode: !can.isCmdMode() && "生成链接",
|
||||
open: !can.isCmdMode() && "打开链接",
|
||||
chat: "发送聊天",
|
||||
help: can.page.ClassList.has(can, can._fields, html.PLUGIN) && can.Conf("_help") && can.Conf("_help") != "" && "查看文档",
|
||||
vimer: can.page.ClassList.has(can, can._fields, html.PLUGIN) && can.Conf("_fileline") && can.misc.Search(can, ice.MSG_DEBUG) == ice.TRUE && "查看源码",
|
||||
}, function(key, value) {
|
||||
return (value || value === "") && {view: [[html.ITEM, html.BUTTON, key, "icons"]], list: [{icon: icon[key]}], title: can.user.trans(can, key), onclick: function(event) {
|
||||
return (value || value === "") && {view: [[html.ITEM, html.BUTTON, key, mdb.ICONS, "state"]], list: [{icon: icon[key]}], title: can.user.trans(can, key), onclick: function(event) {
|
||||
_can.onaction[value](event, _can, value, _can.sub)
|
||||
}}
|
||||
})
|
||||
@ -498,7 +498,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
}); table && can.onappend.style(can, chat.CONTENT, table), table && msg.IsDetail() && can.onappend.style(can, mdb.DETAIL, table)
|
||||
msg.append && msg.append[msg.append.length-1] == ctx.ACTION && can.onappend.style(can, ctx.ACTION, table)
|
||||
if (msg.Option(ice.TABLE_CHECKBOX) == ice.TRUE && !msg.IsDetail()) { can.onappend.checkbox(can, table, msg), can.onappend.style(can, html.CHECKBOX, table) }
|
||||
// (can.isCmdMode() || table.offsetWidth > can.ConfWidth() / 2) &&
|
||||
// (can.isCmdMode() || table.offsetWidth > can.ConfWidth() / 2) &&
|
||||
can.onappend.style(can, "full", table)
|
||||
return keys && can.page.RangeTable(can, table, can.core.List(keys, function(key) { return can.page.Select(can, table, html.TH, function(th, index) { if (th.innerHTML == key) { return index } })[0] })), table
|
||||
},
|
||||
@ -584,7 +584,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
append(can.page.Append(can, target, [html.LAYOUT])._target, type==FLOW? FLEX: FLOW, item)
|
||||
} else if (can.base.isObject(item)) {
|
||||
if (item.index) { item._index = count++, ui.size[item._index] = item.height||item.width
|
||||
can.base.isIn(item.index, web.WIKI_PORTAL, web.CHAT_DESKTOP, web.DESKTOP) && can.onmotion.hidden(can, target)
|
||||
can.base.isIn(item.index, web.WIKI_PORTAL, web.CHAT_MACOS_DESKTOP, web.DESKTOP) && can.onmotion.hidden(can, target)
|
||||
can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
||||
item.layout = function(height, width) { sub.onimport.size(sub, height, width) }
|
||||
can.onmotion.select(can, sub._target.parentNode, html.FIELDSET, sub._target)
|
||||
|
@ -147,6 +147,7 @@ fieldset>form.option>div.item.select { border-radius:var(--button-radius); }
|
||||
fieldset>form.option>div.item.select>input { min-width:var(--button-width); }
|
||||
fieldset>form.option>div.item.button { border-radius:var(--button-radius); }
|
||||
fieldset>div.action div.item { box-shadow:var(--box-shadow); height:var(--action-height); }
|
||||
fieldset>div.action div.item.state { box-shadow:unset; }
|
||||
fieldset>div.action div.item:not(:last-child) { margin-right:var(--button-margin); }
|
||||
fieldset>div.action div.item.button { border-radius:var(--button-radius); }
|
||||
fieldset>div.action div.item.filter input { padding-left:24px; }
|
||||
|
@ -89,10 +89,12 @@ Volcanos("base", {
|
||||
} },
|
||||
TimeTrim: function(value) { var prefix = ""
|
||||
var now = new Date(), year = now.getFullYear()+"-", pre = this.Time(now, "%y-%m-%d ")
|
||||
if (value.indexOf(pre) == -1) { var list = ["昨天", "前天"]
|
||||
if (value.indexOf(pre) == -1) { var list = ["昨天", "前天", "", "", "", "", ""]
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var yestoday = this.Time(new Date(now - (i+1)*24*60*60*1000), "%y-%m-%d ")
|
||||
if (value.indexOf(yestoday) == 0) { prefix = list[i]+" ", pre = yestoday; break }
|
||||
if (value.indexOf(yestoday) == 0) {
|
||||
prefix = list[i] || ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"][new Date(value).getDay()]+" ", pre = yestoday; break
|
||||
}
|
||||
}
|
||||
}
|
||||
return prefix+this.trimPrefix(value.split(":").slice(0, 2).join(":"), pre, year)
|
||||
|
@ -93,6 +93,7 @@ Volcanos(chat.ONACTION, {_init: function(can, target) { can.db.list = can.misc.S
|
||||
} can.touch.isMove = false, can.touch.distanceX = 0, can.touch.isStart = false, can.touch.startX = 0
|
||||
},
|
||||
|
||||
store: function(can) { can.user.opens(can.misc.MergePodCmd(can, {cmd: web.STORE})) },
|
||||
dream: function(can) { can.user.opens(can.misc.MergePodCmd(can, {cmd: web.DREAM})) },
|
||||
portal: function(can) { can.user.opens(can.misc.MergePodCmd(can, {cmd: web.PORTAL})) },
|
||||
desktop: function(can) { can.user.opens(can.misc.MergePodCmd(can, {cmd: web.DESKTOP})) },
|
||||
@ -104,8 +105,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.DREAM, web.DESKTOP, web.PORTAL],
|
||||
_trans: kit.Dict(web.DREAM, "空间", web.DESKTOP, "桌面", web.PORTAL, "官网", html.LAYOUT, "布局", ALL, "详情布局", TABS, "标签布局", TABVIEW, "标签分屏", VERTICAL, "上下分屏", HORIZON, "左右分屏", GRID, "网格布局", FREE, "自由布局", FLOW, "流动布局", PAGE, "网页布局"),
|
||||
_menus: [[html.LAYOUT, ALL, TABS, TABVIEW, VERTICAL, HORIZON, GRID, FREE, FLOW, PAGE], web.STORE, web.DREAM, web.DESKTOP, web.PORTAL],
|
||||
_trans: kit.Dict(web.STORE, "商店", web.DREAM, "空间", web.DESKTOP, "桌面", web.PORTAL, "官网", html.LAYOUT, "布局", ALL, "详情布局", TABS, "标签布局", TABVIEW, "标签分屏", VERTICAL, "上下分屏", HORIZON, "左右分屏", GRID, "网格布局", FREE, "自由布局", FLOW, "流动布局", PAGE, "网页布局"),
|
||||
})
|
||||
Volcanos(chat.ONLAYOUT, {
|
||||
tabs: function(can, height, width) { can.ConfHeight(height+html.ACTION_HEIGHT), can.ConfWidth(width) },
|
||||
|
@ -28,6 +28,7 @@ body:not(.mobile) fieldset.Header>div.output div.title:first-child { width:var(-
|
||||
body:not(.mobile) fieldset.Header>div.output div.title img { margin-right:var(--button-margin); }
|
||||
body:not(.mobile) fieldset.Header:not(.all):not(.tabs)>div.output div.title:first-child { padding-left:var(--button-padding); width:unset; }
|
||||
body:not(.width6)>fieldset.Header:not(.all):not(.tabs)>div.output div.item.menu.search { padding-left:0 !important; margin-left:0; }
|
||||
body:not(.width6) fieldset.Header.tabview>div.output>div.Action>div.item.store { display:none; }
|
||||
body:not(.width6) fieldset.Header.tabview>div.output>div.Action>div.item.dream { display:none; }
|
||||
body:not(.width6) fieldset.Header.tabview>div.output>div.Action>div.item.desktop { display:none; }
|
||||
body:not(.width6) fieldset.Header>div.output>div.Action>div.item.portal { display:none; }
|
||||
|
@ -8,7 +8,6 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.onimport._main(can, msg
|
||||
var ls = can.misc.SearchHash(can); msg.Table(function(item) { item.main && (can._main_river = item.hash) })
|
||||
can._main_river = ls[0]||can.misc.SearchOrConf(can, chat.RIVER)||msg.Option(ice.MSG_RIVER)||can._main_river||"project"
|
||||
can._main_storm = ls[1]||can.misc.SearchOrConf(can, chat.STORM)||msg.Option(ice.MSG_STORM)
|
||||
// ||can._main_storm||"studio"
|
||||
},
|
||||
_river: function(can, meta, cb) { return {view: html.ITEM, title: meta.name, list: [{icon: meta.icon}, {text: meta.name}, {icon: icon.CHEVRON_DOWN}], _init: function(target) { can.ui.river_list[meta.hash] = target, cb(target) },
|
||||
onclick: function(event) { can.onaction.storm(event, can, meta.hash) }, oncontextmenu: function(event) { can.onaction.carte(event, can, can.onaction._menu, meta.hash) },
|
||||
|
@ -106,21 +106,22 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.page.SelectArgs(can, can._action, "", function(target) { target.value = his[i++]||"" }); break
|
||||
} can.Update(event) },
|
||||
})
|
||||
Volcanos(chat.ONACTION, {list: ["刷新数据", "刷新界面", "切换浮动", "切换全屏", "发送聊天", "生成链接",
|
||||
function(can) { if (!can.isCmdMode()) { return "打开链接" } }, function(can) { if (can.isCmdMode()) { return "打开首页" } },
|
||||
Volcanos(chat.ONACTION, {list: ["刷新数据", "刷新界面", "切换浮动", "切换全屏",
|
||||
function(can) { if (can.isCmdMode()) { return "打开首页" } },
|
||||
function(can) { if (can.ConfSpace() || can.isCmdMode() && can.misc.Search(can, ice.POD)) { return "打开空间" } },
|
||||
"共享工具",
|
||||
function(can) { if (!can.isCmdMode()) { return "打开链接" } },
|
||||
"生成链接", "共享工具", "发送聊天",
|
||||
function(can) { if (can.Conf("_help")) { return "查看文档" } },
|
||||
function(can) { if (can.misc.Search(can, ice.MSG_DEBUG)) { return "查看脚本" } },
|
||||
function(can) { if (can.misc.Search(can, ice.MSG_DEBUG)) { return "查看源码" } },
|
||||
function(can) { if (can.misc.Search(can, ice.MSG_DEBUG)) { return "查看镜像" } },
|
||||
["视图", "参数",
|
||||
["视图", "参数", "插件",
|
||||
function(can) { if (can._action.innerHTML) { return "操作" } },
|
||||
function(can) { if (can._status.innerHTML) { return "状态" } },
|
||||
function(can) { if (can.sub.ui.project) { return "专注" } },
|
||||
function(can) { if (can.sub.ui.project) { return "项目" } },
|
||||
function(can) { if (can.sub.ui.profile) { return "预览" } },
|
||||
function(can) { if (can.sub.ui.display) { return "演示" } },
|
||||
"插件",
|
||||
],
|
||||
// ["数据", "保存参数", "清空参数", "复制数据", "下载数据", "清空数据"],
|
||||
["调试",
|
||||
|
Loading…
x
Reference in New Issue
Block a user