Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/detailedRequest/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ const DetailedRequest = memo(({ title, data, view, protocol }: DetailedRequestP)
Copy <CopyIcon />
</button>
<div className="pre_wrapper">
<pre className={protocol === 'http' ? 'language-http' : 'default'}>
<pre className={protocol === 'http' || protocol === 'https' ? 'language-http' : 'default'}>
<code
ref={codeRef}
className={protocol === 'http' ? 'language-http' : 'default'}
className={protocol === 'http' || protocol === 'https' ? 'language-http' : 'default'}
>
{data}
</code>
Expand Down
6 changes: 5 additions & 1 deletion src/lib/localStorage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export const getStoredData = (): StoredData => {
const stored = localStorage.getItem(STORAGE_KEY);
if (stored) {
const parsed = JSON.parse(stored);
return { ...defaultStoredData, ...parsed };
return {
...defaultStoredData,
...parsed,
filter: { ...defaultStoredData.filter, ...parsed.filter },
};
}
} catch (error) {
console.error('Failed to read from localStorage:', error);
Expand Down
1 change: 1 addition & 0 deletions src/lib/types/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type Filter = Record<Protocol, boolean>;
export const defaultFilter: Filter = {
dns: true,
http: true,
https: true,
smtp: true,
};

Expand Down
2 changes: 1 addition & 1 deletion src/lib/types/protocol.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const protocols = ['dns', 'http', 'smtp'] as const;
export const protocols = ['dns', 'http', 'https', 'smtp'] as const;
export type Protocol = (typeof protocols)[number];

export const Protocol = {
Expand Down