Add seed/Telegram login button and traffic usage indicator

New non-blocking login panel on the Home screen (seed backup/restore +
Telegram magic-link via the bot deep-link, polled through the new backend
endpoints) — uses its own popover instead of a full-screen Dialog so the
burger menu stays clickable while it's open. VpnStats now shows a used/limit
usage bar backed by a new useUsageStore.

Also registers tauri-plugin-shell (needed to open the t.me deep-link) and
threads an optional auth token from the app down through TunnelConfig to the
proxy client (desktop + Android), for instances running --require-auth.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 00:31:27 +07:00
parent bf50824833
commit 0cb6ad2860
17 changed files with 596 additions and 26 deletions
+4
View File
@@ -10,6 +10,7 @@ import VpnControlButton from "@/components/shared/VpnControlButton";
import { useTheme } from "@/ThemeProvider";
import { useSettingsStore } from "@/store/useSettingsStore";
import { useNodesStore } from "@/store/useNodesStore";
import { getCachedToken } from "@/lib/api";
export function VpnControl() {
const { status, setStatus } = useVpnStore();
@@ -37,6 +38,9 @@ export function VpnControl() {
killswitchEnabled: killSwitch,
excludedApps: excludedApps,
excludedDomains: excludedDomains,
// Есть только если сервер требует `--require-auth`; на инстансах без
// этого флага прокси значение просто игнорирует.
authToken: getCachedToken() ?? undefined,
};
await startVpn(config, node.ipAddress, node.port, node.sni);
} else {