Commit Graph

5 Commits

Author SHA1 Message Date
Claude
2958dca282 Add system tray, shutdown-after-finish scheduler, repoint updater
- src/tray.rs: system tray with show/hide/quit menu, left-click
    toggles main window visibility (minimize-to-tray parity with v1).
  - src/shutdown.rs: 60s countdown with per-second 'shutdown-countdown'
    event; sleep/shutdown/restart via rundll32/shutdown on Windows,
    cancel-aware.
  - cancel_shutdown + set_shutdown_after_finish commands now drive the
    scheduler so the renderer's existing countdown UI works unchanged.
  - Cargo features + tray-icon + image-png added.
  - Updater pointed at new Gitea repo Administrator/Multi-Hoster-Upload-2.
2026-04-20 18:32:59 +02:00
Claude
100bda60cd Add OTP flow, drop-target floating window, in-app auto-update installer
OTP (Doodstream two-factor):
  - src/otp.rs: OtpBroker registers per-request oneshot channels with
    180s timeout, survives abort via Cancelled answer.
  - Doodstream login now loops: first attempt without OTP; if server
    says OTP required, emit 'otp-required' event to the renderer with
    a request_id, wait for provide_otp/cancel_otp commands, re-POST
    with the code. Renderer can pop a modal on otp-required.
  - UploadCtx carries the broker + app handle so any future hoster can
    do the same pattern.

Drop-target floating window:
  - src/drop-target.html: minimal always-on-top borderless window with
    dashed drop-zone. Emits 'drop-target-files' to the main window on
    drag-drop.
  - show_drop_target / hide_drop_target commands create/close the
    'drop-target' webview on demand.
  - Capabilities updated for dual-window use.

In-app auto-update:
  - updater::download_and_launch: fetches the NSIS/MSI from Gitea to
    %TEMP%, launches detached, exits the app so the installer can
    replace the running exe.
  - Commands install_update + install_update_now both go through the
    new helper. Renderer clicks 'Install Update' → Rust downloads and
    hands off, then process exit.

Härtetest results:
  - exe: 7.54 MB
  - NSIS: 2.70 MB
  - MSI:  3.69 MB
  - RAM idle: 33 MB (vs Electron ~300 MB)
  - All 3 unit tests pass (secret encryption round-trips).
2026-04-20 18:08:18 +02:00
Claude
615161d747 Full port: v1 renderer shim + folder monitor + remote server + updater + upload log fallback
Major additions:

Frontend — v1 renderer/app.js and renderer/index.html copied 1:1. A
new tauri-shim.js reconstructs window.api with all 54 methods v1 used,
each mapped to a matching Rust #[tauri::command] so the existing
renderer works unchanged. Drag-drop paths are bridged via the Tauri
tauri://drag-drop event.

Backend modules:
  - folder_monitor.rs: notify-debouncer-full based recursive/
    non-recursive watch, include/exclude extension filter, skip-dupes,
    initial baseline scan, emits 'folder-monitor-new-files' to frontend.
    Auto-restarts on launch if persisted settings have enabled=true.
  - remote_server.rs: axum HTTP server with bearer-token auth exposing
    /api/status, /api/control/cancel, /api/control/finish-after.
    Auto-restarts on launch if enabled + token set.
  - updater.rs: Gitea releases polling + semver compare, returns
    download URL for current platform. install_update opens the URL
    externally (true in-app update needs signing cert later).
  - upload_log.rs: full fallback ladder (primary → Desktop → AppData),
    daily-log suffix handling, auto-persists working fallback path into
    globalSettings.logFilePath so next session writes there directly,
    emits 'upload-log-fallback' to the renderer once per session.

Commands added (all wired into tauri::generate_handler!):
  get_hoster_settings, save_hoster_settings, get_global_settings,
  save_global_settings, set_always_on_top, get_always_on_top,
  set_shutdown_after_finish, get_shutdown_after_finish, cancel_shutdown,
  resolve_folder_files, copy_to_clipboard (Windows clipboard via
  PowerShell pipe), start_upload, add_jobs_to_batch,
  finish_after_active, run_health_check, export_backup, import_backup,
  import_backup_saved (legacy-password path), read_own_upload_log,
  import_upload_log, save_text_file, open_log_folder,
  read_rotation_log, get_version, check_for_update, install_update,
  folder_monitor_start/stop/status, remote_get_settings,
  remote_save_settings, remote_generate_token, remote_status,
  show_drop_target, hide_drop_target, debug_log.

Release build: exe 7.5 MB, NSIS 2.7 MB, MSI 3.7 MB.
2026-04-20 17:41:11 +02:00
Claude
c97c6b9469 Port Doodstream and VOE uploaders to Rust
- Doodstream: login_ajax + sess_id scrape from /?op=upload page +
    upload_server + multipart upload + XFS-style fn field + filecode
    extraction. Skips OTP path (v1 still has the full flow).
  - VOE: login page CSRF scrape + POST /login + fresh CSRF from
    /file-upload + /engine/delivery-node for CDN server + baseline
    my-files snapshot + multipart upload + file-list polling fallback
    when response is empty.

Both wire into the existing dispatcher (hosters::upload_file) and
pick up the same rotation/classifier layer as the other uploaders.

Release build clean: exe 7.0 MB, NSIS 2.5 MB, MSI 3.4 MB.
2026-04-20 17:14:09 +02:00
Claude
8627a8e694 Tauri 2 / Rust rewrite — initial 2.0 scaffold
Working:
  - Core: config, secret encryption, events, throttle
  - Upload manager with full rotation/classifier parity to v1
  - Clouddrop uploader (simple + chunked upload.clouddrop.cc)
  - Byse uploader with file-list polling for empty-filecode case
  - Vidmoly uploader (new /api/auth/login + /api/upload/config + X-Progress-ID)
  - Minimal frontend (accounts, settings, upload table, rotation log)
  - Release build: exe 6.9 MB, NSIS installer 2.5 MB, MSI 3.4 MB

Stubs (return 'not yet ported' error):
  - Doodstream (web login + CSRF — v1 scraper needs careful port)
  - VOE (web login + CSRF + delivery-node negotiation)

Not yet migrated from v1:
  - Queue persistence on restart
  - Folder monitor
  - Remote-control server
  - Drop-target floating window
  - Auto-updater
2026-04-20 17:08:00 +02:00