mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 01:17:39 +01:00
Merge branch 'fix-extensions-toggle' into staging
This commit is contained in:
commit
751ff45cc1
@ -660,6 +660,8 @@ async function showExtensionsDetails() {
|
|||||||
await oldPopup.complete(POPUP_RESULT.CANCELLED);
|
await oldPopup.complete(POPUP_RESULT.CANCELLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let waitingForSave = false;
|
||||||
|
|
||||||
const popup = new Popup(html, POPUP_TYPE.TEXT, '', {
|
const popup = new Popup(html, POPUP_TYPE.TEXT, '', {
|
||||||
okButton: 'Close',
|
okButton: 'Close',
|
||||||
wide: true,
|
wide: true,
|
||||||
@ -667,9 +669,14 @@ async function showExtensionsDetails() {
|
|||||||
customButtons: [updateAllButton],
|
customButtons: [updateAllButton],
|
||||||
allowVerticalScrolling: true,
|
allowVerticalScrolling: true,
|
||||||
onClosing: async () => {
|
onClosing: async () => {
|
||||||
|
if (waitingForSave) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (stateChanged) {
|
if (stateChanged) {
|
||||||
toastr.info('The page will be reloaded shortly...', 'Extensions state changed');
|
waitingForSave = true;
|
||||||
|
const toast = toastr.info('The page will be reloaded shortly...', 'Extensions state changed');
|
||||||
await saveSettings();
|
await saveSettings();
|
||||||
|
toastr.clear(toast);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user