feat: frontend Gitea — workspaces 2 sections + gitea workspace vue
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

workspaces.html:
- Section 📁 Local Workspaces (existante, avec badges)
- Section 🔗 Gitea Projects (par organisation, lazy load)
- États: loading, not_linked (lien pour login OAuth), error (retry), ok

gitea_workspace.html:
- Arbre fichiers (lazy: un dossier à la fois)
- Vue fichier (lecture seule → bouton Edit)
- Éditeur avec zone de commit (message + historique dropdown)
- Section 🔒 Private Pages (placeholder pour pages FlowDeck locales)
- Bouton Delete fichier

Routing: /gitea-workspace?owner=X&repo=Y

Fallback: token admin serveur si pas de token OAuth utilisateur
This commit is contained in:
2026-07-13 14:58:01 -04:00
parent 00860417a8
commit 46336df21b
4 changed files with 513 additions and 23 deletions
+4 -3
View File
@@ -6,11 +6,12 @@ router = APIRouter(tags=["gitea"], prefix="/api/gitea")
def _require_gitea(request: Request):
"""Return a per-user GiteaClient or raise 401."""
from app.services.gitea_client import get_user_gitea_client
"""Return a per-user GiteaClient or fallback to admin token."""
from app.services.gitea_client import get_user_gitea_client, GiteaClient
client = get_user_gitea_client(request)
if not client:
raise HTTPException(status_code=401, detail="Gitea account not linked. Login with Gitea or connect in Settings.")
# Fallback to server admin token
client = GiteaClient()
return client