2026-05-30 15:42:35 +03:00
|
|
|
{{define "account.html"}}{{template "base" .}}{{end}}
|
|
|
|
|
|
|
|
|
|
{{define "content"}}
|
2026-05-30 17:23:20 +03:00
|
|
|
<section class="app-shell" aria-labelledby="account-title">
|
|
|
|
|
<aside class="app-sidebar">
|
2026-05-30 18:17:13 +03:00
|
|
|
<nav class="sidebar-nav">
|
feat(admin): redesign storage backend management UI
Implement a new card-based UI for managing storage backends in the admin panel. This update improves the visual presentation and usability of the storage configuration page.
Key changes:
- Added comprehensive CSS styles for storage cards, including status indicators, metadata layouts, and action buttons.
- Updated the storage admin template to render storage configurations as cards with type-specific details (Local, S3, SFTP, SMB, WebDAV).
- Integrated inline actions for testing, editing, disabling, and deleting storage backends.
- Enhanced sidebar link alignment with flexbox.
2026-05-31 04:54:27 +03:00
|
|
|
<a class="sidebar-link" href="/app">{{template "icon-home-simple" .}}<span>My Files</span></a>
|
|
|
|
|
<a class="sidebar-link is-active" href="/account/settings">{{template "icon-user-circle" .}}<span>Account</span></a>
|
|
|
|
|
{{if eq .Data.Role "admin"}}<a class="sidebar-link" href="/admin">{{template "icon-dashboard" .}}<span>Admin panel</span></a>{{end}}
|
2026-05-30 18:17:13 +03:00
|
|
|
</nav>
|
|
|
|
|
<hr class="sidebar-sep">
|
2026-05-30 17:23:20 +03:00
|
|
|
<form class="sidebar-logout" action="/logout" method="post">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
feat(admin): redesign storage backend management UI
Implement a new card-based UI for managing storage backends in the admin panel. This update improves the visual presentation and usability of the storage configuration page.
Key changes:
- Added comprehensive CSS styles for storage cards, including status indicators, metadata layouts, and action buttons.
- Updated the storage admin template to render storage configurations as cards with type-specific details (Local, S3, SFTP, SMB, WebDAV).
- Integrated inline actions for testing, editing, disabling, and deleting storage backends.
- Enhanced sidebar link alignment with flexbox.
2026-05-31 04:54:27 +03:00
|
|
|
<button class="button button-outline" type="submit">{{template "icon-log-out" .}}<span>Sign out</span></button>
|
2026-05-30 17:23:20 +03:00
|
|
|
</form>
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
|
<div class="app-main">
|
|
|
|
|
<div class="admin-header">
|
|
|
|
|
<div>
|
|
|
|
|
<p class="kicker">Account</p>
|
|
|
|
|
<h1 id="account-title">Settings</h1>
|
|
|
|
|
<p class="muted-copy">{{.Data.Email}} · {{.Data.Role}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="settings-stack">
|
|
|
|
|
<div class="card settings-panel">
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="table-header">
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Password</h2>
|
|
|
|
|
<p>Update the password for your account.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<form class="settings-form settings-form-narrow" action="/account/password" method="post">
|
2026-05-31 02:14:10 +03:00
|
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
2026-05-30 17:23:20 +03:00
|
|
|
<label><span>Current password</span><input type="password" name="current_password" autocomplete="current-password" required></label>
|
|
|
|
|
<label><span>New password</span><input type="password" name="new_password" autocomplete="new-password" minlength="8" required></label>
|
|
|
|
|
<button class="button button-primary" type="submit">Update password</button>
|
|
|
|
|
</form>
|
|
|
|
|
<p class="muted-copy">Public forgot-password is deferred until SMTP support is added. Admins can generate reset links.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-31 12:50:13 +03:00
|
|
|
|
|
|
|
|
<div class="card settings-panel">
|
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="table-header">
|
|
|
|
|
<div>
|
|
|
|
|
<h2>Access tokens</h2>
|
|
|
|
|
<p>Personal tokens act as your account for the API and CLI. They never expire until you delete them.</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{{if .Data.Error}}<p class="form-error">{{.Data.Error}}</p>{{end}}
|
|
|
|
|
|
|
|
|
|
{{if .Data.NewToken}}
|
|
|
|
|
<div class="token-reveal">
|
|
|
|
|
<p class="token-reveal-title">Copy your new token now — it won't be shown again.</p>
|
|
|
|
|
<div class="token-reveal-row">
|
|
|
|
|
<code class="token-reveal-value" data-token-value>{{.Data.NewToken}}</code>
|
|
|
|
|
<button class="button button-outline button-sm" type="button" data-token-copy>Copy</button>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="muted-copy">Use it as a bearer token: <code>Authorization: Bearer {{.Data.NewToken}}</code></p>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
<form class="token-create-form" action="/account/tokens" method="post">
|
|
|
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
|
|
|
<label><span>Token name</span><input name="name" placeholder="e.g. CLI on laptop" maxlength="80" required></label>
|
|
|
|
|
<button class="button button-primary button-sm" type="submit">Generate token</button>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
{{if .Data.Tokens}}
|
|
|
|
|
<div class="admin-table-wrap">
|
|
|
|
|
<table class="admin-table">
|
|
|
|
|
<thead><tr><th>Name</th><th>Created</th><th>Last used</th><th></th></tr></thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{{range .Data.Tokens}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td>{{.Name}}</td>
|
|
|
|
|
<td>{{.CreatedAt}}</td>
|
|
|
|
|
<td>{{.LastUsedAt}}</td>
|
|
|
|
|
<td class="table-actions">
|
|
|
|
|
<form action="/account/tokens/{{.ID}}/delete" method="post" onsubmit="return confirm('Delete this token? Any client using it will stop working.');">
|
|
|
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
|
|
|
|
<button class="button button-danger button-sm" type="submit">Delete</button>
|
|
|
|
|
</form>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
{{else}}
|
|
|
|
|
<p class="muted-copy">No tokens yet. Generate one above to use the API or CLI.</p>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-30 15:42:35 +03:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
{{end}}
|