fix: Ayarlar sayfasındaki switch'ler kapatılıp kaydedilince kalıcı olmuyordu
Radix Switch'in kendi gizli-input form entegrasyonu bu ortamda Server Action'ın FormData'sına güvenilir şekilde ulaşmıyordu — switch'i "off" yapıp Kaydet'e basınca eski değer kalıcı oluyordu (STT hep otomatik çalışmaya devam ediyordu). Artık her switch kendi değerini doğrudan kontrol eden bir hidden input'la (SettingSwitch) submit ediliyor, Radix'in iç mekanizmasına bağımlı değil. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { SettingSwitch } from "../components/SettingSwitch";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter } from "@/components/ui/card";
|
||||
|
||||
@@ -110,7 +110,7 @@ export default async function SettingsPage() {
|
||||
<CardContent>
|
||||
<Label className="flex items-center justify-between gap-4 text-sm font-normal">
|
||||
Otomatik transkripsiyon aktif
|
||||
<Switch name="sttEnabled" defaultChecked={sttEnabled} />
|
||||
<SettingSwitch name="sttEnabled" defaultChecked={sttEnabled} />
|
||||
</Label>
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
@@ -127,11 +127,11 @@ export default async function SettingsPage() {
|
||||
<CardContent className="flex flex-col gap-4">
|
||||
<Label className="flex items-center justify-between gap-4 text-sm font-normal">
|
||||
Yayın başladığında Telegram bildirimi
|
||||
<Switch name="notifyStreamStart" defaultChecked={notifyStreamStart} />
|
||||
<SettingSwitch name="notifyStreamStart" defaultChecked={notifyStreamStart} />
|
||||
</Label>
|
||||
<Label className="flex items-center justify-between gap-4 text-sm font-normal">
|
||||
9:16 render tamamlandığında Telegram bildirimi
|
||||
<Switch name="notifyRenderDone" defaultChecked={notifyRenderDone} />
|
||||
<SettingSwitch name="notifyRenderDone" defaultChecked={notifyRenderDone} />
|
||||
</Label>
|
||||
</CardContent>
|
||||
<CardFooter>
|
||||
|
||||
Reference in New Issue
Block a user