mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 08:48:06 +08:00
add some
This commit is contained in:
parent
df5510d467
commit
02e368768b
15
frame.js
15
frame.js
@ -534,8 +534,8 @@ Volcanos(chat.ONAPPEND, {
|
||||
can.page.insertBefore(can, can.onappend.filter(can, can._action, can.ui.content||can._output).parentNode, (can.page.SelectOne(can, can._action, "div.item._space")||{}).nextSibling, can._action)
|
||||
},
|
||||
filter: function(can, target, output) { output = output||can.ui.content||target
|
||||
return can.onappend.input(can, {type: html.TEXT, name: web.FILTER, icon: icon.SEARCH, placeholder: "search in n items", onkeydown: function() {}, onkeyup: function(event) {
|
||||
var value = event.currentTarget? event.currentTarget.value: ""
|
||||
return can.onappend.input(can, {type: html.TEXT, name: web.FILTER, icon: icon.SEARCH, placeholder: can.user.trans(can, "search in n items", "搜索"), onkeydown: function() {}, onkeyup: function(event) {
|
||||
var value = (event.currentTarget? event.currentTarget.value: "").trim()
|
||||
if (can.sub && can.sub.onaction && can.sub.onaction.filter && can.sub.onaction.filter(event, can.sub, value)) {
|
||||
return
|
||||
}
|
||||
@ -638,9 +638,7 @@ Volcanos(chat.ONAPPEND, {
|
||||
if (msg.IsDetail()) {
|
||||
for (var i = 0; i < msg[mdb.KEY].length; i++) {
|
||||
if (msg[mdb.KEY][i] == "action") { var action = msg[mdb.VALUE][i]
|
||||
for (var j = i; j < msg[mdb.KEY].length-1; j++) {
|
||||
msg[mdb.KEY][j] = msg[mdb.KEY][j+1], msg[mdb.VALUE][j] = msg[mdb.VALUE][j+1]
|
||||
}
|
||||
for (var j = i; j < msg[mdb.KEY].length-1; j++) { msg[mdb.KEY][j] = msg[mdb.KEY][j+1], msg[mdb.VALUE][j] = msg[mdb.VALUE][j+1] }
|
||||
msg[mdb.KEY][j] = "action", msg[mdb.VALUE][j] = action
|
||||
break
|
||||
}
|
||||
@ -648,10 +646,8 @@ Volcanos(chat.ONAPPEND, {
|
||||
}
|
||||
var option = can.core.Item(can.Option())
|
||||
var table = can.page.AppendTable(can, msg, target||can.ui.content||can._output, msg.append, cb||function(value, key, index, data, list) { var _value = value
|
||||
if (msg.IsDetail()) {
|
||||
if (key == mdb.VALUE) { key = data.key } data = {}, can.core.List(list, function(item) {
|
||||
data[item.key] = item.value
|
||||
})
|
||||
if (msg.IsDetail()) { if (key == mdb.VALUE) { key = data.key } data = {}
|
||||
can.core.List(list, function(item) { data[item.key] = item.value })
|
||||
if (can.user.isMobile && key == mdb.KEY && !data[value]) { return }
|
||||
if (can.user.isMobile && key != mdb.KEY && !data[key]) { return }
|
||||
}
|
||||
@ -663,6 +659,7 @@ Volcanos(chat.ONAPPEND, {
|
||||
if (key == aaa.AVATAR && value) { _value = img(can.misc.Resource(can, data[key])) }
|
||||
if (key == aaa.BACKGROUND && value) { _value = img(can.misc.Resource(can, data[key])) }
|
||||
if (key == "user_avatar" && value) { _value = img(can.misc.Resource(can, data[key])) }
|
||||
if (key == "auth_avatar" && value) { _value = img(can.misc.Resource(can, data[key])) }
|
||||
if (key == nfs.IMAGE && value) { _value = can.core.List(can.core.Split(data[key]), function(item) { return img(can.misc.ShareCache(can, item, data.space)) }).join("") }
|
||||
// if (key == web.SPACE && value) { _value = can.page.Format(html.A, can.misc.MergePodCmd(can, {pod: value}), value) }
|
||||
// if (key == mdb.NAME && value) { _value = can.user.trans(can, value, null, html.INPUT) }
|
||||
|
@ -195,7 +195,7 @@ div.output.card>div.item>div.title>div.title>span { padding:var(--input-padding)
|
||||
div.output.card>div.item>div.title>div.title>span.exists { color:var(--notice-bg-color); }
|
||||
div.output.card>div.item>div.title>img { height:var(--header-height); width:var(--header-height); margin:0; float:left; }
|
||||
div.output.card>div.item>div.title>img.jpg { padding:var(--input-padding); }
|
||||
div.item.card { position:relative; display:flex; align-items:center; padding:0; }
|
||||
div.item.card:not(.hide) { position:relative; display:flex; align-items:center; padding:0; }
|
||||
// div.output>div.item.card { border:solid 5px var(--plugin-bg-color); }
|
||||
div.item.card img { height:60px; width:60px; margin:5px; }
|
||||
div.item.card div.info { width:100%; }
|
||||
@ -758,9 +758,9 @@ body:not(.width2) fieldset>div.action>div.item.text.filter>input { width:var(--i
|
||||
body:not(.width2) fieldset>div.action>div.item.text.filter>input:focus { width:var(--project-width); transition:all 0.5s; }
|
||||
div.item.text.will>input { border:var(--box-notice); }
|
||||
div.item.text>i:first-child { color:var(--disable-fg-color); position:absolute; left:0; padding:var(--input-padding); }
|
||||
div.item.text:hover>i:first-child { color:unset; }
|
||||
body:mobile(.mobile) div.item.text:hover>i:first-child { color:unset; }
|
||||
div.item.text>span.icon { font-size:var(--icon-font-size); padding:var(--input-padding); position:absolute; right:0; visibility:hidden; }
|
||||
div.item.text:hover>span.icon { visibility:visible; }
|
||||
body:not(.mobile) div.item.text:hover>span.icon { visibility:visible; }
|
||||
div.item.button { position:relative; height:var(--action-height); }
|
||||
div.item.button.icons.state { margin-right:var(--input-margin); }
|
||||
div.item.button.icons>i { font-size:20px; padding:var(--input-padding); }
|
||||
|
@ -318,6 +318,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can._stacks_current = sup._stacks[key] = [can.sup]
|
||||
sup._select = function() { can.onimport.myPluginSelect(can, sup, sup._target.parentNode) }
|
||||
} var plugin = can._stacks_current[0], _action = plugin._action, _output = plugin._output; current = plugin.current||{}
|
||||
value.index == "web.team.renzhengshouquan.profile" && (ACTION_HEIGHT = 0)
|
||||
value.type = html.STORY, value.style = html.OUTPUT, value.height = (can.user.isMobile? window.innerHeight: can.ConfHeight())-ACTION_HEIGHT
|
||||
can.onappend.plugin(can, value, function(sub) { can._stacks_current.push(sub)
|
||||
can.core.List(["_trans", "_style", "_icons", "_trans.input", "_trans.value"], function(key) {
|
||||
@ -339,6 +340,10 @@ Volcanos(chat.ONIMPORT, {
|
||||
sub.onimport._field = function(msg) { var sup = sub; can.onmotion.clear(can, sub._output)
|
||||
msg.Table(function(value) {
|
||||
can.onappend.plugin(can, value, function(sub) {
|
||||
sub.onexport.output = function(_sub, msg) {
|
||||
_sub._stacks_current = can._stacks_current, _sub._stacks_root = can._stacks_root
|
||||
can.onimport.myOption(sub)
|
||||
}
|
||||
var run = sub.run; sub.run = function(event, cmds, cb) {
|
||||
run(sub.request(event, {
|
||||
city_name: current[CITY_NAME], street_name: current[STREET_NAME], place_name: current[PLACE_NAME],
|
||||
@ -412,17 +417,11 @@ Volcanos(chat.ONIMPORT, {
|
||||
return {view: [[html.ITEM_CARD, value._uid? "uid-"+value._uid: ""].concat(value._style||[])], list: [
|
||||
{view: html.ACTION, _init: function(target) { can.page.appendAction(can, value, target) }},
|
||||
{view: html.OUTPUT, list: [
|
||||
{img: can.misc.ResourceIcons(can,
|
||||
value.icons||value.icon||value.command_icon||value.service_icon||
|
||||
value.avatar||value.user_avatar||can.Conf(mdb.ICONS), value.nodename,
|
||||
), onclick: function(event) { can.onkeymap.prevent(event)
|
||||
if (value.auth_uid) {
|
||||
can.onimport.myStory(can, {index: "web.team.renzhengshouquan.profile", args: [value.auth_uid]})
|
||||
} else if (value.user_uid) {
|
||||
can.onimport.myStory(can, {index: "web.team.gonganxitong.user", args: [value.user_uid]})
|
||||
} else {
|
||||
can.onaction.updateAvatar && can.onaction.updateAvatar(event, can)
|
||||
}
|
||||
{img: can.misc.ResourceIcons(can, value.icons||value.icon||value.avatar||
|
||||
value.auth_avatar||value.command_icon||value.service_icon||value.user_avatar||can.Conf(mdb.ICONS), value.nodename,
|
||||
), onclick: function(event) {
|
||||
// can.onkeymap.prevent(event)
|
||||
can.onaction.updateAvatar && can.onaction.updateAvatar(event, can)
|
||||
}},
|
||||
{view: html.CONTAINER, list: list},
|
||||
], _init: function(target) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user