Add repo filters, UI tabs and dev docs

Enhance UI and dev workflow: add main/right tabbed panels (Repositories/Local and Clone/Settings/Servers), repository owner filter pills (All/Personal/Organizations), org-grouped listing, repo cards, git output and empty-state styling. Introduce new state vars (activeMainTab, activeRightTab, repoOwnerFilter, currentUserLogin) and update event bindings to toggle tabs/filters and focus appropriate panels on actions. Add fetchCurrentUser to gitea-api and use it when loading repositories to distinguish personal vs organization repos (falls back to mock user on error). Update README with development/prerequisites and build instructions and rename npm script "tauri:dev" -> "dev" for running the Tauri dev process.
This commit is contained in:
2026-05-09 18:12:36 +12:00
parent 6b245c628c
commit ce7f83734a
5 changed files with 497 additions and 115 deletions
+37 -2
View File
@@ -30,9 +30,44 @@ It connects to any compatible self-hosted Gitea instance (including Gitpub) with
- Rust Git commands: clone, pull, push, status, branch
- Settings for git path, clone directory, and theme placeholder
## Run
## Development
### Prerequisites
- [Node.js](https://nodejs.org/) (npm comes with it)
- [Rust](https://www.rust-lang.org/tools/install) via `rustup` (required for the Tauri backend)
- Platform-specific Tauri dependencies (WebView2 on Windows, Xcode tools on macOS, etc.) — see the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) for your OS
- **Git** installed and available on your `PATH` (the app shells out to `git` for clone, pull, push, and related commands)
### Start the app in dev mode
From the repository root:
```bash
npm install
npm run tauri:dev
npm run dev
```
This runs the Tauri dev process, which loads the static frontend from `frontend/` and hot-reloads the Rust side when you change `src-tauri/`. Edit HTML/CSS/JS under `frontend/` and refresh the window (or rely on your usual workflow) as needed.
### Production build
```bash
npm install
npm run tauri:build
```
Installers and bundles are emitted under `src-tauri/target/release/bundle/` (exact paths depend on the target platform).
### Useful commands
| Command | Purpose |
| --- | --- |
| `npm run dev` | Desktop app in development mode |
| `npm run tauri:build` | Release build and platform bundles |
| `npm run tauri -- <args>` | Forward arguments to the Tauri CLI (e.g. `npm run tauri -- info`) |
### Notes
- There is no separate Vite/webpack dev server; the UI is plain static files under `frontend/`.
- Point the app at a running Gitea-compatible instance during setup; API calls use `<your-server>/api/v1`.