Skip to content

Commit d8d73b9

Browse files
author
Gurasuraisu
committed
Fix uninstall app
1 parent fdf0349 commit d8d73b9

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

js/apps/window-manager.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -228,21 +228,26 @@ async function installApp(appData) {
228228
async function deleteApp(appName) {
229229
// --- Protection Clause ---
230230
const appToDelete = apps[appName];
231-
if (
232-
appToDelete &&
233-
(appToDelete.url.includes('/kirbstore/index.html') ||
234-
appToDelete.url.includes('/assets/gurapp/intl/settings/'))
235-
) {
236-
showDialog({
237-
type: 'alert',
238-
title: currentLanguage.GURAPP_DELETE_STORE_DENIED,
231+
if (
232+
appToDelete &&
233+
(appToDelete.url.includes('/kirbstore/index.html') ||
234+
appToDelete.url.includes('/assets/gurapp/intl/settings/'))
235+
) {
236+
showDialog({
237+
type: 'alert',
238+
title: currentLanguage.GURAPP_DELETE_STORE_DENIED,
239239
icon: 'do_not_touch'
240-
});
240+
});
241241
return; // Stop the function immediately
242242
}
243243

244244
// Confirmation dialog
245-
if (!(await showCustomConfirm(currentLanguage.GURAPP_DELETE_ASK.replace('{appName}', appName)), '', 'delete_forever')) {
245+
const confirmed = await showCustomConfirm(
246+
currentLanguage.GURAPP_DELETE_ASK.replace('{appName}', appName),
247+
'',
248+
'cancel'
249+
);
250+
if (!confirmed) {
246251
return;
247252
}
248253

0 commit comments

Comments
 (0)