add feedback to all developer settings buttons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-03 14:58:13 +01:00
parent 9008c57caa
commit 08029ee68c

View File

@@ -35,6 +35,9 @@ export function SettingsPage() {
const [devPush, setDevPush] = useState<string | null>(null)
const [devTopics, setDevTopics] = useState<string | null>(null)
const [devPoliticians, setDevPoliticians] = useState<string | null>(null)
const [devUnfollowTopics, setDevUnfollowTopics] = useState<string | null>(null)
const [devUnfollowPoliticians, setDevUnfollowPoliticians] = useState<string | null>(null)
const [devReload, setDevReload] = useState<string | null>(null)
useEffect(() => {
loadCachedResult(db).then((cached) => {
@@ -293,9 +296,20 @@ export function SettingsPage() {
</div>
<div className="flex items-center justify-between px-4 py-3">
<span className="text-sm">Allen Themen entfolgen</span>
<Button size="sm" variant="outline" onClick={unfollowAllTopics}>
Entfolgen
</Button>
<div className="flex items-center gap-2">
{devUnfollowTopics && <span className="text-xs text-green-600">{devUnfollowTopics}</span>}
<Button
size="sm"
variant="outline"
onClick={async () => {
setDevUnfollowTopics(null)
await unfollowAllTopics()
setDevUnfollowTopics("ok")
}}
>
Entfolgen
</Button>
</div>
</div>
<div className="flex items-center justify-between px-4 py-3">
<span className="text-sm">Alle Abgeordnete folgen</span>
@@ -323,15 +337,38 @@ export function SettingsPage() {
</div>
<div className="flex items-center justify-between px-4 py-3">
<span className="text-sm">Allen Abgeordneten entfolgen</span>
<Button size="sm" variant="outline" onClick={unfollowAllPoliticians}>
Entfolgen
</Button>
<div className="flex items-center gap-2">
{devUnfollowPoliticians && <span className="text-xs text-green-600">{devUnfollowPoliticians}</span>}
<Button
size="sm"
variant="outline"
onClick={async () => {
setDevUnfollowPoliticians(null)
await unfollowAllPoliticians()
setDevUnfollowPoliticians("ok")
}}
>
Entfolgen
</Button>
</div>
</div>
<div className="flex items-center justify-between px-4 py-3">
<span className="text-sm">Abgeordnete neu laden</span>
<Button size="sm" variant="outline" onClick={() => detect(true)} disabled={loading || !hasLocation}>
Neu laden
</Button>
<div className="flex items-center gap-2">
{devReload && <span className="text-xs text-green-600">{devReload}</span>}
<Button
size="sm"
variant="outline"
disabled={loading || !hasLocation}
onClick={() => {
setDevReload(null)
detect(true)
setDevReload("gestartet")
}}
>
Neu laden
</Button>
</div>
</div>
</CardContent>
</Card>