fix(web): restore Alpine theme members and allow eval for Alpine expressions
Two regressions from the cleanup cycle, caught in E2E:
1. The unexport pass stripped loadTheme, loadUserTheme, and
updateThemeIndicators from the Alpine.data("theme") registration —
the member-removal pass could not tell export-block lines from
Alpine component object lines. Theme dropdowns on docs and
non-app pages stopped reflecting the active theme. Members
restored (functions were kept, only their scope registration was
lost).
2. The new Content-Security-Policy shipped script-src without
'unsafe-eval'. Alpine evaluates every @click / x-init / x-show
expression through new Function(), so the CSP silently disabled
ALL Alpine interactivity app-wide: sidebar categories stuck open,
modals rendering unhidden and unresponsive, dropdowns inert.
script-src now includes 'unsafe-eval' with a comment explaining
the Alpine requirement.
This commit is contained in:
1 parent
4ab6a64bd8
commit
b6eba66801
2 files changed
+4
-1
No files matched your search
@@ -288,8 +288,11 @@ Alpine.data("theme", () => ({
|
||||
changeTheme,
|
||||
changeWoodPaneling,
|
||||
initializeTheme,
|
||||
loadTheme,
|
||||
loadUserTheme,
|
||||
loadWoodPaneling,
|
||||
revealCurrentTheme,
|
||||
updateThemeIndicators,
|
||||
updateWoodPanelingIndicators,
|
||||
}));
|
||||
|
||||
|
||||
Reference in new issue
Block a user