Update theme delete confirm to new popup

This commit is contained in:
Cohee 2024-06-26 00:15:16 +03:00
parent 083ea43971
commit 0298849953
2 changed files with 6 additions and 1 deletions

View File

@ -48,6 +48,7 @@ import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashComma
import { AUTOCOMPLETE_WIDTH } from './autocomplete/AutoComplete.js';
import { SlashCommandEnumValue, enumTypes } from './slash-commands/SlashCommandEnumValue.js';
import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js';
import { POPUP_TYPE, callGenericPopup } from './popup.js';
export {
loadPowerUserSettings,
@ -2207,7 +2208,8 @@ async function deleteTheme() {
return;
}
const confirm = await callPopup(`Are you sure you want to delete the theme "${themeName}"?`, 'confirm', '', { okButton: 'Yes' });
const template = $(await renderTemplateAsync('themeDelete', { themeName }));
const confirm = await callGenericPopup(template, POPUP_TYPE.CONFIRM);
if (!confirm) {
return;

View File

@ -0,0 +1,3 @@
<div>
Are you sure you want to delete the theme "{{themeName}}"?
</div>