Files
Gregory SchierandClaude Opus 5.5 b0425069f4 Yaak Proxy: HTTPS decryption UI, and Info and Body in the card's tabs
The strip, quiet encrypted rows, warning rows for refused handshakes, the
encrypted card with named actions, trust at the first Decrypt, the toast
with Undo and Reconnect, the pill's Decrypt everything switch, Settings'
Decryption section, the Encrypted sidebar row, and two-step setup. Both
body tabs read Body with a type badge; Info leads the request half with
the timeline folded in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 22:30:40 -07:00

28 lines
900 B
TypeScript

import { useQueryClient } from "@tanstack/react-query";
import type {
DecryptList,
DecryptListChangedPayload,
DecryptListEntry,
} from "@yaakapp-internal/proxy-lib";
import { useCallback } from "react";
import { useRpcEvent } from "./useRpcEvent";
import { useRpcQuery } from "./useRpcQuery";
const KEY = ["get_decrypt_list", {}];
const EMPTY: DecryptListEntry[] = [];
/**
* The decrypt list's entries, empty until read. Kept current as this process changes it, from
* the app or through its control API.
*/
export function useDecryptList(): DecryptListEntry[] {
const queryClient = useQueryClient();
const onChanged = useCallback(
(payload: DecryptListChangedPayload) =>
queryClient.setQueryData<DecryptList>(KEY, payload.list),
[queryClient],
);
useRpcEvent("decrypt_list_changed", onChanged);
return useRpcQuery("get_decrypt_list", {}).data?.entries ?? EMPTY;
}