forked from x/volcanos
add some
This commit is contained in:
parent
6a46ee4983
commit
80ff408dc0
4
frame.js
4
frame.js
@ -392,8 +392,8 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
|
||||
|
||||
field: function(can, type, item, target) { type = type||html.STORY, item = item||{}
|
||||
var name = can.core.Split(item.nick||item.index||"", " .").pop()||""; can.base.isIn(name,
|
||||
tcp.SERVER, tcp.CLIENT, web.STUDIO, mdb.SEARCH, web.SERVICE, can.core.Split(can.ConfIndex(), lex.PT).pop(), "launchTemplate",
|
||||
) && (name = (item.index||"").split(lex.PT).slice(-2).join(lex.PT)), (type != html.STORY && type != html.PLUG && !can.base.isIn(can.ConfIndex(),
|
||||
tcp.SERVER, tcp.CLIENT, web.STUDIO, mdb.SEARCH, web.SERVICE, can.core.Split(can.ConfIndex(), nfs.PT).pop(), "launchTemplate",
|
||||
) && (name = (item.index||"").split(nfs.PT).slice(-2).join(nfs.PT)), (type != html.STORY && type != html.PLUG && !can.base.isIn(can.ConfIndex(),
|
||||
web.DESKTOP, web.MESSAGE, web.VIMER,
|
||||
)) && (name = can.core.Keys(item.space||item._space, name))
|
||||
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]+")")
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* variable */
|
||||
body.light {
|
||||
--plugin-bg-color:white; --plugin-fg-color:black;
|
||||
--code-comment:green; --code-keyword:darkblue;
|
||||
--code-keyword:darkblue; --code-comment:green;
|
||||
--code-function:darkcyan; --code-constant:gray; --code-string:brown;
|
||||
--code-object:purple; --code-datatype:cornflowerblue; --code-package:blue;
|
||||
--code-package:blue; --code-datatype:cornflowerblue; --code-object:purple;
|
||||
}
|
||||
body.dark {
|
||||
--plugin-bg-color:black; --plugin-fg-color:silver;
|
||||
|
@ -12,41 +12,33 @@ Volcanos(chat.ONIMPORT, {
|
||||
var target = can.onimport.item(can, value, function(event, value) { can.misc.SearchHash(can, hash)
|
||||
if (can.onmotion.cache(can, function(save, load) {
|
||||
save({
|
||||
_content: can.ui._content_plugin,
|
||||
_profile: can.ui._profile_plugin,
|
||||
_display: can.ui._display_plugin,
|
||||
_content: can.ui._content_plugin, _profile: can.ui._profile_plugin, _display: can.ui._display_plugin,
|
||||
}), load(hash, function(bak) {
|
||||
can.ui._content_plugin = bak._content
|
||||
can.ui._profile_plugin = bak._profile
|
||||
can.ui._display_plugin = bak._display
|
||||
can.ui._content_plugin = bak._content, can.ui._profile_plugin = bak._profile, can.ui._display_plugin = bak._display
|
||||
})
|
||||
return hash
|
||||
}, can.ui.content, can.ui.profile, can.ui.display)) {
|
||||
can.onmotion.select(can, can._action, html.DIV_TABS, value._tabs); return
|
||||
}
|
||||
can.isStoryType() && (value.nick = value.nick.slice(0, 6))
|
||||
value._tabs = can.onimport.tabs(can, [value], function() { target.click() }, function() {
|
||||
delete(value._tabs), delete(can._cache_data[hash])
|
||||
delete(can.ui.content._cache[hash])
|
||||
delete(can.ui.profile._cache[hash])
|
||||
delete(can.ui.display._cache[hash])
|
||||
delete(can.ui.content._cache[hash]), delete(can.ui.profile._cache[hash]), delete(can.ui.display._cache[hash])
|
||||
delete(can._cache_data[hash]), delete(value._tabs)
|
||||
})
|
||||
can.core.Item(cb(event, hash, value), function(key, item) {
|
||||
if (!item) { return }
|
||||
can.core.Item(cb(event, hash, value), function(key, item) { if (!item) { return }
|
||||
can.onmotion.toggle(can, can.ui[key], true)
|
||||
item && can.onappend.plugin(can, item, function(sub) { can.ui["_"+key+"_plugin"] = sub
|
||||
can.onappend.plugin(can, item, function(sub) { can.ui["_"+key+"_plugin"] = sub
|
||||
can.onimport.layout(can), sub.onexport.output = function() { can.onimport.layout(can) }
|
||||
}, can.ui[key])
|
||||
})
|
||||
}); _select = _select||target, can.db.hash[0] == value.sess && (_select = target)
|
||||
}), _select && _select.click()
|
||||
},
|
||||
layout: function(can) {
|
||||
can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
|
||||
layout: function(can) { can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
|
||||
var height = can.ConfHeight(), width = (can.ConfWidth()-can.ui.project.offsetWidth), margin = 0
|
||||
can.ui._profile_plugin && (width /= 2), can.ui._display_plugin && (height /= 2)
|
||||
can.ui._content_plugin && can.ui._content_plugin.onimport.size(can.ui._content_plugin, height-margin, width-margin-1, false)
|
||||
can.ui._profile_plugin && can.ui._profile_plugin.onimport.size(can.ui._profile_plugin, height-margin, width-margin-1, false)
|
||||
can.ui._display_plugin && can.ui._display_plugin.onimport.size(can.ui._display_plugin, height-margin-2, width*2-margin, false)
|
||||
})
|
||||
},
|
||||
}) },
|
||||
}, [""])
|
||||
|
Loading…
x
Reference in New Issue
Block a user