forked from x/volcanos
opt some
This commit is contained in:
parent
e354cf4d2f
commit
6313d57ff6
@ -464,6 +464,7 @@ body>div.input.login>div.display>label { color:var(--disable-fg-color); font-sty
|
||||
body>div.input.login>div.display>span.item { font-style:italic; word-break:break-all; border-left:var(--box-notice3); padding-left:var(--button-padding); margin:var(--button-margin) 0; }
|
||||
body>div.input.login>div.display div.sso { cursor:pointer; }
|
||||
body>div.input.login>div.display div.sso div.item { padding:var(--input-padding); }
|
||||
body.mobile>div.input.login>div.display div.sso div.item.relay { display:none; }
|
||||
body>div.input.login>div.display div.sso div.item:hover { background-color:var(--hover-bg-color); }
|
||||
body>div.input.login>div.display div.sso div.item>img { height:var(--action-height); width:var(--action-height); }
|
||||
body>div.input.login>div.display div.sso div.item>span { line-height:var(--action-height); padding:var(--input-padding); }
|
||||
|
@ -405,7 +405,7 @@ Volcanos("user", {
|
||||
{text: ["$ "+_cmd, "", html.ITEM], title: "点击复制,并后台执行此命令,即可登录", style: {cursor: "copy"}, onclick: function() { can.user.copy(event, can, _cmd) }},
|
||||
hassso && {text: [can.user.trans(can, "or oauth login", "或第三方授权: "), html.LABEL]},
|
||||
hassso && {view: [["sso", html.FLEX]], list: _msg.Table(function(value) {
|
||||
return value.type == "oauth" && {view: [[html.ITEM, html.FLEX]], title: value.link, list: [
|
||||
return value.type == "oauth" && {view: [[html.ITEM, value.name, html.FLEX]], title: value.link, list: [
|
||||
{img: can.misc.Resource(can, value.icons)}, {text: can.user.trans(can, value.name, value.help)},
|
||||
], onclick: function() {
|
||||
can.user.jumps(can.base.MergeURL(value.link, ice.BACK, location.href))
|
||||
@ -419,7 +419,7 @@ Volcanos("user", {
|
||||
]}]), window.parent != window && window.innerHeight < 480 && can.onmotion.hidden(can, ui.output)
|
||||
can.page.style(can, ui._target, {
|
||||
left: (can.page.width()-ui._target.offsetWidth)/2,
|
||||
top: can.page.height() < 480? (can.page.height()-ui._target.offsetHeight)/2: (can.page.height()-can.base.Min(ui._target.offsetHeight, 420)-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4+html.HEADER_HEIGHT,
|
||||
top: can.user.isMobile? 20: can.page.height() < 480? (can.page.height()-ui._target.offsetHeight)/2: (can.page.height()-can.base.Min(ui._target.offsetHeight, 420)-html.HEADER_HEIGHT-html.ACTION_HEIGHT)/4+html.HEADER_HEIGHT,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -32,6 +32,8 @@ div.item:not(.string):not(.number):not(.boolean)>span.value { color:var(--disabl
|
||||
span.item:not(.string):not(.number):not(.boolean)>span.value { color:var(--disable-fg-color); font-style:italic; }
|
||||
fieldset.debug div.output table.content * { font-size:14px; }
|
||||
fieldset.debug span.path { color:silver; font-style:italic; }
|
||||
html.login body.width1 fieldset.Footer { display:none; }
|
||||
html.login body.width1 fieldset.Header { display:none; }
|
||||
body.dark fieldset.debug span.path { color:gray; }
|
||||
body.dark fieldset.debug span.target { color:gray; }
|
||||
body.dark div.item:not(.string):not(.number):not(.boolean)>span.value { color:gray; }
|
||||
|
@ -1,3 +1,4 @@
|
||||
fieldset.inner>div.output div.content { position:relative; }
|
||||
fieldset.inner>div.output div.content td.text { height:var(--code-line-height); }
|
||||
fieldset.inner>div.output div.content td.text span.keyword { color:var(--code-keyword); box-shadow:var(--keyword-box-shadow); }
|
||||
fieldset.inner>div.output div.content td.text span.comment { color:var(--code-comment); }
|
||||
@ -103,4 +104,4 @@ body:not(.windows) fieldset.inner>div.output>div.layout>div.tabs { font-family:v
|
||||
body:not(.windows) fieldset.inner>div.output>div.layout>div.path { font-family:var(--code-font-family); font-size:var(--code-font-size); }
|
||||
body.windows fieldset.inner.cmd>div.output>div.layout>div.tabs>div.icon>div.icon { font-size:20px !important; padding-top:6px; }
|
||||
body.windows fieldset.inner>div.output>div.layout>div.path span.view { margin-top:0; }
|
||||
body.windows fieldset.inner>div.output>div.layout>div.path span.view { font-style:normal; }
|
||||
body.windows fieldset.inner>div.output>div.layout>div.path span.view { font-style:normal; }
|
||||
|
@ -258,7 +258,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
})
|
||||
}) },
|
||||
layout: function(can) {
|
||||
if (can.Conf(ctx.STYLE) == html.OUTPUT) { return can.page.style(can, can.ui.content, html.WIDTH, (can.Conf("_width")||can.ConfWidth())-5) }
|
||||
if (can.Conf(ctx.STYLE) == html.OUTPUT) { return can.page.style(can, can.ui.content, html.WIDTH, (can.Conf("_width")||can.ConfWidth())-(can.user.isMobile? 3: 5)) }
|
||||
if (can.isSimpleMode() && !can.page.tagis(can._fields, html.FIELDSET_FLOAT)) { can.page.style(can, can._output, html.MAX_HEIGHT, "") }
|
||||
if (can.isSimpleMode()) { can.ui.layout(can.ConfHeight(), can.ConfWidth()); return can.page.style(can, can.ui.content, html.WIDTH, can.ConfWidth()) }
|
||||
if (can.isCmdMode()) { can.page.style(can, can._output, html.HEIGHT, can.ConfHeight(can.page.height())) }
|
||||
|
@ -21,7 +21,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
list: function(can, root, cb, cbs, target) { target = target||can._output
|
||||
can.core.List(root.list, function(item) { var ui = can.page.Append(can, target, [{view: [[html.ITEM, "open"]], list: [{text: item.meta.name}, item.list && {icon: icon.CHEVRON_DOWN}], onclick: function(event) {
|
||||
can.page.ClassList.set(can, ui.item, "open", can.base.isFunc(cb) && cb(event, item) || can.onmotion.toggle(can, ui.list))
|
||||
can.onmotion.select(can, target, html.DIV_ITEM, event.target)
|
||||
can.onmotion.select(can, target, html.DIV_ITEM, event.currentTarget)
|
||||
}, _init: function(target) { if (item.meta.name == "_") { target.innerHTML = "", can.onappend.style(can, html.SPACE, target) }
|
||||
cbs && cbs(target, item)
|
||||
}}, {view: html.LIST}]); can.onimport.list(can, item, cb, cbs, ui.list) })
|
||||
@ -77,7 +77,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
}) }
|
||||
},
|
||||
field: function(can, meta, target) { var item = can.base.Obj(meta.meta), padding = can.Conf(html.PADDING)
|
||||
var height = can.base.Max(html.STORY_HEIGHT, can.ConfHeight()-4*html.ACTION_HEIGHT-2*padding), width = item.width||can.ConfWidth()-2*padding-2
|
||||
var height = can.base.Max(html.STORY_HEIGHT, can.ConfHeight()-4*html.ACTION_HEIGHT-2*padding), width = item.width||can.ConfWidth()-2*padding
|
||||
can.core.Item(item, function(key, value) { if (can.base.beginWith(key, "meta.")) { can.core.Value(item, key, value), delete(item[key]) } })
|
||||
can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
|
||||
can.core.Value(item, "auto.cmd") && can.onmotion.delay(function() { sub.runAction(sub.request({}, can.core.Value(item, "opts")), can.core.Value(item, "auto.cmd")) })
|
||||
@ -85,6 +85,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.page.style(can, sub._output, html.MAX_HEIGHT, "", "overflow-y", "hidden")
|
||||
sub.sub && sub.sub.ui.content && can.page.style(can, sub.sub.ui.content, html.HEIGHT, "", "overflow-y", "hidden")
|
||||
}, sub.onimport.size(sub, height, width, true)
|
||||
can.onimport.layout(can)
|
||||
}, can._output, target)
|
||||
},
|
||||
layout: function(can) { padding = can.Conf(html.PADDING)
|
||||
|
Loading…
x
Reference in New Issue
Block a user