mirror of
https://shylinux.com/x/volcanos
synced 2025-04-26 01:04:06 +08:00
add chat.script
This commit is contained in:
parent
74358a88fa
commit
964a79885e
51
index.css
51
index.css
@ -579,14 +579,14 @@ body.print fieldset.draw div.output { background-color:lightgray; }
|
||||
body.print fieldset.draw div.output div.content svg { background-color:lightgray; }
|
||||
/* misc */
|
||||
body:not(.debug) fieldset.plugin.can._notfound { display:none; }
|
||||
fieldset.cmd>div.output>fieldset.xterm.story>form.option>div.item.hash input { width:var(--plug-width); }
|
||||
fieldset.cmd>div.output>fieldset.iframe.story>form.option>div.item.hash input { width:var(--plug-width); }
|
||||
fieldset.inner.float>div.status { display:none; }
|
||||
fieldset.inner>div.output>div.project div.item.modify { background-color:#00800036; }
|
||||
fieldset.vimer>div.output>div.project div.item.modify { background-color:#00800036; }
|
||||
fieldset.vimer>div.output>div.project>div.zone.space div.item.stop { color:var(--disable-fg-color); }
|
||||
fieldset.vimer>div.output>div.project>div.zone.space fieldset>div.output>div.item { height:42px; }
|
||||
fieldset.xterm>div.action>div.tabs:only-child { display:none; }
|
||||
fieldset.cmd>div.output>fieldset.xterm.story>form.option>div.item.hash input { width:var(--plug-width); }
|
||||
fieldset.cmd>div.output>fieldset.iframe.story>form.option>div.item.hash input { width:var(--plug-width); }
|
||||
fieldset.xterm>div.layout { clear:both; }
|
||||
fieldset.xterm div.layout div.output { border-left:var(--box-border); border-top:var(--box-border); }
|
||||
fieldset.xterm div.layout div.output.select { border:var(--box-border)}
|
||||
@ -603,17 +603,6 @@ fieldset.studio>div.output>fieldset>form.option div.icon.delete { display:none;
|
||||
fieldset.studio>div.output>fieldset>form.option div.icon:nth-child(2) { margin-left:var(--plugin-margin); }
|
||||
fieldset.studio>div.output>fieldset>div.output>table.content { width:100%; }
|
||||
fieldset.studio>div.output>fieldset:not(.select) { display:none; }
|
||||
fieldset.plan div.output div.content>table.content { height:100%; width:100%; }
|
||||
fieldset.plan>div.output>div.layout>div.layout>div.profile:not(.toggle) { width:unset; flex:unset; }
|
||||
fieldset.plan>div.output>div.layout>div.layout>div.profile input { box-shadow:var(--box-shadow); }
|
||||
fieldset.plan>div.output>div.layout>div.layout>div.profile input:not(:last-child) { margin-right:var(--button-margin); }
|
||||
fieldset.plan>div.output>div.layout>div.layout { align-items:flex-start; }
|
||||
fieldset.plan>div.output>div.layout { height:100%; }
|
||||
fieldset.draw div.output svg { margin-bottom:-5px; }
|
||||
fieldset.draw>div.output>div.layout>div.layout>div.profile table { width:100%; }
|
||||
fieldset.draw>form.option>div.item.pid>input { width:var(--button-width) !important; }
|
||||
fieldset.draw.trends div.output { overflow:hidden; }
|
||||
fieldset.draw.trends div.output svg { background-color:#1b5b738c; }
|
||||
fieldset.form>div.output>div.code { display:flex; flex-direction:column; justify-content:center; align-items:center; }
|
||||
fieldset.form>div.output>div.code>div.info { font-size:20px; padding:40px 20px; overflow:auto; white-space:break-spaces; }
|
||||
fieldset.form>div.output>div.code>input[type=button] { font-size:24px; border:var(--notice-bg-color) solid 1px; height:48px; width:240px; margin:20px; display:block; }
|
||||
@ -624,29 +613,36 @@ fieldset>div.output.form>div.item>span { padding:var(--input-padding); }
|
||||
fieldset>div.output.form>div.item>span.need { color:red; }
|
||||
fieldset>div.output.form>div.item>div.item>input { font-size:20px; height:38px; width:var(--form-width); }
|
||||
fieldset>div.output.form>div.item>div.item>input[type=button] { font-size:20px; height:48px; border:var(--notice-bg-color) solid 1px; }
|
||||
fieldset.plan div.output div.content>table.content { height:100%; width:100%; }
|
||||
fieldset.plan>div.output>div.layout>div.layout>div.profile:not(.toggle) { width:unset; flex:unset; }
|
||||
fieldset.plan>div.output>div.layout>div.layout>div.profile input { box-shadow:var(--box-shadow); }
|
||||
fieldset.plan>div.output>div.layout>div.layout>div.profile input:not(:last-child) { margin-right:var(--button-margin); }
|
||||
fieldset.plan>div.output>div.layout>div.layout { align-items:flex-start; }
|
||||
fieldset.plan>div.output>div.layout { height:100%; }
|
||||
fieldset.draw>form.option>div.item.pid>input { width:var(--button-width) !important; }
|
||||
fieldset.draw>div.output>div.layout>div.layout>div.profile table { width:100%; }
|
||||
fieldset.draw>div.output>div.layout>div.layout>div.profile { width:var(--project-width); flex:0 0 var(--project-width); }
|
||||
fieldset.draw div.output svg { margin-bottom:-5px; }
|
||||
fieldset.draw div.output svg { min-width:100%; min-height:100%; }
|
||||
fieldset.draw.trends div.output { overflow:hidden; }
|
||||
fieldset.draw.trends div.output svg { background-color:#1b5b738c; }
|
||||
fieldset.draw.spides div.output svg text { cursor:pointer; }
|
||||
fieldset.draw.spides div.output svg path { stroke-width:1; }
|
||||
fieldset.draw>div.output>div.layout>div.layout>div.profile { width:var(--project-width); flex:0 0 var(--project-width); }
|
||||
fieldset.word>div.output>fieldset.story:not(.full) { margin:var(--title-margin) 0; }
|
||||
fieldset.word>div.output fieldset.story:not(.float):not(.full)>form.option>div.icon.delete { display:none; }
|
||||
fieldset.input.icon div.output td { font-size:28px; padding:var(--input-padding); }
|
||||
fieldset.status>div.output table.content { width:100%; }
|
||||
fieldset.web.stats>div.output { align-items: normal; }
|
||||
fieldset.web.code.git>div.output>fieldset.web.code.inner>div.output { overflow:auto; }
|
||||
fieldset.web.code.git.total.draw div.output { text-align:center; }
|
||||
fieldset.web.code.git.trend>div.output rect { cursor:pointer; }
|
||||
fieldset.web.wiki.draw div.output svg { min-width:100%; min-height:100%; }
|
||||
fieldset.web.code.git.status>div.output table.content { width:100%; }
|
||||
fieldset.web.wiki.word>div.output>fieldset.story:not(.full) { margin:var(--title-margin) 0; }
|
||||
fieldset.web.wiki.word>div.output fieldset.story:not(.float):not(.full)>form.option>div.icon.delete { display:none; }
|
||||
fieldset.web.chat.script>div.output>fieldset.story { margin-top:20px; }
|
||||
fieldset.web.chat.script>div.output>table.content { position:sticky; top:2px; }
|
||||
fieldset.web.chat.location>div.output>div.layout>div.layout { position:relative; }
|
||||
fieldset.web.chat.location>div.output .amap-toolbar { z-index:unset; }
|
||||
fieldset.web.chat.location>div.output .amap-controls { z-index:unset; }
|
||||
fieldset.web.chat.location>div.output .amap-maptypecontrol { z-index:unset; }
|
||||
fieldset.web.chat.location>div.output>div.layout>div.layout>div.profile { background-color:var(--plugin-bg-color); position:absolute; right:0; width:360px; z-index:9; border-left:none; }
|
||||
body.width6 fieldset.trans>form.option>div.item.text>input { width:var(--project-width); }
|
||||
body.width6 fieldset.word>form.option>div.item.text>input { width:var(--project-width); }
|
||||
body.width6 fieldset.xterm.story>form.option>div.item.hash input { width:var(--form-width); }
|
||||
body.width6 fieldset.iframe>form.option input[name=hash] { width:var(--form-width); }
|
||||
body.width6 fieldset.desktop>div.output>div.desktop>fieldset.web.chat.iframe>form.option>div.item.hash>input { width:var(--river-width); }
|
||||
body.width2 fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.item:last-child { margin-right:0; }
|
||||
fieldset.can.data>div.output { font-family:var(--code-font-family); font-size:var(--code-font-size); white-space:pre; }
|
||||
fieldset.can.data>div.output div.item:not(.hide) { display:flex; gap:5px; }
|
||||
fieldset.can.data>div.output div.view div.item:not(.hide) { display:block; }
|
||||
@ -667,7 +663,6 @@ fieldset.Action.tabs table.content { width:100%; }
|
||||
fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd) { padding:var(--plugin-padding); margin:var(--plugin-margin); box-shadow:var(--box-shadow); }
|
||||
fieldset.Action>div.output>fieldset.plugin:not(.float):not(.full):not(.cmd)>legend { float:none; }
|
||||
fieldset.cmd>div.item.state { line-height:22px; padding:var(--input-padding) var(--button-padding); float:right; }
|
||||
/* fieldset.cmd>div.item.qrcode { padding:0; height:var(--action-height); } */
|
||||
fieldset.cmd>div.item.avatar { padding:0; height:var(--action-height); }
|
||||
fieldset.cmd>div.item.avatar>img { height:var(--action-height); }
|
||||
fieldset.cmd>div.action>div.tabs.select { border-bottom:var(--notice-bg-color) solid 2px; }
|
||||
@ -677,6 +672,12 @@ fieldset.plug>div.output table.content { width:100%; }
|
||||
fieldset.plug.dream.zone>div.output>div.item { display:flex; padding:var(--input-padding); margin:var(--input-margin); }
|
||||
fieldset.plug.dream.zone>div.output>div.item>img { margin-right:var(--input-margin); }
|
||||
fieldset.plug.dream.zone>div.output>div.item>span { line-height:var(--action-height); }
|
||||
body.width6 fieldset.trans>form.option>div.item.text>input { width:var(--project-width); }
|
||||
body.width6 fieldset.xterm.story>form.option>div.item.hash input { width:var(--form-width); }
|
||||
body.width6 fieldset.word>form.option>div.item.text>input { width:var(--project-width); }
|
||||
body.width6 fieldset.iframe>form.option input[name=hash] { width:var(--form-width); }
|
||||
body.width6 fieldset.desktop>div.output>div.desktop>fieldset.web.chat.iframe>form.option>div.item.hash>input { width:var(--river-width); }
|
||||
body.width2 fieldset.desktop>div.output>div.desktop>fieldset>form.option>div.item:last-child { margin-right:0; }
|
||||
body.en span[lang^=zh] { display:none; }
|
||||
body.zh span[lang^=en] { display:none; }
|
||||
body>div.carte.header.avatar img { width:370px; }
|
||||
|
@ -104,11 +104,11 @@ Volcanos("base", {
|
||||
var vs = ls[1].split(nfs.DF); now.setHours(parseInt(vs[0])), now.setMinutes(parseInt(vs[1])), now.setSeconds(parseInt(vs[2]))
|
||||
} else if (time) { now = time } return now },
|
||||
DateAdd: function(stamp, days) { return new Date(stamp - stamp%(24*3600*1000) - 8*3600*1000 + days*24*3600*1000) },
|
||||
Duration: function(n) { var res = "", h = 0
|
||||
Duration: function(n) { var res = "", h = 0; n = parseInt(n)
|
||||
h = parseInt(n/3600000/24), h > 0 && (res += h+"d"), n = n % (3600000*24)
|
||||
h = parseInt(n/3600000), h > 0 && (res += h+"h"), n = n % 3600000
|
||||
h = parseInt(n/60000), h > 0 && (res += h+"m"), n = n % 60000
|
||||
h = parseInt(n/1000), h > 0 && (res += h+"s"), n = n % 1000
|
||||
h = parseInt(n/1000), h > 0 && (res += h), n = n % 1000
|
||||
return res + (n > 0? nfs.PT+parseInt(n/10): "") + "s"
|
||||
},
|
||||
isNight: function() { var now = new Date(); return now.getHours() < 7 || now.getHours() > 17 },
|
||||
|
@ -81,7 +81,7 @@ Volcanos("user", {
|
||||
var carte = can.user.toast(can, {content: content, title: title, action: action||[cli.CLOSE], duration: -1})
|
||||
can.page.style(can, carte._target, html.TOP, 200, html.BOTTOM, ""); return carte
|
||||
},
|
||||
toastProcess: function(can, content, title) { return can.user.toast(can, {content: "🕑 "+(content||ice.PROCESS), title: title, duration: -1, caller: 2}) },
|
||||
toastProcess: function(can, content, title, progress) { return can.user.toast(can, {content: "🕑 "+(content||ice.PROCESS), title: title, duration: -1, progress: progress, caller: 2}) },
|
||||
toastSuccess: function(can, content, title) { return can.user.toast(can, {content: "✅ "+(content||ice.SUCCESS), title: title, caller: 2}) },
|
||||
toastFailure: function(can, content, title) { return can.user.toast(can, {content: "❌ "+(content||ice.FAILURE), title: title, duration: 10000, caller: 2}) },
|
||||
toast: function(can, content, title, duration, progress, caller) {
|
||||
|
@ -44,21 +44,25 @@ Volcanos(chat.ONIMPORT, {
|
||||
}
|
||||
var height = can.onexport.outputHeight(can)
|
||||
can.onappend.plugin(can, {title: can.core.Keys(can.ConfSpace(), msg.Option(ice.MSG_TITLE)||"table.js"), index: "can._filter", height: height, style: "rich"}, function(sub) {
|
||||
sub.onexport.output = function() { can.sub._rich = sub.sub, _rich(), can.onmotion.scrollIntoView(can, sub._target) }
|
||||
sub.onexport.output = function() {
|
||||
can.page.style(can, sub._output, html.HEIGHT, "", html.MAX_HEIGHT, "")
|
||||
can.sub._rich = sub.sub, _rich(), can.onmotion.scrollIntoView(can, sub._target)
|
||||
}
|
||||
}); return
|
||||
},
|
||||
_grow: function(can, msg, arg) {
|
||||
var sub = can.sub; if (sub && sub.onimport && sub.onimport.grow) { return sub.onimport.grow(sub, msg, msg.detail[1], msg.detail[2]) }
|
||||
if (msg.Option(ctx.DISPLAY)) {
|
||||
function _grow() { if (can.sub._grow_list.length == 0) { return } if (can.sub._grow_running) { return } can.sub._grow_running = true
|
||||
var msg = can.sub._grow_list.shift(), list = [], text = msg.detail[1]; for (var i = 0; i < text.length; i++) { list.push(text[i]) }
|
||||
can.core.Next(list, function(text, next) { sub._grow._size = (sub._grow._size||0)+text.length
|
||||
text && text.match(/\n/g) && (sub._grow._count = (sub._grow._count||0)+text.match(/\n/g).length)
|
||||
can.sub._grow.onimport.grow(can.sub._grow, msg, "only", text)
|
||||
can.core.Timer(msg.Option(cli.DELAY)||0, next)
|
||||
sub._grow.onappend._status(sub._grow, msg.Option(ice.MSG_STATUS), null, msg)
|
||||
sub._grow.Status(mdb.COUNT, sub._grow._count), sub._grow.Status("msg", can.base.Size(sub._grow._size))
|
||||
var msg = can.sub._grow_list.shift(), text = msg.detail[1]; sub._grow.onappend._status(sub._grow, msg.Option(ice.MSG_STATUS), null, msg)
|
||||
sub._grow._size = (sub._grow._size||0)+text.length, text && text.match(/\n/g) && (sub._grow._count = (sub._grow._count||0)+text.match(/\n/g).length)
|
||||
if (msg.Option(cli.DELAY) && msg.Option(cli.DELAY) != "0") { var list = []; for (var i = 0; i < text.length; i++) { list.push(text[i]) }
|
||||
can.core.Next(list, function(text, next) {
|
||||
can.sub._grow.onimport.grow(can.sub._grow, msg, "only", text), can.core.Timer(msg.Option(cli.DELAY), next)
|
||||
}, function() { can.sub._grow_running = false, _grow() })
|
||||
} else {
|
||||
can.sub._grow.onimport.grow(can.sub._grow, msg, "only", text), can.sub._grow_running = false, _grow()
|
||||
} sub._grow.Status(mdb.COUNT, sub._grow._count), sub._grow.Status("msg", can.base.Size(sub._grow._size))
|
||||
}
|
||||
if (can.sub._grow) {
|
||||
(can.sub._grow_list = can.sub._grow_list||[]).push(msg); return _grow()
|
||||
|
Loading…
x
Reference in New Issue
Block a user