From 48383f7139c6ae9e103a0c89bae354cd323c4024 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Sat, 30 Apr 2022 15:12:59 +0800 Subject: [PATCH] add oauth --- panel/header.js | 4 ++-- plugin/state.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/panel/header.js b/panel/header.js index 5f1ff097..f4a15c39 100644 --- a/panel/header.js +++ b/panel/header.js @@ -188,8 +188,8 @@ Volcanos("onaction", {help: "交互数据", list: [], _init: function(can, cb, t can.set("River", html.HEIGHT, -1), can.set("Action", html.HEIGHT, -1) }, config: function(event, can) { - can.user.input(event, can, [{name: nfs.FILE, value: "etc/local.shy"}], function(ev, button, meta, list, args) { - can.run(event, [ctx.CONFIG].concat(args), function(msg) { can.user.toast(can, "配置成功") }) + can.user.input(event, can, [{name: "scope", value: "etc/local.shy"}], function(ev, button, meta, list, args) { + can.run(event, [ctx.CONFIG].concat(args), function(msg) { can.user.jumps(msg.Result()) }) }) }, webpack: function(event, can) { diff --git a/plugin/state.js b/plugin/state.js index d9111948..76060976 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -8,6 +8,8 @@ Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, conf, if (can.user.confirm(_arg)) { can.run(sub._event, [ctx.ACTION, "confirm"], function() {}, true) } }, _location: function(can, msg) { location.href = msg._arg[0] }, + _replace: function(can, msg) { location.replace(msg._arg[0]) }, + _history: function(can, msg) { history.back() }, _rewrite: function(can, msg) { for (var i = 0; i < msg._arg.length; i += 2) { can.Option(msg._arg[i], msg._arg[i+1])