Add read-only repository viewer (UI + backend)

Implements a read-only repository viewer for remote Gitea repos and local clones. Adds UI/CSS for viewer panels, breadcrumb/branch controls, file table, code/Markdown preview, and readme rendering (frontend/css/components.css, frontend/js/app.js). Extends app state and wiring (state.js, app.js) with viewer actions, branch/content loading, local/remote navigation, and preview helpers (base64 decoding, markdown rendering, syntax highlighting, 256 KB preview limit). Adds Gitea API helpers to fetch repo branches and contents (frontend/js/gitea-api.js) and Tauri JS bindings for local repo operations (tauri-api.js). Implements Rust backend commands to list branches, tree entries, and file contents (with size/binary checks and helper utilities) and wires them into the Tauri command registry (src-tauri/src/lib.rs). Also updates README to mention the new read-only viewer.
This commit is contained in:
2026-05-09 18:45:51 +12:00
parent 17c0174e7d
commit f0358dbdfe
7 changed files with 1276 additions and 5 deletions
+1
View File
@@ -26,6 +26,7 @@ It connects to any compatible self-hosted Gitea instance (including Gitpub) with
- Dynamic API base URL generation (`<server>/api/v1`)
- Connection testing against Gitea API
- Repository dashboard with search and mock cards fallback
- Read-only repository viewer for remote Gitea repos and local clones
- Local repository open + recent repositories
- Rust Git commands: clone, pull, push, status, branch
- Settings for git path, clone directory, and theme placeholder