Files
tutabridge/ui/src/components/LogsPanel.tsx
T
Anthony f80ee635d0 Restructure into Cargo workspace with Tauri desktop GUI
Split the bridge into a tutabridge-core crate, a Tauri v2 desktop app
(src-tauri) and a React/TS UI (ui), keeping the CLI entrypoint at the
workspace root.

Add encrypted local storage (SQLCipher metadata index + encrypted .eml
files) so mail persists across launches and only the delta is fetched.

Wire the bridge to the Tuta Rust SDK via the tuta-repo submodule
(batch loading, MailDetailsBlob reading, interactive 2FA login).

Implement SMTP sending: build the draft and send it through Tuta's
DraftService/SendDraftService, mirroring the web client (body in
compressedBodyText, non-empty sender/recipient names, populated
SendDraftParameters). Add unit tests for the draft/send payload building.
2026-05-27 12:18:01 +02:00

38 lines
858 B
TypeScript

import { useEffect, useRef } from "react";
interface Props {
logs: string[];
onClear: () => void;
}
export function LogsPanel({ logs, onClear }: Props) {
const endRef = useRef<HTMLDivElement>(null);
useEffect(() => {
endRef.current?.scrollIntoView({ behavior: "smooth" });
}, [logs]);
return (
<div className="panel logs-panel">
<div className="logs-header">
<h2>Logs</h2>
<button className="small" onClick={onClear}>
Clear
</button>
</div>
<div className="logs-container">
{logs.length === 0 ? (
<span className="logs-empty">No logs yet</span>
) : (
logs.map((line, i) => (
<div key={i} className="log-line">
{line}
</div>
))
)}
<div ref={endRef} />
</div>
</div>
);
}