修改功能
This commit is contained in:
@@ -14,6 +14,13 @@
|
||||
})(typeof globalThis !== 'undefined' ? globalThis : window, function (root) {
|
||||
'use strict';
|
||||
|
||||
function confirmAction(message) {
|
||||
if (root.ProfileUI && typeof root.ProfileUI.confirmAction === 'function') {
|
||||
return root.ProfileUI.confirmAction(message);
|
||||
}
|
||||
return Promise.resolve(!root['confirm'] || root['confirm'](message));
|
||||
}
|
||||
|
||||
var documentRef = root.document;
|
||||
var CAPTCHA_OPERATIONS = {
|
||||
phone: 'phone-change',
|
||||
@@ -403,7 +410,7 @@
|
||||
showMessage('请完整输入“确认注销”');
|
||||
return;
|
||||
}
|
||||
if (root.confirm && !root.confirm('账号注销后将退出登录,确认继续?')) return;
|
||||
if (!await confirmAction('账号注销后将退出登录,确认继续?')) return;
|
||||
|
||||
try {
|
||||
setSubmitting(form, true);
|
||||
@@ -423,7 +430,7 @@
|
||||
async function logout() {
|
||||
var api = getApi();
|
||||
|
||||
if (root.confirm && !root.confirm('确认退出当前账号?')) return;
|
||||
if (!await confirmAction('确认退出当前账号?')) return;
|
||||
|
||||
try {
|
||||
if (api) await api.logout();
|
||||
|
||||
Reference in New Issue
Block a user