main
|
Last change
on this file since 07de464 was 24cdcc6, checked in by Robin Genis <roboburr@…>, 3 months ago |
|
setup: first-run wizard (language choice + site name) on /auth/register
A fresh install now shows a friendly wizard: choose your language (EN/NL/DE,
immediately set as the site default via default_lang), give your site a name,
and create your admin account. The site gets the klonkt brand colours. Only
shown when there are 0 users; existing installs unchanged. Tested on a fresh
DB (GET+POST).
Co-Authored-By: Claude <noreply@…>
|
-
Property mode
set to
100644
|
|
File size:
1.8 KB
|
| Line | |
|---|
| 1 | <div class="container auth-page">
|
|---|
| 2 | <h1><%= t('setup.title') %></h1>
|
|---|
| 3 | <p class="auth-intro"><%= t('setup.intro') %></p>
|
|---|
| 4 |
|
|---|
| 5 | <div class="setup-lang" style="display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 20px">
|
|---|
| 6 | <span style="opacity:.7;font-size:.9rem"><%= t('setup.lang_label') %>:</span>
|
|---|
| 7 | <% (typeof langs !== 'undefined' ? langs : []).forEach(function(L){ %>
|
|---|
| 8 | <a href="/lang/<%= L.code %>?r=/auth/register"
|
|---|
| 9 | style="padding:5px 13px;border-radius:8px;text-decoration:none;font-weight:600;font-size:.9rem;border:1px solid <%= L.active ? 'var(--accent)' : 'var(--rule, #2b3140)' %>;color:<%= L.active ? 'var(--accent)' : 'inherit' %>"><%= L.name %></a>
|
|---|
| 10 | <% }) %>
|
|---|
| 11 | </div>
|
|---|
| 12 |
|
|---|
| 13 | <% if (error) { %><div class="alert alert-error"><%= error %></div><% } %>
|
|---|
| 14 | <form method="post" action="/auth/register" class="auth-form">
|
|---|
| 15 | <% if (typeof next !== 'undefined' && next) { %>
|
|---|
| 16 | <input type="hidden" name="next" value="<%= next %>">
|
|---|
| 17 | <% } %>
|
|---|
| 18 | <label>
|
|---|
| 19 | <span><%= t('setup.f_sitename') %></span>
|
|---|
| 20 | <input type="text" name="siteName" value="<%= typeof siteName !== 'undefined' ? siteName : '' %>" required autofocus maxlength="80" placeholder="<%= t('setup.sitename_ph') %>">
|
|---|
| 21 | </label>
|
|---|
| 22 | <label>
|
|---|
| 23 | <span><%= t('auth.f_username') %></span>
|
|---|
| 24 | <input type="text" name="username" value="<%= username %>" required autocomplete="username" pattern="[a-zA-Z0-9_-]{3,32}">
|
|---|
| 25 | </label>
|
|---|
| 26 | <label>
|
|---|
| 27 | <span><%= t('auth.f_email') %></span>
|
|---|
| 28 | <input type="email" name="email" value="<%= email %>" required autocomplete="email">
|
|---|
| 29 | </label>
|
|---|
| 30 | <label>
|
|---|
| 31 | <span><%= t('auth.f_password') %></span>
|
|---|
| 32 | <input type="password" name="password" required minlength="8" autocomplete="new-password">
|
|---|
| 33 | </label>
|
|---|
| 34 | <button type="submit" class="btn btn-primary"><%= t('setup.submit') %></button>
|
|---|
| 35 | </form>
|
|---|
| 36 | </div>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.