fix theme switch to default bug and include google fonts in csp #6665

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458
2025-01-06 16:02:10 +00:00
parent 998769a888
commit def62075c7
25 changed files with 5 additions and 6 deletions

View File

@@ -14138,10 +14138,9 @@
function account_switchThemeEx() {
var themeSwitcher = document.getElementById('theme-switcher');
const selectedTheme = themeSwitcher.value;
const safeTheme = encodeURIComponent(selectedTheme);
const safeTheme = ((selectedTheme != 'default') ? encodeURIComponent(selectedTheme) : encodeURIComponent('..'));
var themeStylesheet = document.getElementById('theme-stylesheet');
var newThemeStylesheet = `styles/themes/${safeTheme}/bootstrap.min.css`;
themeStylesheet.href = newThemeStylesheet;
themeStylesheet.href = `styles/themes/${safeTheme}/bootstrap-min.css`;
// Save selected theme
putstore('theme', selectedTheme);
// Update last 4 themes selected