mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
add some
This commit is contained in:
parent
6411732f6a
commit
7914b395f3
2
const.js
2
const.js
@ -47,6 +47,7 @@ var ice = {
|
|||||||
PROCESS_FIELD: "_field",
|
PROCESS_FIELD: "_field",
|
||||||
PROCESS_AGAIN: "_again",
|
PROCESS_AGAIN: "_again",
|
||||||
PROCESS_HOLD: "_hold",
|
PROCESS_HOLD: "_hold",
|
||||||
|
FIELD_PREFIX: "_prefix",
|
||||||
MSG_PREFIX: "_prefix",
|
MSG_PREFIX: "_prefix",
|
||||||
MSG_INDEX: "_index",
|
MSG_INDEX: "_index",
|
||||||
|
|
||||||
@ -433,6 +434,7 @@ var icon = {
|
|||||||
full: "bi bi-arrows-fullscreen", open: "bi bi-box-arrow-up-right",
|
full: "bi bi-arrows-fullscreen", open: "bi bi-box-arrow-up-right",
|
||||||
more: "bi bi-three-dots-vertical", actions: "bi bi-three-dots",
|
more: "bi bi-three-dots-vertical", actions: "bi bi-three-dots",
|
||||||
search: "bi bi-search", favor: "bi bi-star",
|
search: "bi bi-search", favor: "bi bi-star",
|
||||||
|
plugs: "bi bi-tools",
|
||||||
|
|
||||||
key: "bi bi-hash", hash: "bi bi-hash", zone: "bi bi-diagram-3", id: "bi bi-sort-numeric-down",
|
key: "bi bi-hash", hash: "bi bi-hash", zone: "bi bi-diagram-3", id: "bi bi-sort-numeric-down",
|
||||||
modify: "bi bi-pencil-square", rename: "bi bi-pencil-square", remove: "bi bi-trash",
|
modify: "bi bi-pencil-square", rename: "bi bi-pencil-square", remove: "bi bi-trash",
|
||||||
|
3
frame.js
3
frame.js
@ -407,8 +407,7 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
|||||||
var title = item.title || can.user.isMobile && (can.user.isEnglish(can)? name: (item.help||name)) || (!item.help || name == item.help || can.user.isEnglish(can)? name: name+"("+can.core.Split(item.help)[0]+")")
|
var title = item.title || can.user.isMobile && (can.user.isEnglish(can)? name: (item.help||name)) || (!item.help || name == item.help || can.user.isEnglish(can)? name: name+"("+can.core.Split(item.help)[0]+")")
|
||||||
target = can.base.isFunc(target)? target(): target
|
target = can.base.isFunc(target)? target(): target
|
||||||
return can.page.Append(can, target||can._output, [{view: [type, html.FIELDSET], style: item.style, list: [{type: html.LEGEND, list: [
|
return can.page.Append(can, target||can._output, [{view: [type, html.FIELDSET], style: item.style, list: [{type: html.LEGEND, list: [
|
||||||
item.icons && {img: can.misc.Resource(can, (item.icons.indexOf(nfs.PS) == -1? nfs.USR_ICONS: "")+item.icons, item.space||item._space)},
|
can.page.icons(can, item.icons||item.icon||name, item.space||item._space), {text: title},
|
||||||
item.icon && {icon: item.icon}, {text: title},
|
|
||||||
]}, {view: [html.OPTION, html.FORM]}, html.ACTION, html.OUTPUT, html.STATUS]}])
|
]}, {view: [html.OPTION, html.FORM]}, html.ACTION, html.OUTPUT, html.STATUS]}])
|
||||||
},
|
},
|
||||||
input: function(can, item, value, target, style) { if ([html.BR, html.HR].indexOf(item.type) > -1) { return can.page.Append(can, target, [item]) }
|
input: function(can, item, value, target, style) { if ([html.BR, html.HR].indexOf(item.type) > -1) { return can.page.Append(can, target, [item]) }
|
||||||
|
@ -588,7 +588,9 @@ body div.path { font-family:var(--code-font-family); }
|
|||||||
body div.carte { font-family:var(--code-font-family); }
|
body div.carte { font-family:var(--code-font-family); }
|
||||||
body { font-size:var(--body-font-size); }
|
body { font-size:var(--body-font-size); }
|
||||||
legend { font-size:var(--legend-font-size); line-height:30px; height:var(--action-height); }
|
legend { font-size:var(--legend-font-size); line-height:30px; height:var(--action-height); }
|
||||||
legend img { margin-right:var(--input-margin); height:32px }
|
legend>img { margin-right:var(--input-margin); height:var(--action-height); }
|
||||||
|
legend>span.icon:first-child { margin-right:var(--input-margin); }
|
||||||
|
legend>i:first-child { margin-right:var(--input-margin); }
|
||||||
select, input { font-size:var(--body-font-size); height:var(--action-height); } input::placeholder, textarea::placeholder { font-style:italic; color:var(--disable-fg-color); }
|
select, input { font-size:var(--body-font-size); height:var(--action-height); } input::placeholder, textarea::placeholder { font-style:italic; color:var(--disable-fg-color); }
|
||||||
input[type=checkbox] { height:16px; width:16px; }
|
input[type=checkbox] { height:16px; width:16px; }
|
||||||
textarea { font-size:var(--body-font-size); padding:var(--input-padding); height:var(--textarea-height); width:100%; outline:none; resize:vertical; }
|
textarea { font-size:var(--body-font-size); padding:var(--input-padding); height:var(--textarea-height); width:100%; outline:none; resize:vertical; }
|
||||||
|
@ -381,6 +381,12 @@ Volcanos("page", {
|
|||||||
case html.BUTTON: item.value = item.value||item.name||mdb.LIST; break
|
case html.BUTTON: item.value = item.value||item.name||mdb.LIST; break
|
||||||
} return input
|
} return input
|
||||||
},
|
},
|
||||||
|
icons: function(can, name, space) { if (!name) { return }
|
||||||
|
if (can.base.contains(name, ".ico", ".png", ".jpg")) { return {img: can.misc.Resource(can, (name.indexOf(nfs.PS) == -1? nfs.USR_ICONS: "")+name, space)} }
|
||||||
|
// if (can.page.unicode[name]) { return {text: [can.page.unicode[name], "", "icon"]} }
|
||||||
|
if (can.base.beginWith(name, "bi ")) { return {icon: name} }
|
||||||
|
if (icon[name]) { return {icon: icon[name]} }
|
||||||
|
},
|
||||||
requireChina: function(can, title, list, name, path) {
|
requireChina: function(can, title, list, name, path) {
|
||||||
can.onappend.plugin(can, {title: title, display: "/plugin/story/china.js", style: html.FLOAT, height: can.ConfHeight(), width: can.ConfHeight()}, function(sub) {
|
can.onappend.plugin(can, {title: title, display: "/plugin/story/china.js", style: html.FLOAT, height: can.ConfHeight(), width: can.ConfHeight()}, function(sub) {
|
||||||
sub.run = function(event, cmds, cb) { var msg = can.request(event, {title: title, name: name, path: path})
|
sub.run = function(event, cmds, cb) { var msg = can.request(event, {title: title, name: name, path: path})
|
||||||
|
@ -28,7 +28,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}
|
}
|
||||||
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
|
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
|
||||||
can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
can.onappend._plugin(can, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
||||||
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}), (msg[ice.MSG_PREFIX]? msg[ice.MSG_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
|
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; can.run(can.request(event, {pod: item.space}), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
|
||||||
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
|
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, true), cb && cb(sub)
|
||||||
if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
if (item.style == html.FLOAT) { return } can.onmotion.delay(can, function() { can.onmotion.scrollIntoView(can, sub._target) }, 300)
|
||||||
sub.onexport.output = function() { if (tabs) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION))
|
sub.onexport.output = function() { if (tabs) { msg.Option(ice.MSG_ACTION) && can.onappend._action(can, msg.Option(ice.MSG_ACTION))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user