feat: 取消跳过确认弹窗,简化操作逻辑
This commit is contained in:
+14
-11
@@ -724,18 +724,15 @@ async function maybeTakeoverAutoRun(actionLabel) {
|
||||
}
|
||||
|
||||
async function handleSkipStep(step) {
|
||||
if (!(await maybeTakeoverAutoRun(`跳过步骤 ${step}`))) {
|
||||
return;
|
||||
}
|
||||
|
||||
const confirmed = await openConfirmModal({
|
||||
title: '跳过步骤',
|
||||
message: `这不会真正执行步骤 ${step},只会直接跳过该步骤并放行后续步骤。是否继续?`,
|
||||
confirmLabel: `跳过步骤 ${step}`,
|
||||
confirmVariant: 'btn-primary',
|
||||
if (isAutoRunPausedPhase()) {
|
||||
const takeoverResponse = await chrome.runtime.sendMessage({
|
||||
type: 'TAKEOVER_AUTO_RUN',
|
||||
source: 'sidepanel',
|
||||
payload: {},
|
||||
});
|
||||
if (!confirmed) {
|
||||
return;
|
||||
if (takeoverResponse?.error) {
|
||||
throw new Error(takeoverResponse.error);
|
||||
}
|
||||
}
|
||||
|
||||
const response = await chrome.runtime.sendMessage({
|
||||
@@ -1105,7 +1102,13 @@ btnTheme.addEventListener('click', () => {
|
||||
|
||||
initializeManualStepActions();
|
||||
initTheme();
|
||||
updateToastOffset();
|
||||
updateSaveButtonState();
|
||||
window.addEventListener('resize', updateToastOffset);
|
||||
window.addEventListener('load', updateToastOffset);
|
||||
if (document.fonts?.ready) {
|
||||
document.fonts.ready.then(updateToastOffset).catch(() => { });
|
||||
}
|
||||
restoreState().then(() => {
|
||||
syncPasswordToggleLabel();
|
||||
syncVpsUrlToggleLabel();
|
||||
|
||||
Reference in New Issue
Block a user