Files
BountyBoard/web/templates/profile.html
T
etalon e8beb7d4f3 feat: sidebar nav (default), group member management, per-customer ticketing identity mapping
- Navigation: new per-user setting (default "side") renders the page links as a
  left sidebar while keeping theme/bell/avatar/logout in the top-right; falls
  back to a top bar under 760px or when set to "top". Profile selector added.
- Group conversations: record a creatorId; the creator gets a "Manage members"
  button to add/remove participants (new GET/POST/DELETE members endpoints,
  creator-only). Existing groups backfilled.
- Customer ticketing: admin can map each assigned consultant to their username
  in that customer's ticketing system. Per-customer mapping takes precedence
  over the consultant's global ticketingIdentities during sync.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 11:05:33 +02:00

90 lines
3.3 KiB
HTML

{{define "content"}}
<h1>Your profile</h1>
<div class="error-box" id="error" role="alert"></div>
<div class="ok-box" id="ok" role="status"></div>
<div class="card">
<h2>Avatar</h2>
<div class="spread">
<span id="avatar-preview">
{{if .User.AvatarFileID}}
<img class="avatar large" src="/files/{{.User.AvatarFileID}}" alt="Current avatar">
{{else}}
<span class="avatar large" aria-hidden="true">{{initials .User.Name}}</span>
{{end}}
</span>
<div>
<label for="avatar-file">Upload new avatar (image)</label>
<input type="file" id="avatar-file" accept="image/*">
</div>
</div>
</div>
<form id="profile-form" class="card" data-version="{{.User.Version}}">
<h2>Basics</h2>
<div class="field">
<label for="p-name">Name</label>
<input type="text" id="p-name" value="{{.User.Name}}" required>
</div>
<div class="field">
<label for="p-bio">Bio</label>
<textarea id="p-bio">{{.User.Bio}}</textarea>
</div>
<h2>Contact</h2>
<div class="row">
<div class="field">
<label for="p-phone">Phone</label>
<input type="text" id="p-phone" value="{{.User.Contact.Phone}}" autocomplete="tel">
</div>
<div class="field">
<label for="p-location">Location</label>
<input type="text" id="p-location" value="{{.User.Contact.Location}}">
</div>
</div>
<div class="field">
<label for="p-links">Links (one per line)</label>
<textarea id="p-links">{{range .User.Contact.Links}}{{.}}
{{end}}</textarea>
</div>
<h2>Additional fields</h2>
<p class="hint">Arbitrary key/value details shown on your profile card.</p>
<div id="extra-rows"></div>
<button class="btn small" type="button" id="extra-add">+ Add field</button>
<h2 class="mt">Appearance</h2>
<div class="field">
<label for="p-theme">Theme</label>
<select id="p-theme">
<option value="light" {{if eq .User.Settings.Theme "light"}}selected{{end}}>Light (Y2K paper)</option>
<option value="dark" {{if eq .User.Settings.Theme "dark"}}selected{{end}}>Dark (Y2K ink)</option>
<option value="neon" {{if eq .User.Settings.Theme "neon"}}selected{{end}}>Neon (cyber gradient)</option>
<option value="terminal" {{if eq .User.Settings.Theme "terminal"}}selected{{end}}>Terminal (green CRT)</option>
<option value="blueprint" {{if eq .User.Settings.Theme "blueprint"}}selected{{end}}>Blueprint (graph paper)</option>
<option value="sunset" {{if eq .User.Settings.Theme "sunset"}}selected{{end}}>Sunset (vaporwave)</option>
</select>
</div>
<div class="field">
<label for="p-nav">Navigation</label>
<select id="p-nav">
<option value="side" {{if ne .User.Settings.NavLayout "top"}}selected{{end}}>Sidebar (left)</option>
<option value="top" {{if eq .User.Settings.NavLayout "top"}}selected{{end}}>Top bar</option>
</select>
</div>
<button class="btn primary" type="submit">Save profile</button>
</form>
<div class="card">
<h2>Security</h2>
{{if .HasLocalAuth}}
<p><a class="btn" href="/change-password">Change password</a></p>
{{else}}
<p class="muted">This account signs in via SSO and has no local password.</p>
{{end}}
<p><button class="btn danger" type="button" id="logout-all">Log out everywhere</button></p>
<p class="hint">Revokes every active session for your account, including this one.</p>
</div>
{{end}}