mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
add some
This commit is contained in:
parent
50cfffbf2a
commit
968f15104c
@ -113,6 +113,7 @@ body.en { --card-button:3; }
|
|||||||
body.mobile {
|
body.mobile {
|
||||||
--footer-height:60px; --svg-font-size:13px;
|
--footer-height:60px; --svg-font-size:13px;
|
||||||
--project-width:240px;
|
--project-width:240px;
|
||||||
|
--body-bg-color:var(--plugin-bg-color);
|
||||||
}
|
}
|
||||||
body.cmd.web.code.vimer { --code-line-height:24px; }
|
body.cmd.web.code.vimer { --code-line-height:24px; }
|
||||||
/* element */
|
/* element */
|
||||||
@ -482,7 +483,8 @@ input.select[type=button]:focus { border:var(--box-notice); }
|
|||||||
input.select[type=button] { border:var(--input-border); padding:0 var(--button-padding); }
|
input.select[type=button] { border:var(--input-border); padding:0 var(--button-padding); }
|
||||||
input[type=button] { border:var(--input-border); border-radius:var(--button-radius); }
|
input[type=button] { border:var(--input-border); border-radius:var(--button-radius); }
|
||||||
input[type=button]:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
input[type=button]:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
||||||
input[type=button].danger:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
input[type=button].danger:hover { color:var(--danger-fg-color); }
|
||||||
|
// input[type=button].danger:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||||
input[type=button].notice:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
input[type=button].notice:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||||
input[type=button].danger { color:var(--danger-bg-color) !important; }
|
input[type=button].danger { color:var(--danger-bg-color) !important; }
|
||||||
input[type=button].notice { border:var(--box-notice); }
|
input[type=button].notice { border:var(--box-notice); }
|
||||||
@ -586,7 +588,7 @@ div.float:hover { box-shadow:var(--notice-box-shadow); }
|
|||||||
fieldset.plugin { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugin-radius); }
|
fieldset.plugin { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugin-radius); }
|
||||||
fieldset.story { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugin-radius); }
|
fieldset.story { box-shadow:var(--plugin-box-shadow); border-radius:var(--plugin-radius); }
|
||||||
fieldset.float { box-shadow:var(--float-box-shadow); border:var(--plugin-border); border-radius:var(--plugin-radius); }
|
fieldset.float { box-shadow:var(--float-box-shadow); border:var(--plugin-border); border-radius:var(--plugin-radius); }
|
||||||
fieldset:not(.panel):hover { box-shadow:var(--notice-box-shadow); }
|
fieldset.plugin:hover { box-shadow:var(--notice-box-shadow); }
|
||||||
body.light fieldset.plugin>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
body.light fieldset.plugin>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
||||||
body.light fieldset.story>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
body.light fieldset.story>legend { box-shadow:var(--legend-box-shadow); margin-right:var(--legend-margin); }
|
||||||
body.light fieldset.vimer fieldset.story>legend { margin-right:var(--input-margin); padding:0 var(--input-padding); }
|
body.light fieldset.vimer fieldset.story>legend { margin-right:var(--input-margin); padding:0 var(--input-padding); }
|
||||||
|
@ -187,8 +187,9 @@ Volcanos(chat.ONEXPORT, {
|
|||||||
language: function(can) { return can.user.info.language },
|
language: function(can) { return can.user.info.language },
|
||||||
avatar: function(can) { return can.misc.Resource(can, can.user.info.avatar == "void"? "": can.user.info.avatar) },
|
avatar: function(can) { return can.misc.Resource(can, can.user.info.avatar == "void"? "": can.user.info.avatar) },
|
||||||
background: function(can) { return can.user.info.background == "void"? "": can.user.info.background },
|
background: function(can) { return can.user.info.background == "void"? "": can.user.info.background },
|
||||||
theme: function(can) { return can._theme || can.misc.SearchOrConf(can, chat.THEME) || can.__theme || (can.base.isNight()? html.DARK: html.LIGHT) },
|
theme: function(can) { return can._theme || can.misc.SearchOrConf(can, chat.THEME) || can.__theme || "" },
|
||||||
height: function(can) { return can._target.offsetHeight },
|
// || (can.base.isNight()? html.DARK: html.LIGHT) },
|
||||||
|
height: function(can) { return can._target.offsetHeight },
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONPLUGIN, {
|
Volcanos(chat.ONPLUGIN, {
|
||||||
location: shy("请求地址", {copy: function(can) { can.user.copy(msg._event, can, location.href) }}, [web.LINK, ice.LIST, ice.COPY], function(can, msg, cb) {
|
location: shy("请求地址", {copy: function(can) { can.user.copy(msg._event, can, location.href) }}, [web.LINK, ice.LIST, ice.COPY], function(can, msg, cb) {
|
||||||
|
@ -127,9 +127,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
item._select == undefined && can.db.hash[0] && (item._select = can.db.hash[0] == item._hash)
|
item._select == undefined && can.db.hash[0] && (item._select = can.db.hash[0] == item._hash)
|
||||||
return {view: [[html.ITEM, item.type, item.role, item.status]], title: item.title||item.nick, list: [
|
return {view: [[html.ITEM, item.type, item.role, item.status]], title: item.title||item.nick, list: [
|
||||||
can.onimport._icons(can, item),
|
can.onimport._icons(can, item),
|
||||||
].concat(
|
].concat(can.onimport._nick(can, item), item._label||[], [
|
||||||
can.onimport._nick(can, item),
|
|
||||||
item._label||[], [
|
|
||||||
item.action && {icon: "bi bi-three-dots", onclick: function(event) { can.onimport._menu(event, can, item, cbs) }},
|
item.action && {icon: "bi bi-three-dots", onclick: function(event) { can.onimport._menu(event, can, item, cbs) }},
|
||||||
]), _init: function(target) { target._item = item, item._item = target, can.ui[item.path] = target
|
]), _init: function(target) { target._item = item, item._item = target, can.ui[item.path] = target
|
||||||
item._select && can.onmotion.delay(can, function() { target.click() })
|
item._select && can.onmotion.delay(can, function() { target.click() })
|
||||||
@ -269,8 +267,12 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
sub.onaction.close = function() { can.onmotion.hidden(can, target) }, can.base.isFunc(cb) && cb(sub)
|
sub.onaction.close = function() { can.onmotion.hidden(can, target) }, can.base.isFunc(cb) && cb(sub)
|
||||||
}, target, field)
|
}, target, field)
|
||||||
},
|
},
|
||||||
})
|
float: function(can, index, args) { args = args||[]
|
||||||
Volcanos(chat.ONLAYOUT, {
|
can.user.toast(can, can.user.isMobile)
|
||||||
|
can.user.isMobile? can.user.jumps(can.misc.MergePodCmd(can, {cmd: index+"/"+args.join("/")})): can.onappend._float(can, index, args)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
Volcanos(chat.ONLAYOUT, {
|
||||||
_init: function(can, height, width) { can.core.CallFunc([can.onimport, html.LAYOUT], {can: can, height: height, width: width}) },
|
_init: function(can, height, width) { can.core.CallFunc([can.onimport, html.LAYOUT], {can: can, height: height, width: width}) },
|
||||||
zone: function(can, height, width) { can.onlayout._init(can, height, width) },
|
zone: function(can, height, width) { can.onlayout._init(can, height, width) },
|
||||||
result: function(can, height, width) { can.onlayout._init(can, height, width) },
|
result: function(can, height, width) { can.onlayout._init(can, height, width) },
|
||||||
@ -279,8 +281,8 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
float: function(can, height, width) { can.onlayout._init(can, height, width) },
|
float: function(can, height, width) { can.onlayout._init(can, height, width) },
|
||||||
full: function(can, height, width) { can.onlayout._init(can, height, width) },
|
full: function(can, height, width) { can.onlayout._init(can, height, width) },
|
||||||
cmd: function(can, height, width) { can.onlayout._init(can, height, width) },
|
cmd: function(can, height, width) { can.onlayout._init(can, height, width) },
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONEXPORT, {
|
Volcanos(chat.ONEXPORT, {
|
||||||
title: function(can, title) { can.sup.onexport.title.apply(can.sup.onexport, [can.sup].concat(can.core.List(arguments).slice(1))) },
|
title: function(can, title) { can.sup.onexport.title.apply(can.sup.onexport, [can.sup].concat(can.core.List(arguments).slice(1))) },
|
||||||
action_value: function(can, key, def) { var value = can.Action(key); return can.base.isIn(value, ice.AUTO, key, undefined)? def: value },
|
action_value: function(can, key, def) { var value = can.Action(key); return can.base.isIn(value, ice.AUTO, key, undefined)? def: value },
|
||||||
tabs: function(can) {},
|
tabs: function(can) {},
|
||||||
@ -295,14 +297,14 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
return res.join(lex.NL)
|
return res.join(lex.NL)
|
||||||
},
|
},
|
||||||
board: function(can) { var msg = can._msg; return msg.Result() },
|
board: function(can) { var msg = can._msg; return msg.Result() },
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONACTION, {
|
Volcanos(chat.ONACTION, {
|
||||||
onkeydown: function(event, can) {
|
onkeydown: function(event, can) {
|
||||||
if (can.onkeymap.selectCtrlN(event, can, can.ui.tabs||can._action, html.DIV_TABS)) { return }
|
if (can.onkeymap.selectCtrlN(event, can, can.ui.tabs||can._action, html.DIV_TABS)) { return }
|
||||||
can.onkeymap._parse(event, can)
|
can.onkeymap._parse(event, can)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONKEYMAP, {
|
Volcanos(chat.ONKEYMAP, {
|
||||||
escape: function(event, can) {}, enter: function(event, can) {},
|
escape: function(event, can) {}, enter: function(event, can) {},
|
||||||
ctrln: function(event, can) { can.onkeymap.selectCtrlN(event, can, can._action, html.DIV_TABS) },
|
ctrln: function(event, can) { can.onkeymap.selectCtrlN(event, can, can._action, html.DIV_TABS) },
|
||||||
space: function(event, can) { can.ui.filter && (can.ui.filter.focus(), can.onkeymap.prevent(event)) },
|
space: function(event, can) { can.ui.filter && (can.ui.filter.focus(), can.onkeymap.prevent(event)) },
|
||||||
@ -328,8 +330,8 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}) }),
|
}) }),
|
||||||
},
|
},
|
||||||
}, _engine: {},
|
}, _engine: {},
|
||||||
})
|
})
|
||||||
Volcanos(chat.ONINPUTS, {
|
Volcanos(chat.ONINPUTS, {
|
||||||
_nameicon: function(event, can, msg, target, name) {
|
_nameicon: function(event, can, msg, target, name) {
|
||||||
can.page.Appends(can, can._output, msg.Table(function(value) {
|
can.page.Appends(can, can._output, msg.Table(function(value) {
|
||||||
return {view: html.ITEM, list: [{img: can.misc.Resource(can, value.icons)},
|
return {view: html.ITEM, list: [{img: can.misc.Resource(can, value.icons)},
|
||||||
@ -340,5 +342,5 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
dream: function(event, can, msg, target, name) { can.sup.sub.oninputs._nameicon(event, can, msg, target, name) },
|
dream: function(event, can, msg, target, name) { can.sup.sub.oninputs._nameicon(event, can, msg, target, name) },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
1
proto.js
1
proto.js
@ -50,6 +50,7 @@ var Volcanos = shy({iceberg: "", volcano: "", frame: chat.FRAME_JS, _cache: {},
|
|||||||
function set(key, value) {
|
function set(key, value) {
|
||||||
if (key == "_method") { return msg._method = value }
|
if (key == "_method") { return msg._method = value }
|
||||||
if (key == "action" && value.indexOf("<input") == 0) { return }
|
if (key == "action" && value.indexOf("<input") == 0) { return }
|
||||||
|
if (key == "extra") { return }
|
||||||
if (typeof value == code.FUNCTION) { return msg[key] = value }
|
if (typeof value == code.FUNCTION) { return msg[key] = value }
|
||||||
value == "" || msg.Option(key) || msg.Option(key, value)
|
value == "" || msg.Option(key) || msg.Option(key, value)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user