Update theme import warning to new popup

This commit is contained in:
Cohee 2024-06-26 00:18:44 +03:00
parent 0298849953
commit 1188cb46b8
2 changed files with 5 additions and 1 deletions

View File

@ -2271,7 +2271,8 @@ async function importTheme(file) {
} }
if (typeof parsed.custom_css === 'string' && parsed.custom_css.includes('@import')) { if (typeof parsed.custom_css === 'string' && parsed.custom_css.includes('@import')) {
const confirm = await callPopup('This theme contains @import lines in the Custom CSS. Press "Yes" to proceed.', 'confirm', '', { okButton: 'Yes' }); const template = $(await renderTemplateAsync('themeImportWarning'));
const confirm = await callGenericPopup(template, POPUP_TYPE.CONFIRM);
if (!confirm) { if (!confirm) {
throw new Error('Theme contains @import lines'); throw new Error('Theme contains @import lines');
} }

View File

@ -0,0 +1,3 @@
<div>
This theme contains @import lines in the Custom CSS. Press "Yes" to proceed.
</div>