Font size and other fixes

This commit is contained in:
Gregory Schier
2026-03-12 15:35:55 -07:00
parent d8ce5c9d1a
commit 9e0a708011
6 changed files with 231 additions and 40 deletions

View File

@@ -22,30 +22,34 @@ export function ExchangesTable({ exchanges, style, className }: Props) {
}
return (
<Table scrollable className={classNames('px-2', className)} style={style}>
<TableHead>
<TableRow>
<TableHeaderCell>Method</TableHeaderCell>
<TableHeaderCell>URL</TableHeaderCell>
<TableHeaderCell>Status</TableHeaderCell>
<TableHeaderCell>Type</TableHeaderCell>
</TableRow>
</TableHead>
<TableBody>
{exchanges.map((ex) => (
<TableRow key={ex.id}>
<TableCell className="font-mono text-2xs">{ex.method}</TableCell>
<TruncatedWideTableCell className="font-mono text-2xs">{ex.url}</TruncatedWideTableCell>
<TableCell>
<StatusBadge status={ex.resStatus} error={ex.error} />
</TableCell>
<TableCell className="text-text-subtle text-xs">
{getContentType(ex.resHeaders)}
</TableCell>
<div className={className} style={style}>
<Table scrollable className="px-2">
<TableHead>
<TableRow>
<TableHeaderCell>Method</TableHeaderCell>
<TableHeaderCell>URL</TableHeaderCell>
<TableHeaderCell>Status</TableHeaderCell>
<TableHeaderCell>Type</TableHeaderCell>
</TableRow>
))}
</TableBody>
</Table>
</TableHead>
<TableBody>
{exchanges.map((ex) => (
<TableRow key={ex.id}>
<TableCell className="font-mono text-2xs">{ex.method}</TableCell>
<TruncatedWideTableCell className="font-mono text-2xs">
{ex.url}
</TruncatedWideTableCell>
<TableCell>
<StatusBadge status={ex.resStatus} error={ex.error} />
</TableCell>
<TableCell className="text-text-subtle text-xs">
{getContentType(ex.resHeaders)}
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</div>
);
}

View File

@@ -55,28 +55,29 @@ export function ProxyLayout() {
}}
/>
</div>
<div data-tauri-drag-region className="pointer-events-none flex items-center text-sm px-2">
<div
data-tauri-drag-region
className="pointer-events-none flex items-center text-sm px-2"
>
Yaak Proxy
</div>
<div className="flex items-center gap-1 pr-1 pointer-events-auto">
<span
className={classNames('text-xs', isRunning ? 'text-success' : 'text-text-subtlest')}
>
{isRunning ? 'Running on :9090' : 'Stopped'}
</span>
{isRunning ? (
<ActionIconButton
action={{ scope: 'global', action: 'proxy_stop' }}
icon="circle_stop"
size="sm"
iconColor="danger"
/>
<>
<span className="text-2xs text-success">Running :9090</span>
<ActionIconButton
action={{ scope: 'global', action: 'proxy_stop' }}
icon="circle_stop"
iconColor="secondary"
size="sm"
/>
</>
) : (
<ActionIconButton
action={{ scope: 'global', action: 'proxy_start' }}
icon="circle_play"
iconColor="secondary"
size="sm"
iconColor="success"
/>
)}
</div>

View File

@@ -0,0 +1,2 @@
// Hardcode font size for now. In the future, this could be configurable.
document.documentElement.style.fontSize = '15px';

View File

@@ -21,6 +21,7 @@
</head>
<body class="text-base">
<div id="root"></div>
<script type="module" src="/font-size.ts"></script>
<script type="module" src="/lib/theme.ts"></script>
<script type="module" src="/main.tsx"></script>
</body>