package templates import ( "fmt" "veola/internal/models" ) type SettingsData struct { Page Values map[string]string IsAdmin bool Users []models.User TestNtfyOK string TestApifyOK string TestEbayOK string TestResendOK string EbayUsedToday int EbayDailyLimit int ApifyToday int ApifyMonth int ApifyCostPerCall float64 MonthlyBudget float64 PasswordMsg string PasswordError string UserMsg string UserError string EmailMsg string EmailError string // ForwardAuthMode is true when the deployment delegates identity to // Authentik (forward-auth). Email is then managed centrally in Authentik // and read-only in Veola for every user. ForwardAuthMode bool } // ApifyMonthCost is the estimated month-to-date Apify spend. func (d SettingsData) ApifyMonthCost() float64 { return float64(d.ApifyMonth) * d.ApifyCostPerCall } // EbayLimitReached reports whether eBay polling is currently halted because // the daily call limit has been hit. func (d SettingsData) EbayLimitReached() bool { return d.EbayDailyLimit > 0 && d.EbayUsedToday >= d.EbayDailyLimit } templ settingsBody(d SettingsData) {
Credentials, budget, notifications, and users
| Username | Role | Created | |
|---|---|---|---|
| { u.Username } | { string(u.Role) } | { u.CreatedAt.Format("2006-01-02") } |