feat: frontend Gitea — workspaces 2 sections + gitea workspace vue
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user