From 33e6b32fbde64daea69e3f10d8ed39a776f2f798 Mon Sep 17 00:00:00 2001 From: Nyaser <61904116+ProjectNyaser@users.noreply.github.com> Date: Thu, 13 Jul 2023 22:53:14 +0800 Subject: [PATCH] Update common.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增“重置此盘”选项, 修复“设置”按钮不显示的问题, 修复 client_secret 和 refresh_token 等过期的问题。 --- common.php | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index 13aa821..2223729 100644 --- a/common.php +++ b/common.php @@ -1430,6 +1430,23 @@ function EnvOpt($needUpdate = 0) if (isShowedEnv($k) || $k=='disktag_del' || $k=='disktag_add' || $k=='disktag_rename' || $k=='disktag_copy' || $k=='client_secret') { $tmp[$k] = $v; } + if ($k=='disktag_reset') { + global $slash; + $disktype = getConfig('Driver', $_GET['disktag']); + if (!$disktype) return false; + if (!class_exists($disktype)) require 'disk' . $slash . $disktype . '.php'; + $drive = new $disktype($_GET['disktag']); + return message(' + ' . getconstStr('JumptoOffice') . ' + + ', getconstStr('Wait') . ' 1s', 201); + } if ($k=='disktag_newname') { $v = preg_replace('/[^0-9a-zA-Z|_]/i', '', $v); $f = substr($v, 0, 1); @@ -1690,6 +1707,13 @@ output: + +
+ + + +
+
@@ -1755,14 +1779,14 @@ output: '; } - $frame .= ' - '; } else { $frame .= ' ' . ($disk_tmp->error['body']?$disk_tmp->error['stat'] . '
' . $disk_tmp->error['body']:'Add this disk again.') . ' '; } + $frame .= ' + '; $frame .= '
@@ -1771,7 +1795,8 @@ output: function deldiskconfirm(t) { var msg="' . getconstStr('Delete') . ' ??"; if (confirm(msg)==true) return true; - else return false; + //else + return false; } function cpdiskconfirm(t) { var msg="' . getconstStr('Copy') . ' ??"; @@ -1779,6 +1804,12 @@ output: //else return false; } + function rediskconfirm(t) { + var msg="' . getconstStr('ResetDisk') . ' ??"; + if (confirm(msg)==true) return true; + //else + return false; + } function renametag(t) { if (t.disktag_newname.value==\'\') { alert(\'' . getconstStr('DiskTag') . '\');