- {results.map((item) => (
+ {results.slice(0, gridCount).map((item) => (
)}
+ {gridCount < results.length && }
{selecting && }
>
)}
diff --git a/src/store.tsx b/src/store.tsx
index 71975ad..66e125a 100644
--- a/src/store.tsx
+++ b/src/store.tsx
@@ -35,7 +35,7 @@ function persistLists(lists: CustomList[]) {
/* ignore */
}
}
-const DEFAULT_SETTINGS: Settings = { topCategories: ALL_TOP_CATEGORIES, accentColor: '#f0a63a', themeMode: 'auto' }
+const DEFAULT_SETTINGS: Settings = { topCategories: ALL_TOP_CATEGORIES, themeMode: 'auto' }
/** Relit les réglages en ne gardant que des valeurs valides (le localStorage peut avoir été modifié). */
function loadSettings(): Settings {
@@ -242,9 +242,9 @@ export function MediaProvider({
getLists: () => listsRef.current,
applyLists: (next) => setLists(() => next, true),
getSettings: () => {
- const { topCategories, accentColor, themeMode, statsHiddenMonths } = settingsRef.current
+ const { topCategories, themeMode, statsHiddenMonths } = settingsRef.current
// Mois masqués : liste vide plutôt qu'absente, sinon « tout réafficher » ne partirait jamais au serveur
- return { topCategories, accentColor, themeMode, statsHiddenMonths: statsHiddenMonths ?? [] }
+ return { topCategories, themeMode, statsHiddenMonths: statsHiddenMonths ?? [] }
},
applySettings: (patch) => updateSettingsRef.current(patch, true),
itemsChanged: () => void reloadItems().catch(() => {}),
@@ -285,7 +285,7 @@ export function MediaProvider({
}, [settings.themeMode])
const updateSettings = useCallback((patch: Partial, silent = false) => {
- if (!silent && syncRef.current && ('topCategories' in patch || 'accentColor' in patch || 'themeMode' in patch || 'statsHiddenMonths' in patch)) syncRef.current.markSettings()
+ if (!silent && syncRef.current && ('topCategories' in patch || 'themeMode' in patch || 'statsHiddenMonths' in patch)) syncRef.current.markSettings()
setSettings((prev) => {
const next = { ...prev, ...patch }
try {
@@ -574,7 +574,7 @@ export function MediaProvider({
const current = settingsRef.current
const merged = oldSettings
const patch: Partial = {}
- for (const k of ['topCategories', 'accentColor', 'themeMode'] as const) {
+ for (const k of ['topCategories', 'themeMode'] as const) {
if (mine[k] === undefined && merged[k] !== undefined) Object.assign(patch, { [k]: merged[k] })
}
if (oldSettings.statsHiddenMonths?.length) patch.statsHiddenMonths = [...new Set([...(current.statsHiddenMonths ?? []), ...oldSettings.statsHiddenMonths])].sort()
diff --git a/src/types.ts b/src/types.ts
index 3ccb14f..db41b06 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -105,8 +105,6 @@ export interface Settings {
tmdbKey?: string
/** Catégories de Top 5 affichées sur l'accueil (toutes par défaut). */
topCategories: TopCategory[]
- /** Ancienne couleur d'accent (plus réglable), gardée pour la compatibilité des sauvegardes et de la synchro. */
- accentColor: string
/** Apparence (clair ou sombre). « auto » suit le navigateur. */
themeMode: ThemeMode
/** Mois masqués dans la courbe des stats (AAAA-MM), ex. le mois où j'ai tout ajouté d'un coup. */