From 99cdfe1dedbae2fc056266ea761e7674d471f44f Mon Sep 17 00:00:00 2001 From: shy Date: Sat, 30 Dec 2023 11:23:48 +0800 Subject: [PATCH] opt dream --- const.js | 1 + plugin/state.js | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/const.js b/const.js index 0c2bd16d..2a954b85 100644 --- a/const.js +++ b/const.js @@ -184,6 +184,7 @@ var cli = { RUNTIME: "runtime", SYSTEM: "system", DAEMON: "daemon", ORDER: "order", BUILD: "build", OPENS: "opens", BEGIN: "begin", END: "end", START: "start", RESTART: "restart", STOP: "stop", OPEN: "open", CLOSE: "close", REBOOT: "reboot", + DELAY: "delay", QRCODE: "qrcode", COLOR: "color", BLACK: "black", WHITE: "white", BLUE: "blue", RED: "red", GRAY: "gray", CYAN: "cyan", GREEN: "green", PURPLE: "purple", YELLOW: "yellow", MAGENTA: "magenta", SILVER: "silver", ALICEBLUE: "aliceblue", TRANSPARENT: "transparent", LINUX: "linux", DARWIN: "darwin", WINDOWS: "windows", diff --git a/plugin/state.js b/plugin/state.js index 218edd63..b696f90b 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -32,7 +32,7 @@ Volcanos(chat.ONIMPORT, { 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) { can.sub._grow.onimport.grow(can.sub._grow, msg, "only", text) - can.core.Timer(msg.Option("delay")||30, next) + can.core.Timer(msg.Option(cli.DELAY)||0, next) }, function() { can.sub._grow_running = false, _grow() }) } if (can.sub._grow) { @@ -42,9 +42,8 @@ Volcanos(chat.ONIMPORT, { } var height = can.onexport.outputHeight(can) can.onappend.plugin(can, {index: "can._plugin", title: msg.Option(ctx.DISPLAY).split(nfs.PS).pop(), display: msg.Option(ctx.DISPLAY), height: height}, function(sub) { - sub.onexport.output = function() { can.sub._grow = sub.sub, _grow() } - }) - return + sub.onexport.output = function() { can.onmotion.scrollIntoView(can, sub._target), can.sub._grow = sub.sub, _grow() } + }); return } arg = can.page.Color(arg); if (!can.page.SelectOne(can, can._output, html.DIV_CODE, function(div) { return can.page.style(can, div, html.MAX_HEIGHT, can.onexport.outputHeight(can)),