Files
warpbox-dev/backend/libs/handlers/pages.go
Daniel Legt 26619bacbc feat: add admin console, cleanup, and thumbnail workers
- Implement a token-authenticated admin console at `/admin` with overview metrics and file management.
- Add a background worker to periodically clean up expired boxes based on `WARPBOX_CLEANUP_EVERY`.
- Add a background worker to generate image and video thumbnails based on `WARPBOX_THUMBNAIL_EVERY`.
- Update file storage paths to use `@each@` and `@thumb@` prefixes to separate original files from thumbnails.
- Add severity fields to startup logs and update configuration templates.
2026-05-25 16:52:57 +03:00

22 lines
450 B
Go

package handlers
import (
"net/http"
"warpbox.dev/backend/libs/web"
)
type homeData struct {
MaxUploadSize string
}
func (a *App) Home(w http.ResponseWriter, r *http.Request) {
a.renderer.Render(w, http.StatusOK, "home.html", web.PageData{
Title: "Upload your files",
Description: "Upload and share files through a self-hosted Warpbox instance.",
Data: homeData{
MaxUploadSize: a.uploadService.MaxUploadSizeLabel(),
},
})
}