feat(rules): add URL params for direct links to board rules

Support /rules/:boardIdentifier (e.g. /rules/pol, /rules/somedomain.eth).
Selection updates URL; rules page always uses yotsuba theme.
This commit is contained in:
plebeius
2026-02-20 16:12:52 +08:00
parent cb0ab3a698
commit 64c89533f0
3 changed files with 22 additions and 5 deletions
+5
View File
@@ -55,6 +55,11 @@ const useTheme = (): [string, (theme: string) => void] => {
return 'yotsuba';
}
// Always use yotsuba for rules page (boardIdentifier in URL is for loading rules, not theming)
if (location.pathname.startsWith('/rules')) {
return 'yotsuba';
}
// If special theme is enabled, use tomorrow
if (isEnabled) {
return 'tomorrow';