1
0
forked from x/volcanos
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-04-20 07:25:54 +08:00
parent 6a46ee4983
commit 80ff408dc0
3 changed files with 18 additions and 26 deletions

View File

@ -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||{} 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, 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", tcp.SERVER, tcp.CLIENT, web.STUDIO, mdb.SEARCH, web.SERVICE, can.core.Split(can.ConfIndex(), nfs.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(), ) && (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, web.DESKTOP, web.MESSAGE, web.VIMER,
)) && (name = can.core.Keys(item.space||item._space, name)) )) && (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]+")") 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]+")")

View File

@ -1,9 +1,9 @@
/* variable */ /* variable */
body.light { body.light {
--plugin-bg-color:white; --plugin-fg-color:black; --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-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 { body.dark {
--plugin-bg-color:black; --plugin-fg-color:silver; --plugin-bg-color:black; --plugin-fg-color:silver;

View File

@ -12,41 +12,33 @@ Volcanos(chat.ONIMPORT, {
var target = can.onimport.item(can, value, function(event, value) { can.misc.SearchHash(can, hash) var target = can.onimport.item(can, value, function(event, value) { can.misc.SearchHash(can, hash)
if (can.onmotion.cache(can, function(save, load) { if (can.onmotion.cache(can, function(save, load) {
save({ save({
_content: can.ui._content_plugin, _content: can.ui._content_plugin, _profile: can.ui._profile_plugin, _display: can.ui._display_plugin,
_profile: can.ui._profile_plugin,
_display: can.ui._display_plugin,
}), load(hash, function(bak) { }), load(hash, function(bak) {
can.ui._content_plugin = bak._content can.ui._content_plugin = bak._content, can.ui._profile_plugin = bak._profile, can.ui._display_plugin = bak._display
can.ui._profile_plugin = bak._profile
can.ui._display_plugin = bak._display
}) })
return hash return hash
}, can.ui.content, can.ui.profile, can.ui.display)) { }, can.ui.content, can.ui.profile, can.ui.display)) {
can.onmotion.select(can, can._action, html.DIV_TABS, value._tabs); return 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() { 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._cache_data[hash]), delete(value._tabs)
delete(can.ui.profile._cache[hash])
delete(can.ui.display._cache[hash])
}) })
can.core.Item(cb(event, hash, value), function(key, item) { can.core.Item(cb(event, hash, value), function(key, item) { if (!item) { return }
if (!item) { return }
can.onmotion.toggle(can, can.ui[key], true) 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.onimport.layout(can), sub.onexport.output = function() { can.onimport.layout(can) }
}, can.ui[key]) }, can.ui[key])
}) })
}); _select = _select||target, can.db.hash[0] == value.sess && (_select = target) }); _select = _select||target, can.db.hash[0] == value.sess && (_select = target)
}), _select && _select.click() }), _select && _select.click()
}, },
layout: function(can) { layout: function(can) { can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { var height = can.ConfHeight(), width = (can.ConfWidth()-can.ui.project.offsetWidth), margin = 0
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._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._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._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)
can.ui._display_plugin && can.ui._display_plugin.onimport.size(can.ui._display_plugin, height-margin-2, width*2-margin, false) }) },
})
},
}, [""]) }, [""])