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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user