merge app-update into info section, add CalVer app version
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import { useFollows } from "@/shared/hooks/use-follows"
|
||||
import { usePush } from "@/shared/hooks/use-push"
|
||||
import { usePwaUpdate } from "@/shared/hooks/use-pwa-update"
|
||||
import { fetchTopics } from "@/shared/lib/aw-api"
|
||||
import { BACKEND_URL, VAPID_PUBLIC_KEY } from "@/shared/lib/constants"
|
||||
import { APP_VERSION, BACKEND_URL, VAPID_PUBLIC_KEY } from "@/shared/lib/constants"
|
||||
import { useCallback, useEffect, useState } from "react"
|
||||
import { type GeoResult, clearGeoCache, detectFromCoords, loadCachedResult } from "../../location/lib/geo"
|
||||
import { NotificationGuide } from "./notification-guide"
|
||||
@@ -171,35 +171,26 @@ export function SettingsPage() {
|
||||
</Card>
|
||||
</section>
|
||||
|
||||
{/* --- App Update --- */}
|
||||
<section>
|
||||
<h2 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-2">App-Update</h2>
|
||||
<Card className="py-0 gap-0">
|
||||
<CardContent className="p-0">
|
||||
{needRefresh ? (
|
||||
<div className="flex items-center justify-between px-4 py-3">
|
||||
<span className="text-sm">Neue Version verfügbar</span>
|
||||
<Button size="sm" onClick={applyUpdate}>
|
||||
Jetzt aktualisieren
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center justify-between px-4 py-3">
|
||||
<span className="text-sm">App ist aktuell</span>
|
||||
<Button size="sm" variant="outline" onClick={handleCheckUpdate} disabled={checking}>
|
||||
{checking ? "Prüfe…" : "Prüfen"}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</section>
|
||||
|
||||
{/* --- About --- */}
|
||||
{/* --- Info --- */}
|
||||
<section>
|
||||
<h2 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-2">Info</h2>
|
||||
<Card className="py-0 gap-0">
|
||||
<CardContent className="p-0 divide-y divide-border">
|
||||
<div className="flex justify-between px-4 py-3">
|
||||
<span className="text-sm">Version</span>
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-sm text-muted-foreground">{APP_VERSION}</span>
|
||||
{needRefresh ? (
|
||||
<Button size="sm" onClick={applyUpdate}>
|
||||
Aktualisieren
|
||||
</Button>
|
||||
) : (
|
||||
<Button size="sm" variant="outline" onClick={handleCheckUpdate} disabled={checking}>
|
||||
{checking ? "Prüfe…" : "Prüfen"}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-between px-4 py-3">
|
||||
<span className="text-sm">Datenquelle</span>
|
||||
<a
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export const APP_VERSION = "2026.03.02.1"
|
||||
|
||||
export const AW_API_BASE = "https://www.abgeordnetenwatch.de/api/v2"
|
||||
export const AW_API_TIMEOUT_MS = 20_000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user