mirror of
https://github.com/spartanz51/tutabridge.git
synced 2026-06-24 10:54:32 +02:00
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.
25 lines
623 B
Bash
Executable File
25 lines
623 B
Bash
Executable File
#!/usr/bin/env python3
|
|
"""Dev wrapper for cargo tauri dev. Ctrl+C kills all child processes."""
|
|
import subprocess, signal, os, sys, time
|
|
|
|
# Ensure terminal delivers SIGINT on Ctrl+C (zsh disables this in some configs)
|
|
os.system("stty isig 2>/dev/null")
|
|
|
|
proc = subprocess.Popen(
|
|
["cargo", "tauri", "dev"] + sys.argv[1:],
|
|
start_new_session=True,
|
|
)
|
|
|
|
def kill_all(sig, frame):
|
|
try:
|
|
os.killpg(proc.pid, signal.SIGKILL)
|
|
except ProcessLookupError:
|
|
pass
|
|
sys.exit(0)
|
|
|
|
signal.signal(signal.SIGINT, kill_all)
|
|
signal.signal(signal.SIGTERM, kill_all)
|
|
|
|
while proc.poll() is None:
|
|
time.sleep(0.5)
|