basic account creation flow created

This commit is contained in:
2026-01-24 16:45:38 -07:00
parent 7d37fae332
commit 1c305cd494
14 changed files with 649 additions and 37 deletions
+9 -18
View File
@@ -1,3 +1,7 @@
{{- $loggedIn := and (and .Identity .Identity.AccessToken) true -}}
{{- $hasAccount := and (and .Identity .Identity.Account) true -}}
<!DOCTYPE html>
<html class="min-h-full flex flex-col items-stretch">
<head>
@@ -36,7 +40,7 @@
hx-boost="true"
{{/* subscribe to sse (if logged in) */}}
{{- if and .Identity .Identity.AccessToken }}
{{- if and $loggedIn $hasAccount }}
sse-connect="/api/events/"
sse-close="close"
{{- end }}
@@ -69,29 +73,16 @@
style="
"
>
<li class="pt-[1em] pb-[1em]">
<a href="/ui" class="p-[1em] font-display {{ if eq $path "/" }}selected{{ end }}">
Home
</a>
</li>
{{/* */}}
{{- $userID := .Identity.User.UserID }}
{{- $acct := .Identity.Account }}
{{- $acctID := 0 }}
{{- if $acct }}
{{- $acctID = $acct.AccountID }}
{{- end }}
{{- if not $userID }}
{{- if not $loggedIn }}
<li class="pt-[1em] pb-[1em]">
<a href="/api/auth/login" hx-boost="false" class="p-[1em] font-display {{ if eq $path "/auth/login" }}selected{{ end }}">
Log In / Sign Up
Log In
</a>
</li>
{{- else if $acctID }}
{{- else if $hasAccount }}
{{- $acctID := .Identity.Account.AccountID }}
<li class="pt-[1em] pb-[1em]">
<a href="/ui/accounts/{{$acctID}}" class="p-[1em] font-display {{ if eq $path (printf "/accounts/%d" $acctID) }}selected{{ end }}">