feat(catalog): stile classico completo via skin legacy

Ripristina il look del catalogo pre-merge come CSS scoped sotto
body.catalog-skin-legacy (CatalogClassicLegacy.css), attivato dal toggle
'stile classico'. CatalogView mette/toglie la classe sul body.
This commit is contained in:
medievalshell
2026-05-29 23:40:37 +02:00
parent dc0a8f965e
commit 32dcbaf265
3 changed files with 368 additions and 2 deletions
+13 -2
View File
@@ -1,10 +1,21 @@
import { FC } from 'react';
import { useCatalogData } from '../../hooks';
import { FC, useEffect } from 'react';
import { useCatalogClassicStyle, useCatalogData } from '../../hooks';
import { CatalogClassicView } from './CatalogClassicView';
export const CatalogView: FC<{}> = () =>
{
const { catalogLocalizationVersion = 0 } = useCatalogData();
const [ catalogClassicStyle ] = useCatalogClassicStyle();
// Toggle the legacy-skin marker on <body> so the scoped overrides in
// CatalogClassicLegacy.css (the pre-merge catalog look) take effect for
// every catalog element without touching the modern stylesheet.
useEffect(() =>
{
document.body.classList.toggle('catalog-skin-legacy', !!catalogClassicStyle);
return () => document.body.classList.remove('catalog-skin-legacy');
}, [ catalogClassicStyle ]);
return (
<>