{{define "signup"}} {{t "signup.title"}}

{{t "signup.heading"}}

{{t "signup.sub"}}

{{if .Done}}

{{t "signup.thanks"}}

{{t "signup.no_email"}}

{{th "signup.sign_in_once_approved"}}

{{/* The same page whether or not the address already had an account, so it says what to do in either case without saying which this was. */}}

{{th "signup.already_had"}}

{{else}} {{if .Error}}

{{.Error}}

{{end}}

{{t "signup.password_rule" .MinPassword}}

{{th "signup.have_account"}}

{{end}}
{{end}} {{define "login"}} {{t "login.title"}}

{{t "login.heading"}}

{{if .Error}}

{{.Error}}

{{end}}
{{if .SSO}}

{{t "login.with_sso" .SSO}}

{{end}} {{if .Forgot}}

{{t "login.forgot"}}

{{end}} {{if .SignupOpen}}

{{th "login.no_account"}}

{{end}}
{{end}} {{define "profile"}} {{t "profile.title"}}

{{t "profile.heading"}}

{{.User.Email}}{{if ne .User.Name .User.Email}} ({{.User.Name}}){{end}}

{{template "nav" .Nav}}
{{if .Error}}

{{.Error}}

{{end}} {{if .NewKey}}

{{t "profile.new_key"}}

{{t "profile.shown_once"}}

{{.NewKey}}

{{t "profile.store_it"}}

curl {{.BaseURL}}/v1/chat/completions \
  -H "Authorization: Bearer {{.NewKey}}" \
  -H "Content-Type: application/json" \
  -d '{"model": "{{.ExampleModel}}", "messages": [{"role":"user","content":"hello"}]}'
{{end}} {{with .Connect}}

{{t "connect.ready" .ToolName}}

{{th "connect.shown_once"}}

{{if .Command}}

{{t "connect.one_command"}}

{{if eq .Tool "codex"}}{{t "connect.command_note_codex"}}{{else}}{{t "connect.command_note"}}{{end}}

{{.Command}}
{{end}} {{range .Files}}

{{th "connect.by_hand" .Path}}

{{.Body}}
{{end}} {{if .Fields}}

{{t "connect.fields"}}

{{range .Fields}} {{end}}
{{.Label}}{{.Value}}
{{end}}

{{t "connect.then"}}

{{if eq .Tool "codex"}}{{.Run}}{{else}}{{.Run}}{{end}}

{{range .Notes}}

{{.}}

{{end}}
{{end}}

{{t "connect.heading"}}

{{t "connect.intro"}}

{{th "connect.own_code"}}

{{if .Contexts}}{{end}}

{{t "profile.create_key"}}

{{if .Contexts}} {{else}}

{{t "profile.no_project"}}

{{end}}

{{t "profile.keys"}}

{{if .Keys}} {{range .Keys}}{{end}}
{{t "profile.col.name"}}{{t "profile.col.key"}}{{t "profile.col.spends_against"}}{{t "profile.col.created"}}{{t "profile.col.last_used"}}{{t "profile.col.state"}}
{{.Name}} {{.Prefix}} {{if .ProjectID}}{{or (index $.Where .ProjectID) (t "profile.left_project")}}{{else}}{{t "profile.personal"}}{{end}} {{date .CreatedAt}} {{ago .LastUsedAt}} {{t (print "profile.state." (state .))}} {{if eq (state .) "active"}}
{{end}}

{{t "profile.revoke_note"}}

{{else}}

{{t "profile.no_keys"}}

{{end}}

{{t "profile.where"}}

{{if .Memberships}}

{{range $i, $m := .Memberships}}{{if $i}} ยท {{end}}{{$m.Path}} {{t (print "profile.scope." $m.Scope)}}{{end}}

{{else}}

{{t "profile.no_memberships"}}

{{end}}

{{t "selfuse.heading"}}

{{with .Own}}
{{compact .Requests}}
{{t "selfuse.requests_30d"}}
{{compact .Tokens}}
{{t "selfuse.tokens_30d"}}
{{.Spend}}
{{t "selfuse.spend_30d"}}
{{with .Chart}}

{{t "selfuse.tokens_per_day"}}

{{.}}
{{end}} {{end}} {{range .LimitsBy}}

{{.Label}}{{with .Use}} {{t "selfuse.place_use" (compact .Requests) (compact .Tokens)}}{{end}}

{{range .Budgets}}
{{.Label}}{{th "selfuse.budget_of" .Used .Budget .Period}}
{{end}} {{if .Rows}} {{range .Rows}}{{end}}
{{t "selfuse.col.limit"}}{{t "selfuse.col.value"}}
{{.Name}}{{.Value}}
{{else}}

{{t "selfuse.no_limits"}}

{{end}} {{else}}

{{t "selfuse.nowhere"}}

{{end}}

{{t "selfuse.strictest"}}

{{t "profile.password"}}

{{if .PasswordChanged}}

{{t "profile.password_changed"}}

{{end}} {{if .PasswordError}}

{{.PasswordError}}

{{end}}

{{t "profile.password_note"}}

{{end}} {{define "forgot"}} {{t "forgot.title"}}

{{t "forgot.heading"}}

{{if .Error}}

{{.Error}}

{{end}} {{if .Sent}}

{{t "forgot.sent"}}

{{t "login.submit"}}

{{else if .NoMail}}

{{th "forgot.no_mail"}}

{{else}}

{{t "forgot.sub"}}

{{end}}
{{end}} {{define "reset"}} {{t "reset.title"}}

{{t "reset.heading"}}

{{if .Error}}

{{.Error}}

{{end}} {{if .Done}}

{{t "reset.done"}}

{{t "login.submit"}}

{{else if .Bad}}

{{t "reset.bad"}}

{{t "forgot.heading"}}

{{else}}

{{t "signup.password_rule" .MinPassword}}

{{end}}
{{end}}