1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-02-26 00:02:46 +08:00
parent d24d8120ea
commit 1b5d0525e5
10 changed files with 24 additions and 14 deletions

View File

@ -331,3 +331,6 @@ div.content::-webkit-scrollbar { width:0 !important; height:0 !important; }
div.carte::-webkit-scrollbar { width:0 !important; height:0 !important; } div.carte::-webkit-scrollbar { width:0 !important; height:0 !important; }
div.status::-webkit-scrollbar { width:0 !important; height:0 !important; } div.status::-webkit-scrollbar { width:0 !important; height:0 !important; }
div.toggle::-webkit-scrollbar { width:0 !important; height:0 !important; } div.toggle::-webkit-scrollbar { width:0 !important; height:0 !important; }
body.windows form.option>div.icon { font-size:21px; }
body.windows fieldset.inner.cmd>div.output>div.layout.flow>div.tabs div.website.icon { line-height:36px; }

View File

@ -37,7 +37,7 @@ Volcanos("user", {
opens: function(url) { window.openurl? window.openurl(url): (window.open(url) || (location.href = url)) }, opens: function(url) { window.openurl? window.openurl(url): (window.open(url) || (location.href = url)) },
open: function(url) { window.open(url) || (location.href = url) }, open: function(url) { window.open(url) || (location.href = url) },
close: function(url) { window.close() }, close: function(url) { window.close() },
theme: function(can, name) { can.base.isString(name) && (name = [name]) || name || [] theme: function(can, name) { can.base.isString(name) && (name = [name]) || name || [], can.user.isWindows && name.push("windows")
can.user.isWebview && name.push(html.WEBVIEW), can.user.isMobile && name.push(html.MOBILE) && can.user.isLandscape() && name.push(html.LANDSCAPE) can.user.isWebview && name.push(html.WEBVIEW), can.user.isMobile && name.push(html.MOBILE) && can.user.isLandscape() && name.push(html.LANDSCAPE)
can.user.language(can) && name.push(can.user.language(can)), can.page.styleClass(can, document.body, name.join(ice.SP)) can.user.language(can) && name.push(can.user.language(can)), can.page.styleClass(can, document.body, name.join(ice.SP))
}, },

View File

@ -80,7 +80,7 @@ Volcanos(chat.ONLAYOUT, {
can.core.List(can._plugins, function(sub) { sub._delay_refresh = true }) can.core.List(can._plugins, function(sub) { sub._delay_refresh = true })
can.onmotion.select(can, can._action, html.DIV_TABS, can.onmotion.select(can, can._action, html.DIV_TABS)||0, function(target) { target.click() }); return true can.onmotion.select(can, can._action, html.DIV_TABS, can.onmotion.select(can, can._action, html.DIV_TABS)||0, function(target) { target.click() }); return true
}, },
tabview: function(can) { can.getActionSize(function(height, width) { can.ConfHeight(height), can.ConfWidth(width) }) tabview: function(can) { can.getActionSize(function(height, width) { can.ConfHeight(height+html.ACTION_HEIGHT), can.ConfWidth(width) })
can.core.List(can._plugins, function(sub) { sub._delay_refresh = true }), can.onmotion.toggle(can, can._header_tabs, true) can.core.List(can._plugins, function(sub) { sub._delay_refresh = true }), can.onmotion.toggle(can, can._header_tabs, true)
can.onmotion.select(can, can._action, html.DIV_TABS, can.onmotion.select(can, can._action, html.DIV_TABS)||0, function(target) { target.click() }); return true can.onmotion.select(can, can._action, html.DIV_TABS, can.onmotion.select(can, can._action, html.DIV_TABS)||0, function(target) { target.click() }); return true
}, },
@ -138,6 +138,7 @@ Volcanos(chat.ONKEYMAP, {
normal: { normal: {
j: function(event, can, target) { target.scrollBy(0, event.ctrlKey? 300: 30) }, j: function(event, can, target) { target.scrollBy(0, event.ctrlKey? 300: 30) },
k: function(event, can, target) { target.scrollBy(0, event.ctrlKey? -300: -30) }, k: function(event, can, target) { target.scrollBy(0, event.ctrlKey? -300: -30) },
r: function(event, can, target) { can.user.reload(true) },
t: function(event, can) { can.onkeymap.toggleLayout(can, TABVIEW) }, t: function(event, can) { can.onkeymap.toggleLayout(can, TABVIEW) },
h: function(event, can) { can.onkeymap.toggleLayout(can, HORIZON) }, h: function(event, can) { can.onkeymap.toggleLayout(can, HORIZON) },
v: function(event, can) { can.onkeymap.toggleLayout(can, VERTICAL) }, v: function(event, can) { can.onkeymap.toggleLayout(can, VERTICAL) },

View File

@ -1,11 +1,12 @@
fieldset.Footer>div.output { padding:0 5px; height:31px; } fieldset.Footer>div.output { padding:0; height:31px; }
fieldset.Footer>div.output div { padding:5px; height:31px; cursor:pointer; } fieldset.Footer>div.output div { padding:5px; height:31px; cursor:pointer; }
fieldset.Footer>div.output div:hover { background-color:#2e515f; } fieldset.Footer>div.output div:hover { background-color:#2e515f; }
fieldset.Footer>div.output div.title:first-child { text-align:center; margin-right:10px; width:230px; }
fieldset.Footer>div.output div.title { float:left; } fieldset.Footer>div.output div.title { float:left; }
fieldset.Footer>div.output div.state { float:right; } fieldset.Footer>div.output div.state { float:right; }
fieldset.Footer>div.output div.state label { font-size:12px; } fieldset.Footer>div.output div.state label { font-size:12px; }
fieldset.Footer>div.output div.toast { background-color:darkcyan; float:right; } fieldset.Footer>div.output div.toast { background-color:darkcyan; float:right; }
fieldset.Footer>div.output div.cmd { padding:0; margin-left:40px; } fieldset.Footer>div.output div.cmd { padding:0; }
fieldset.Footer>div.output div.cmd>span.delete { top:1px; right:5px; } fieldset.Footer>div.output div.cmd>span.delete { top:1px; right:5px; }
fieldset.Footer>div.output div.cmd>input[name=cmd] { margin-right:0; width:120px; transition:all 1s; } fieldset.Footer>div.output div.cmd>input[name=cmd] { margin-right:0; width:120px; transition:all 1s; }
fieldset.Footer>div.output div.cmd>input[name=cmd]:focus { width:320px; transition:all 0.5s; } fieldset.Footer>div.output div.cmd>input[name=cmd]:focus { width:320px; transition:all 0.5s; }

View File

@ -4,6 +4,9 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, target) { can.Conf(NKEY, can.
can.onimport._state(can, msg, target), can.onimport._toast(can, msg, target) can.onimport._state(can, msg, target), can.onimport._toast(can, msg, target)
}, },
_title: function(can, msg, target) { can.user.isMobile || can.core.List(can.Conf(chat.TITLE)||msg.result, function(item) { _title: function(can, msg, target) { can.user.isMobile || can.core.List(can.Conf(chat.TITLE)||msg.result, function(item) {
if (can.base.contains(item, ice.AT)) {
item = '<a href="mailto:'+item+'">'+item+'</a>'
}
can.page.Append(can, target, [{view: [chat.TITLE, "", item], title: "联系站长"}]) can.page.Append(can, target, [{view: [chat.TITLE, "", item], title: "联系站长"}])
}) }, }) },
_state: function(can, msg, target) { can.user.isMobile || can.core.List(can.base.Obj(can.Conf(chat.STATE)||msg.Option(chat.STATE), [NTIP, NLOG, NCMD, NKEY]).reverse(), function(item) { _state: function(can, msg, target) { can.user.isMobile || can.core.List(can.base.Obj(can.Conf(chat.STATE)||msg.Option(chat.STATE), [NTIP, NLOG, NCMD, NKEY]).reverse(), function(item) {

View File

@ -1,13 +1,14 @@
fieldset.Header>div.output { font-size:1.1rem; line-height:21px; padding:0 5px; height:31px; overflow:hidden; } fieldset.Header>div.output { font-size:1.1rem; line-height:21px; padding:0; height:31px; overflow:hidden; }
fieldset.Header>div.output div { height:31px; float:left; cursor:pointer; } fieldset.Header>div.output div { height:31px; float:left; cursor:pointer; }
fieldset.Header>div.output div:hover { background-color:#2e515f; } fieldset.Header>div.output div:hover { background-color:#2e515f; }
fieldset.Header>div.output div.menu { padding:5px; } fieldset.Header>div.output div.menu { padding:5px; }
fieldset.Header>div.output div.title { padding:5px; } fieldset.Header>div.output div.title { padding:5px; }
fieldset.Header>div.output div.title:first-child { text-align:center; margin-right:10px; width:230px; }
fieldset.Header>div.output div.state { padding:5px; float:right; } fieldset.Header>div.output div.state { padding:5px; float:right; }
fieldset.Header>div.output div.state.time { margin-left:10px; } fieldset.Header>div.output div.state.time { margin-left:10px; }
fieldset.Header>div.output div.state.avatar { padding:0; } fieldset.Header>div.output div.state.avatar { padding:0; }
fieldset.Header>div.output div.state.avatar>img { height:31px; } fieldset.Header>div.output div.state.avatar>img { height:31px; }
fieldset.Header>div.output div.search.title { padding:0; margin-left:20px; } fieldset.Header>div.output div.search.title { padding:0; }
fieldset.Header>div.output div.search>span.delete { top:1px; right:5px; } fieldset.Header>div.output div.search>span.delete { top:1px; right:5px; }
fieldset.Header>div.output div.search>input { margin-right:0; transition:all 1s; } fieldset.Header>div.output div.search>input { margin-right:0; transition:all 1s; }
fieldset.Header>div.output div.search>input:focus { width:320px; transition:all 0.5s; } fieldset.Header>div.output div.search>input:focus { width:320px; transition:all 0.5s; }

View File

@ -1,6 +1,6 @@
fieldset.River { width:180px; float:left; } fieldset.River { width:230px; float:left; }
fieldset.River>div.action { padding:0 12px; display:block; } fieldset.River>div.action { padding:0 10px; display:block; }
fieldset.River>div.output { width:180px; } fieldset.River>div.output { width:230px; }
fieldset.River>div.output div.item { padding:3px 16px; border-left:solid 3px #00ffae; } fieldset.River>div.output div.item { padding:3px 16px; border-left:solid 3px #00ffae; }
fieldset.River>div.output div.list div.item { border-left:solid 3px #ccdc4c; } fieldset.River>div.output div.list div.item { border-left:solid 3px #ccdc4c; }
fieldset.River>div.output div.list { padding-left:5px; margin-left:8px; } fieldset.River>div.output div.list { padding-left:5px; margin-left:8px; }

View File

@ -12,7 +12,7 @@ fieldset.inner>div.output div.content td.text span.object { color:cyan; }
fieldset.inner>div.output>div.layout>div.layout>div.content * { font-family:monospace; font-size:14px; outline:none; } fieldset.inner>div.output>div.layout>div.layout>div.content * { font-family:monospace; font-size:14px; outline:none; }
fieldset.inner>div.output>div.layout>div.path { font-family:monospace; font-size:14px; } fieldset.inner>div.output>div.layout>div.path { font-family:monospace; font-size:14px; }
fieldset.inner>div.output>div.layout>div.tabs { font-family:monospace; font-size:14px; } fieldset.inner>div.output>div.layout>div.tabs { font-family:monospace; font-size:14px; }
fieldset.inner>div.output>div.project { width:220px; } fieldset.inner>div.output>div.project { width:230px; }
fieldset.inner>div.output>div.project div.action { width:100%; } fieldset.inner>div.output>div.project div.action { width:100%; }
fieldset.inner>div.output>div.project * { font-family:monospace; font-size:14px; outline:none; } fieldset.inner>div.output>div.project * { font-family:monospace; font-size:14px; outline:none; }
fieldset.inner>div.output>div.project>div.zone>div.item span.icon { font-size:22px; line-height:18px; width:20px; float:right; display:none; } fieldset.inner>div.output>div.project>div.zone>div.item span.icon { font-size:22px; line-height:18px; width:20px; float:right; display:none; }

View File

@ -42,7 +42,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
{name: can.page.unicode.menu, onclick: function() { {name: can.page.unicode.menu, onclick: function() {
can.user.carte(event, can, can.onaction, can.onaction.list.concat(can.user.isWebview? ["全屏", "录屏", "编辑器", "浏览器"]: [])) can.user.carte(event, can, can.onaction, can.onaction.list.concat(can.user.isWebview? ["全屏", "录屏", "编辑器", "浏览器"]: []))
}}, }},
{name: can.page.unicode.back, style: {"font-size": "14px", "padding-top": "3px"}, onclick: function(event) { false && {name: can.page.unicode.back, style: {"font-size": "14px", "padding-top": "3px"}, onclick: function(event) {
var list = {}; can.user.carte(event, can, {_style: "history"}, can.core.List(can.db.history, function(item) { var list = {}; can.user.carte(event, can, {_style: "history"}, can.core.List(can.db.history, function(item) {
var value = [item.path, item.file, item.line, ice.TB+(item.text&&item.text.length>30? item.text.slice(0, 30)+"...": item.text||"")].join(ice.DF); if (!list[value]) { list[value] = item; return value } var value = [item.path, item.file, item.line, ice.TB+(item.text&&item.text.length>30? item.text.slice(0, 30)+"...": item.text||"")].join(ice.DF); if (!list[value]) { list[value] = item; return value }
}).reverse(), function(event, button, meta, carte) { carte.close() }).reverse(), function(event, button, meta, carte) { carte.close()
@ -50,7 +50,7 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg, cb, target) { can.onmotion.cl
}) })
}}, }},
{name: can.page.unicode.refresh, style: {"font-size": "24px", "padding-top": "1px"}, onclick: function() { location.reload() }}, {name: can.page.unicode.refresh, style: {"font-size": "24px", "padding-top": "1px"}, onclick: function() { location.reload() }},
{name: can.page.unicode.reback, style: {"font-size": "14px", "padding-top": "3px"}, onclick: function() { false && {name: can.page.unicode.reback, style: {"font-size": "14px", "padding-top": "3px"}, onclick: function() {
var list = {}; can.user.carte(event, can, {_style: "tabview"}, can.core.Item(can.db.tabview), function(event, button, meta, carte) { carte.close() var list = {}; can.user.carte(event, can, {_style: "tabview"}, can.core.Item(can.db.tabview), function(event, button, meta, carte) { carte.close()
var ls = button.split(ice.DF); can.onimport.tabview(can, ls[0], ls[1]) var ls = button.split(ice.DF); can.onimport.tabview(can, ls[0], ls[1])
}) })

View File

@ -56,7 +56,7 @@ Volcanos(chat.ONFIGURE, {
}) }}) }) }})
}) }, }) },
}) })
Volcanos(chat.ONACTION, {list: ["提交", "调试", "首页", "官网", "源码", "百度"], Volcanos(chat.ONACTION, {list: ["提交", "调试", "首页", "官网", "源码"],
_daemon: function(event, can, arg) { switch (arg[0]) { _daemon: function(event, can, arg) { switch (arg[0]) {
case web.DREAM: can.runAction({}, arg[0], arg.slice(1), function(msg) { can.onimport.tabview(can, can.Option(nfs.PATH), can.core.Keys(can.misc.Search(can, ice.POD), msg.Option(mdb.NAME)), web.DREAM) }); break case web.DREAM: can.runAction({}, arg[0], arg.slice(1), function(msg) { can.onimport.tabview(can, can.Option(nfs.PATH), can.core.Keys(can.misc.Search(can, ice.POD), msg.Option(mdb.NAME)), web.DREAM) }); break
case code.XTERM: can.runAction({}, arg[0], arg.slice(1), function(msg) { can.onimport.tabview(can, ctx.COMMAND, code.XTERM, msg.Result()) }); break case code.XTERM: can.runAction({}, arg[0], arg.slice(1), function(msg) { can.onimport.tabview(can, ctx.COMMAND, code.XTERM, msg.Result()) }); break
@ -109,7 +109,6 @@ Volcanos(chat.ONACTION, {list: ["提交", "调试", "首页", "官网", "源码"
"提交": function(event, can) { can.onimport.tabview(can, can.Option(nfs.PATH), "web.code.git.status", ctx.INDEX) }, "提交": function(event, can) { can.onimport.tabview(can, can.Option(nfs.PATH), "web.code.git.status", ctx.INDEX) },
"官网": function(event, can) { can.user.open("https://contexts.com.cn/") }, "官网": function(event, can) { can.user.open("https://contexts.com.cn/") },
"源码": function(event, can) { can.user.open("https://shylinux.com/") }, "源码": function(event, can) { can.user.open("https://shylinux.com/") },
"百度": function(event, can) { can.user.opens("https://baidu.com/") },
"全屏": function(event, can) { can._target.requestFullScreen() }, "全屏": function(event, can) { can._target.requestFullScreen() },
"录屏": function(event, can) { window.openapp("QuickTime Player") }, "录屏": function(event, can) { window.openapp("QuickTime Player") },
"编辑器": function(event, can) { window.opencmd("cd ~/contexts; vim +"+can.Option(nfs.LINE)+" "+can.Option(nfs.PATH)+can.Option(nfs.FILE)) }, "编辑器": function(event, can) { window.opencmd("cd ~/contexts; vim +"+can.Option(nfs.LINE)+" "+can.Option(nfs.PATH)+can.Option(nfs.FILE)) },
@ -278,12 +277,14 @@ Volcanos(chat.ONKEYMAP, {
zt: shy("将当前行拉到屏幕最上", function(can, count) { return can.current.scroll(can.current.scroll()-(count>1? count: 3)), true }), zt: shy("将当前行拉到屏幕最上", function(can, count) { return can.current.scroll(can.current.scroll()-(count>1? count: 3)), true }),
zz: shy("将当前行拉到屏幕中间", function(can, count) { return can.current.scroll(can.current.scroll()-(count = count>1? count: can.current.window()/2)), true }), zz: shy("将当前行拉到屏幕中间", function(can, count) { return can.current.scroll(can.current.scroll()-(count = count>1? count: can.current.window()/2)), true }),
zb: shy("将当前行拉到屏幕最下", function(can, count) { return can.current.scroll(can.current.scroll()-can.current.window()+(count>1? count: 5)), true }), zb: shy("将当前行拉到屏幕最下", function(can, count) { return can.current.scroll(can.current.scroll()-can.current.window()+(count>1? count: 5)), true }),
r: shy("向上滚屏", function(can) { can.user.reload(true) }),
}, },
normal_ctrl: { normal_ctrl: {
f: shy("向下翻页", function(can, count) { var line = can.onaction.selectLine(can)+can.current.window()-3-can.current.scroll(); return can.current.scroll(line), can.onaction.selectLine(can, line), true }), f: shy("向下翻页", function(can, count) { var line = can.onaction.selectLine(can)+can.current.window()-3-can.current.scroll(); return can.current.scroll(line), can.onaction.selectLine(can, line), true }),
b: shy("向上翻页", function(can, count) { var line = can.onaction.selectLine(can)-can.current.window()+3; return can.current.scroll(line), can.onaction.selectLine(can, line), true }), b: shy("向上翻页", function(can, count) { var line = can.onaction.selectLine(can)-can.current.window()+3; return can.current.scroll(line), can.onaction.selectLine(can, line), true }),
e: shy("向下滚屏", function(can) { can.current.scroll(1) }), e: shy("向下滚屏", function(can) { can.current.scroll(1) }),
y: shy("向上滚屏", function(can) { can.current.scroll(-1) }), y: shy("向上滚屏", function(can) { can.current.scroll(-1) }),
r: shy("向上滚屏", function(can) { can.user.reload(true) }),
}, },
insert_ctrl: { insert_ctrl: {
f: shy("光标右移", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, 1) }), f: shy("光标右移", function(can, target) { can.user.isWindows && can.onkeymap.cursorMove(target, 1) }),