feat : File caching option

This commit is contained in:
Julien Froidefond
2025-02-19 16:33:21 +01:00
parent a5fd165200
commit aed35ce2b9
9 changed files with 445 additions and 55 deletions

View File

@@ -8,6 +8,7 @@ import { useToast } from "@/components/ui/use-toast";
import { usePreferences } from "@/contexts/PreferencesContext";
import { Switch } from "@/components/ui/switch";
import { Label } from "@/components/ui/label";
import { CacheModeSwitch } from "@/components/settings/CacheModeSwitch";
interface KomgaConfig {
url: string;
@@ -416,6 +417,16 @@ export function ClientSettings({ initialConfig, initialTTLConfig }: ClientSettin
</p>
</div>
<div className="flex items-center justify-between mb-4">
<div className="space-y-0.5">
<Label htmlFor="cache-mode">Mode de cache</Label>
<p className="text-sm text-muted-foreground">
Le cache en mémoire est plus rapide mais ne persiste pas entre les redémarrages
</p>
</div>
<CacheModeSwitch />
</div>
{/* Formulaire TTL */}
<form onSubmit={handleSaveTTL} className="space-y-4">
<div className="grid gap-3 sm:grid-cols-2">