1
Fork 0

feat(ui): add quota overview (#6602)

Add UI to the quota feature to see what quotas applies to you and if you're exceeding any quota, it's designed to be a general size overview although it's exclusively filled with quota features for now. There's also no UI to see what item is actually taking in the most size. Purely an quota overview.

Screenshots:
![](https://codeberg.org/attachments/9f7480f2-4c31-4d70-8aec-61db79282a1e)
![](https://codeberg.org/attachments/0bd45bf3-28c5-47bf-8fff-c4ae9f38cb28)

With inspiration from concept by 0ko:
![](https://codeberg.org/attachments/b8154a52-6fba-42fc-a4a8-b3ab1527fb33)

Co-authored-by: Otto Richter <git@otto.splvs.net>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6602
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
Gusted 2025-02-26 14:36:53 +00:00 committed by 0ko
parent 6dad457552
commit 77a1af5ab8
24 changed files with 348 additions and 33 deletions

View file

@ -0,0 +1,20 @@
// Copyright 2024 The Forgejo Authors. All rights reserved.
// SPDX-License-Identifier: GPL-3.0-or-later
package setting
import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/routers/web/shared"
"code.gitea.io/gitea/services/context"
)
const (
tplSettingsStorageOverview base.TplName = "user/settings/storage_overview"
)
// StorageOverview render a size overview of the user, as well as relevant
// quota limits of the instance.
func StorageOverview(ctx *context.Context) {
shared.StorageOverview(ctx, ctx.Doer.ID, tplSettingsStorageOverview)
}