Add the debug packet recorder behind the developer-tools toggle.
This commit is contained in:
@@ -37,6 +37,7 @@ type DeveloperToolsProps = {
|
||||
export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
const mx = useMatrixClient();
|
||||
const [developerTools, setDeveloperTools] = useSetting(settingsAtom, 'developerTools');
|
||||
const [debugPackets, setDebugPackets] = useSetting(settingsAtom, 'debugPackets');
|
||||
const [expand, setExpend] = useState(false);
|
||||
const [accountDataType, setAccountDataType] = useState<string | null>();
|
||||
const [profileExpand, setProfileExpand] = useState(false);
|
||||
@@ -162,6 +163,30 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) {
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<SettingTile
|
||||
title="Debug Packets"
|
||||
description="Record every Matrix HTTP request and response."
|
||||
after={
|
||||
<Switch variant="Primary" value={debugPackets} onChange={setDebugPackets} />
|
||||
}
|
||||
/>
|
||||
{window.electron?.debug && (
|
||||
<SettingTile
|
||||
title="Packet Window"
|
||||
after={
|
||||
<Button
|
||||
onClick={() => window.electron?.debug?.openWindow()}
|
||||
variant="Secondary"
|
||||
fill="Soft"
|
||||
size="300"
|
||||
radii="300"
|
||||
outlined
|
||||
>
|
||||
<Text size="B300">Open packet window</Text>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</SequenceCard>
|
||||
{developerTools && (
|
||||
<SequenceCard
|
||||
|
||||
@@ -253,6 +253,11 @@ export const SETTINGS_SEARCH_CATALOG: SettingsSearchEntry[] = [
|
||||
keywords: ['debug'],
|
||||
},
|
||||
{ page: SettingsPages.DeveloperToolsPage, title: 'Access Token', keywords: ['auth', 'secret'] },
|
||||
{
|
||||
page: SettingsPages.DeveloperToolsPage,
|
||||
title: 'Debug Packets',
|
||||
keywords: ['http', 'network', 'request', 'response'],
|
||||
},
|
||||
{ page: SettingsPages.DeveloperToolsPage, title: 'Account Data', keywords: ['global', 'events'] },
|
||||
{
|
||||
page: SettingsPages.DeveloperToolsPage,
|
||||
|
||||
Reference in New Issue
Block a user