mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Update theme import warning to new popup
This commit is contained in:
@ -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');
|
||||||
}
|
}
|
||||||
|
3
public/scripts/templates/themeImportWarning.html
Normal file
3
public/scripts/templates/themeImportWarning.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<div>
|
||||||
|
This theme contains @import lines in the Custom CSS. Press "Yes" to proceed.
|
||||||
|
</div>
|
Reference in New Issue
Block a user