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:
parent
fa89e0719f
commit
72cbe2de5e
10 changed files with 567 additions and 100 deletions
12
html.go
12
html.go
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue