Check if we have oauth information, only prompt if its missing

Also include a rough dashboard of information that we'll pull from
Fieldseeker
This commit is contained in:
Eli Ribble 2025-11-06 22:58:18 +00:00
parent fa89e0719f
commit 72cbe2de5e
No known key found for this signature in database
10 changed files with 567 additions and 100 deletions

12
html.go
View file

@ -15,6 +15,7 @@ import (
var (
dashboard = newBuiltTemplate("dashboard", "authenticated")
oauthPrompt = newBuiltTemplate("oauth-prompt", "authenticated")
report = newBuiltTemplate("report", "base")
reportConfirmation = newBuiltTemplate("report-confirmation", "base")
reportContribute = newBuiltTemplate("report-contribute", "base")
@ -99,6 +100,17 @@ func htmlDashboard(w io.Writer, user *models.User) error {
return dashboard.ExecuteTemplate(w, data)
}
func htmlOauthPrompt(w io.Writer, user *models.User) error {
data := ContentDashboard{
User: User{
DisplayName: user.DisplayName,
Initials: extractInitials(user.DisplayName),
Username: user.Username,
},
}
return oauthPrompt.ExecuteTemplate(w, data)
}
func htmlReport(w io.Writer) error {
url := BaseURL + "/report/t78fd3"
data := ContentReportDiagnostic{