mirror of
https://github.com/Zproger/Aurum.git
synced 2026-11-18 08:02:49 +07:00
feat: показывать версию приложения в настройках, версия 1.1.0
Версии бэкенда и фронтенда были не синхронизированы и нигде не отображались в интерфейсе — непонятно было, обновилось ли приложение после пересборки. Теперь единая версия 1.1.0 приходит с бэкенда через /api/health и мелким текстом выводится внизу страницы настроек.
This commit is contained in:
@@ -2,14 +2,26 @@ import { AlertThresholdsCard } from "@/components/settings/AlertThresholdsCard";
|
||||
import { BackupCard } from "@/components/settings/BackupCard";
|
||||
import { CurrencyCard } from "@/components/settings/CurrencyCard";
|
||||
import { PreferencesCard } from "@/components/settings/PreferencesCard";
|
||||
import { useHealth } from "@/hooks/useHealth";
|
||||
import { t } from "@/lib/i18n";
|
||||
|
||||
export function SettingsPage() {
|
||||
// Purely informational — if /api/health hasn't answered yet (or is
|
||||
// unreachable), just show nothing rather than a loading/error state for
|
||||
// one line of fine print.
|
||||
const { data: health } = useHealth();
|
||||
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
<PreferencesCard />
|
||||
<CurrencyCard />
|
||||
<AlertThresholdsCard />
|
||||
<BackupCard />
|
||||
{health?.version && (
|
||||
<p className="text-center text-xs text-text-muted">
|
||||
{t("settings.version", { version: health.version })}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user