This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

appview/pages: use html fragment for signup

instead of inline html string, which seems to have styling issues

Signed-off-by: oppiliappan <me@oppi.li>

author
oppiliappan
committer
Tangled
date (Jul 21, 2026, 10:57 AM +0300) commit 91cfc400 parent acfa6bbc change-id musrpwsx
+27 -7
+8
appview/pages/pages.go
··· 362 362 return p.executeLogin("user/completeSignup", w, nil) 363 363 } 364 364 365 + type SignupSuccessParams struct { 366 + Handle string 367 + } 368 + 369 + func (p *Pages) SignupSuccess(w io.Writer, params SignupSuccessParams) error { 370 + return p.executePlain("user/fragments/signupSuccess", w, params) 371 + } 372 + 365 373 type TermsOfServiceParams struct { 366 374 BaseParams 367 375 Content template.HTML
+18
appview/pages/templates/user/fragments/signupSuccess.html
··· 1 + {{ define "user/fragments/signupSuccess" }} 2 + <main 3 + id="main" 4 + hx-swap-oob="outerHTML" 5 + class="w-full max-w-md px-7 mt-4 flex flex-col items-center gap-4 text-center" 6 + > 7 + <div class="flex items-center justify-center size-16 rounded-full bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400"> 8 + {{ i "check" "size-8" }} 9 + </div> 10 + <p class="text-lg dark:text-white">Account created successfully</p> 11 + <a 12 + href="/login?handle={{ .Handle }}" 13 + class="btn-create w-full text-base hover:no-underline hover:text-white inline-flex items-center justify-center gap-1" 14 + > 15 + Continue to login {{ i "arrow-right" "size-4" }} 16 + </a> 17 + </main> 18 + {{ end }}
+1 -7
appview/signup/signup.go
··· 332 332 // if we get here, we've successfully created the account and added the email 333 333 success = true 334 334 335 - s.pages.NoticeHTMLWithClears(w, "signup-msg", fmt.Sprintf(` 336 - <div class="w-full h-fit mt-4 p-4 bg-green-50 dark:bg-green-300 border border-green-200 dark:border-green-400 text-green-800 dark:text-green-900 rounded"> 337 - Account created successfully. 338 - <br/> 339 - You can now <a class="dark:text-black hover:dark:text-black underline" href="/login">login</a> with <code>%s.tngl.sh</code>. 340 - </div> 341 - `, username), "signup-error") 335 + s.pages.SignupSuccess(w, pages.SignupSuccessParams{Handle: autoClaimDomain}) 342 336 343 337 // clean up inflight signup asynchronously 344 338 go func() {