1
0
forked from x/volcanos
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-05-19 23:49:40 +08:00
parent c76de6fef0
commit d80ac7b091
5 changed files with 24 additions and 20 deletions

View File

@ -736,15 +736,11 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
append(can.page.Append(can, target, [html.LAYOUT])._target, type==FLOW? FLEX: FLOW, item) append(can.page.Append(can, target, [html.LAYOUT])._target, type==FLOW? FLEX: FLOW, item)
} else if (can.base.isObject(item)) { } else if (can.base.isObject(item)) {
if (item.index) { item._index = count++, ui.size[item._index] = item.height||item.width if (item.index) { item._index = count++, ui.size[item._index] = item.height||item.width
item.type = item.type||"story", item.layout = function(height, width) { item.type = item.type||"story", item.layout = function(height, width) { can.page.style(can, ui[item._index], html.WIDTH, width) }
can.page.style(can, ui[item._index], html.WIDTH, width)
}
can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub]) can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
item.layout = function(height, width) { sub.onimport.size(sub, height, width, false) } item.layout = function(height, width) { sub.onimport.size(sub, height, width, false) }
can.onmotion.select(can, sub._target.parentNode, html.FIELDSET, sub._target) can.onmotion.select(can, sub._target.parentNode, html.FIELDSET, sub._target)
sub.onexport._output = function() { can.onimport.layout(can) sub.onexport._output = function() { can.onimport.layout(can), can.onmotion.delay(can, function() { can.onmotion.toggle(can, target, true) }) }
can.onmotion.delay(can, function() { can.onmotion.toggle(can, target, true) })
}
}, target, ui[item._index] = can.onappend.field(can, item.type, item, target)._target) }, target, ui[item._index] = can.onappend.field(can, item.type, item, target)._target)
can.base.isIn(item._command, web.PORTAL, web.DESKTOP, aaa.OFFER, aaa.APPLY, code.VIMER) && can.onmotion.hidden(can, target) can.base.isIn(item._command, web.PORTAL, web.DESKTOP, aaa.OFFER, aaa.APPLY, code.VIMER) && can.onmotion.hidden(can, target)
} else { can.page.Append(can, target, [item]) } } else { can.page.Append(can, target, [item]) }
@ -779,13 +775,16 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) {
can.page.Select(can, target, "span.name", function(target, index, list) { can.page.style(can, target, html.MAX_WIDTH, (_width-50)/list.length-40) }) can.page.Select(can, target, "span.name", function(target, index, list) { can.page.style(can, target, html.MAX_WIDTH, (_width-50)/list.length-40) })
}) })
} }
can.db.value._display_plugin && (height = height/2), can.page.style(can, can.ui.content, html.HEIGHT, height) if (can.page.isDisplay(can.ui.display)) {
can.db.value._display_plugin && can.db.value._display_plugin.onimport.size(can.db.value._display_plugin, height-1, width, false) height = height/2, can.page.style(can, can.ui.content, html.HEIGHT, height), can.page.style(can, can.ui.display, html.HEIGHT, height)
can.db.value._display_plugin && can.onmotion.toggle(can, can.ui.display, true) can.db.value._display_plugin && can.db.value._display_plugin.onimport.size(can.db.value._display_plugin, height-1, width, false)
can.db.value._profile_plugin && (width = width/2), can.page.style(can, can.ui.content, html.WIDTH, width) }
can.db.value._profile_plugin && can.db.value._profile_plugin.onimport.size(can.db.value._profile_plugin, height, width-1, false) if (can.page.isDisplay(can.ui.profile)) {
can.db.value._profile_plugin && can.onmotion.toggle(can, can.ui.profile, true) width = width/2, can.page.style(can, can.ui.content, html.WIDTH, width), can.page.style(can, can.ui.profile, html.WIDTH, width)
can.db.value._profile_plugin && can.db.value._profile_plugin.onimport.size(can.db.value._profile_plugin, height, width-1, false)
}
can.db.value._content_plugin && can.db.value._content_plugin.onimport.size(can.db.value._content_plugin, height, width, false) can.db.value._content_plugin && can.db.value._content_plugin.onimport.size(can.db.value._content_plugin, height, width, false)
can.ui.toggle && can.ui.toggle.layout()
} cb && cb(content_height, content_width) } cb && cb(content_height, content_width)
}, delay||0) } }, delay||0) }
can.onimport.layout = can.onimport.layout||function(can) { can.onimport.layout = can.onimport.layout||function(can) {

View File

@ -245,8 +245,9 @@ div.project div.zone>div.list>div.zone>div.item:hover { margin-left:var(--button
div.item>i.bi-chevron-down { float:right; transition:all .5s; } div.item>i.bi-chevron-down { float:right; transition:all .5s; }
div.item.open>i.bi-chevron-down { rotate:-180deg; transition:all .3s; } div.item.open>i.bi-chevron-down { rotate:-180deg; transition:all .3s; }
div.item.text.trans input:not([type=button]) { transition:all 1s; } div.item.text.trans input:not([type=button]) { transition:all 1s; }
div.item.text.trans input:not([type=button]):focus { width:var(--river-width); transition:all .5s; } div.item.text.trans input:not([type=button]):focus { width:var(--project-width); transition:all .5s; }
div.toggle { background-color:var(--hover-bg-color); color:var(--hover-fg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; } div.toggle { background-color:var(--hover-bg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; }
div.toggle:hover { color:var(--hover-fg-color); }
div.toggle.project { top:20%; left:0; border-top-right-radius:var(--plugin-radius); border-bottom-right-radius:var(--plugin-radius); } div.toggle.project { top:20%; left:0; border-top-right-radius:var(--plugin-radius); border-bottom-right-radius:var(--plugin-radius); }
div.content>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); } div.content>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
div.content>div.toggle.display { left:20%; bottom:-52px; rotate:90deg; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); } div.content>div.toggle.display { left:20%; bottom:-52px; rotate:90deg; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); }
@ -737,7 +738,7 @@ fieldset.float>div.action>div.item.button._space.icons { margin-left:0; }
svg text { font-size:var(--svg-font-size); font-family:var(--svg-font-family); stroke:var(--body-fg-color); fill:var(--body-fg-color); cursor:pointer; } svg text { font-size:var(--svg-font-size); font-family:var(--svg-font-family); stroke:var(--body-fg-color); fill:var(--body-fg-color); cursor:pointer; }
svg text.offline { stroke:var(--disable-fg-color); fill:var(--disable-fg-color); } svg text.offline { stroke:var(--disable-fg-color); fill:var(--disable-fg-color); }
svg text:hover { cursor:pointer; } svg text:hover { cursor:pointer; }
svg rect { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); fill:var(--output-bg-color); } svg rect { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); fill:var(--output-bg-color); cursor:pointer; }
svg rect:hover { stroke:var(--hover-fg-color); fill:var(--hover-bg-color); } svg rect:hover { stroke:var(--hover-fg-color); fill:var(--hover-bg-color); }
svg line { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); } svg line { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); }
svg line:hover { stroke:var(--hover-fg-color); } svg line:hover { stroke:var(--hover-fg-color); }

View File

@ -170,7 +170,8 @@ Volcanos("user", {
} } } }
if (can.base.isString(item)||can.base.isNumber(item)) { var _style = can.page.buttonStyle(can, item) if (can.base.isString(item)||can.base.isNumber(item)) { var _style = can.page.buttonStyle(can, item)
return { return {
view: [[html.ITEM, item, _style], html.DIV, (isinput || meta._style == ice.CMD) && !trans? item: can.user.trans(can, item, trans)], // view: [[html.ITEM, item, _style], html.DIV, (isinput || meta._style == ice.CMD) && !trans? item: can.user.trans(can, item, trans)],
view: [[html.ITEM, item, _style], html.DIV, can.user.trans(can, item, trans)],
onmouseenter: function(event) { remove_sub(carte) }, onmouseenter: function(event) { remove_sub(carte) },
onclick: function(event) { click(event, item, index) }, onclick: function(event) { click(event, item, index) },
} }

View File

@ -72,9 +72,12 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
var target = can.onimport.block(can, figure.data.name||meta.shape, data, group); can.core.ItemCB(meta, target, can) var target = can.onimport.block(can, figure.data.name||meta.shape, data, group); can.core.ItemCB(meta, target, can)
return meta._init && meta._init(target), target return meta._init && meta._init(target), target
}, },
layout: function(can) { can.ui.layout && can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { layout: function(can) {
can.page.style(can, can.ui.svg, html.MIN_HEIGHT, height, html.MIN_WIDTH, width) can.ui.svg && can.page.style(can, can.ui.svg, html.MIN_HEIGHT, can.ConfHeight(), html.MIN_WIDTH, can.ConfWidth())
}) }, can.ui.layout && can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) {
can.page.style(can, can.ui.svg, html.MIN_HEIGHT, height, html.MIN_WIDTH, width)
})
},
}) })
Volcanos(chat.ONACTION, {list: [ Volcanos(chat.ONACTION, {list: [
[svg.GO, ctx.RUN, ice.AUTO, "manual"], [ice.MODE, web.DRAW, html.MOVE, html.RESIZE], [svg.GO, ctx.RUN, ice.AUTO, "manual"], [ice.MODE, web.DRAW, html.MOVE, html.RESIZE],

View File

@ -270,7 +270,7 @@ Volcanos(chat.ONEXPORT, {
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) {},
tool: function(can) { can.misc.sessionStorage(can, [can.ConfIndex(), "tool"], JSON.stringify(can.page.Select(can, can._status, html.LEGEND, function(target) { return target._meta }))) }, tool: function(can) { can.misc.sessionStorage(can, [can.ConfIndex(), "tool"], JSON.stringify(can.page.Select(can, can._status, html.LEGEND, function(target) { return target._meta }))) },
hash: function(can, hash) { hash = typeof hash == code.STRING? hash.split(":"): hash || can.core.Item(can.Option(), function(key, value) { return value||"" }) hash: function(can, hash) { hash = typeof hash == code.STRING? hash.split(":").concat(can.core.List(arguments).slice(2)||[]): hash || can.core.Item(can.Option(), function(key, value) { return value||"" })
can.misc.SearchHash(can, hash), can.misc.localStorage(can, [can.ConfSpace()||can.misc.Search(can, ice.POD), can.ConfIndex(), "hash"], hash) can.misc.SearchHash(can, hash), can.misc.localStorage(can, [can.ConfSpace()||can.misc.Search(can, ice.POD), can.ConfIndex(), "hash"], hash)
}, },
session: function(can, key, value) { return can.misc[can.user.isWebview? "localStorage": "sessionStorage"](can, [can.Conf(ctx.INDEX), key, location.pathname].join(":"), value == ""? "": JSON.stringify(value)) }, session: function(can, key, value) { return can.misc[can.user.isWebview? "localStorage": "sessionStorage"](can, [can.Conf(ctx.INDEX), key, location.pathname].join(":"), value == ""? "": JSON.stringify(value)) },