changed layout of repo settings page

This commit is contained in:
2026-05-07 12:32:07 +02:00
parent 39dd9ab9eb
commit 00aede9c91
5 changed files with 525 additions and 69 deletions
+5 -1
View File
@@ -21,6 +21,7 @@ type repoResponse struct {
models.Repository
OwnerName string `json:"ownerName"`
IsEmpty bool `json:"isEmpty"`
Size int64 `json:"size"`
}
func (h *RepoHandler) withOwnerName(repo *models.Repository) repoResponse {
@@ -199,7 +200,10 @@ func (h *RepoHandler) Get(w http.ResponseWriter, r *http.Request) {
if !ok {
return
}
jsonOK(w, h.withOwnerName(repo))
resp := h.withOwnerName(repo)
gitdomain.SetRepoRoot(h.cfg.RepoRoot)
resp.Size = gitdomain.RepoSize(repo.DiskPath)
jsonOK(w, resp)
}
func (h *RepoHandler) Tree(w http.ResponseWriter, r *http.Request) {