mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-06 06:46:23 +01:00
Yaak Proxy: fix review findings in the decryption UI
Count Reconnect's connections within its own scope, refresh the pass-through set from Try Again's answer, report a failed trust, keep the pill's switch where the app can't trust the certificate, and keep a failed tunnel's error across Type and Size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b0425069f4
commit
f5ff9cb63e
8 files changed
+91
-12
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { formatSize } from "@yaakapp-internal/lib/formatSize";
|
||||
import type { Flow } from "@yaakapp-internal/proxy-lib";
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import type { Flow, PassthroughResponse } from "@yaakapp-internal/proxy-lib";
|
||||
import {
|
||||
Button,
|
||||
Dropdown,
|
||||
@@ -59,7 +60,13 @@ export function EncryptedCard({ flow }: { flow: Flow }) {
|
||||
const showToast = useShowToast();
|
||||
const fail = (err: Error) =>
|
||||
showToast({ id: "encrypted-card", color: "danger", message: err.message });
|
||||
const forget = useRpcMutation("forget_passthrough", { onError: fail });
|
||||
const queryClient = useQueryClient();
|
||||
// Read from the answer too: an engine the CLI owns tells this app nothing of the change.
|
||||
const forget = useRpcMutation("forget_passthrough", {
|
||||
onError: fail,
|
||||
onSuccess: ({ addresses }) =>
|
||||
queryClient.setQueryData<PassthroughResponse>(["list_passthrough", {}], { addresses }),
|
||||
});
|
||||
const reconnect = useRpcMutation("reconnect_tunnels", { onError: fail });
|
||||
const connection = connectionOf(flow);
|
||||
const [busy, setBusy] = useState<string | null>(null);
|
||||
|
||||
Reference in new issue
Block a user