Wizard-Texte, Admin-Onboarding ueberspringen, kompakte Set-Zeile mobil
Image bauen und in die Registry schieben / build (push) Successful in 6s
Image bauen und in die Registry schieben / build (push) Successful in 6s
- Wizard: Sprach-Hinweis gekuerzt, Repo-Link nur beim Erst-Setup (nicht im Onboarding), Hinweis 'erster Benutzer wird Administrator' - Erster Benutzer (Admin) ist automatisch onboarded und erbt die festgelegten Sprache/Design-Einstellungen (kein erneuter Wizard); Einstellungen werden nach Admin-Anlage sofort frisch gerendert - Set-Zeile mobil-tauglich: nowrap, width 100%, kg/reps-Inputs flexibel (flex 1, min-width 0), Einheit kompakt im Feld, 'S1' statt 'Set 1', Reset als SVG-Icon, kleinere Buttons - kein horizontales Scrollen - Tests: 169 Checks gruen (39+18+52+32+28)
This commit is contained in:
1 parent
135425c781
commit
6d57200032
5 files changed
+88
-53
No files matched your search
@@ -158,8 +158,9 @@ const LANG = {
|
||||
prev_week: "Vorige Woche", next_week: "Nächste Woche", week_of: "Woche vom",
|
||||
wizard_done: "Alles erledigt - die App ist bereit.",
|
||||
wizard_user_created: "Benutzer '{u}' angelegt.",
|
||||
wizard_lang_hint: "Bereit loszulegen? Anleitung, Demo-Daten und der Übungsplan stehen im Repo:",
|
||||
wizard_user_later: "Der Benutzer wird beim Abschließen angelegt - du kannst dich im Wizard bis dahin umentscheiden.",
|
||||
wizard_lang_hint: "Anleitung, Demo-Daten und der Übungsplan stehen im Repo.",
|
||||
wizard_user_later: "Der Benutzer wird beim Abschließen angelegt - bis dahin kannst du dich umentscheiden.",
|
||||
wizard_admin_hint: "Der erste Benutzer wird Administrator (verwaltet Konten und Kennwörter).",
|
||||
logged_in: "Angemeldet.", user_created_toast: "Benutzer angelegt.",
|
||||
app_load_fail: "App konnte nicht geladen werden: {m}",
|
||||
},
|
||||
@@ -275,8 +276,9 @@ const LANG = {
|
||||
prev_week: "Previous week", next_week: "Next week", week_of: "Week of",
|
||||
wizard_done: "All done - the app is ready.",
|
||||
wizard_user_created: "User '{u}' created.",
|
||||
wizard_lang_hint: "Ready to get started? The guide, demo data and the exercise plan are in the repo:",
|
||||
wizard_lang_hint: "Guide, demo data and the exercise plan live in the repo.",
|
||||
wizard_user_later: "The user will be created when you finish - you can still change your mind until then.",
|
||||
wizard_admin_hint: "The first user becomes the administrator (manages accounts and passwords).",
|
||||
logged_in: "Logged in.", user_created_toast: "User created.",
|
||||
app_load_fail: "Could not load the app: {m}",
|
||||
},
|
||||
@@ -908,7 +910,7 @@ function buildSetRow(a, model, ex, entry, i) {
|
||||
chk.type = "button";
|
||||
chk.setAttribute("aria-pressed", entry.done ? "true" : "false");
|
||||
chk.setAttribute("aria-label", t("set_done_aria", { n: i + 1 }));
|
||||
chk.appendChild(el("span", "set-check-label", "Set"));
|
||||
chk.appendChild(el("span", "set-check-label", "S"));
|
||||
chk.appendChild(el("span", "set-check-num", String(i + 1)));
|
||||
chk.appendChild(el("span", "set-check-box", entry.done ? "✓" : ""));
|
||||
chk.addEventListener("click", () => toggleSetDone(a, model, ex.key, i, chk));
|
||||
@@ -930,7 +932,7 @@ function buildSetRow(a, model, ex, entry, i) {
|
||||
entry.wInput = wBox.querySelector("input");
|
||||
entry.rInput = rBox.querySelector("input");
|
||||
|
||||
const reset = el("button", "btn btn-small", t("reset_set"));
|
||||
const reset = el("button", "icon-btn", resetSvg());
|
||||
reset.type = "button";
|
||||
reset.setAttribute("aria-label", t("reset_set_title"));
|
||||
reset.addEventListener("click", () => resetSet(a, model, ex.key, i, entry));
|
||||
@@ -945,6 +947,15 @@ function buildSetRow(a, model, ex, entry, i) {
|
||||
return row;
|
||||
}
|
||||
|
||||
function resetSvg() {
|
||||
const svg = el("span", "");
|
||||
svg.innerHTML = '<svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true">'
|
||||
+ '<circle cx="8" cy="8" r="5" stroke-dasharray="23.5 8" transform="rotate(-55 8 8)"/>'
|
||||
+ '<path d="M10.6 5.3 l2.4 -1.7 l0.7 3.4 l-2.4 -1.7 Z" fill="currentColor"/>'
|
||||
+ '</svg>';
|
||||
return svg;
|
||||
}
|
||||
|
||||
function makeFieldBox(label, unit, value, onChange, inputmode) {
|
||||
const box = el("label", "field-box");
|
||||
box.setAttribute("aria-label", label + " in " + unit);
|
||||
@@ -1754,12 +1765,14 @@ function renderWizardStep() {
|
||||
row.appendChild(b);
|
||||
}
|
||||
body.appendChild(row);
|
||||
body.appendChild(el("p", "auth-sub", t("wizard_lang_hint")));
|
||||
const repo = el("a", "btn", "git.somantis.net/J4stMarkus/trainingsplan");
|
||||
repo.href = "https://git.somantis.net/J4stMarkus/trainingsplan";
|
||||
repo.target = "_blank";
|
||||
repo.rel = "noopener";
|
||||
body.appendChild(repo);
|
||||
if (wizard.mode === "setup") {
|
||||
body.appendChild(el("p", "auth-sub", t("wizard_lang_hint")));
|
||||
const repo = el("a", "btn", "git.somantis.net/J4stMarkus/trainingsplan");
|
||||
repo.href = "https://git.somantis.net/J4stMarkus/trainingsplan";
|
||||
repo.target = "_blank";
|
||||
repo.rel = "noopener";
|
||||
body.appendChild(repo);
|
||||
}
|
||||
} else if (wizard.step === 1) {
|
||||
// Schritt 1: Darstellung (Theme + OLED + Akzent)
|
||||
body.appendChild(el("h3", "wizard-title", t("appearance")));
|
||||
@@ -1816,6 +1829,7 @@ function renderWizardStep() {
|
||||
form.appendChild(authField(t("username"), "setup-user"));
|
||||
form.appendChild(authField(t("password"), "setup-pass"));
|
||||
form.appendChild(el("div", "auth-register", t("wizard_user_later")));
|
||||
form.appendChild(el("div", "auth-register", t("wizard_admin_hint")));
|
||||
form.addEventListener("submit", ev => ev.preventDefault());
|
||||
body.appendChild(form);
|
||||
// Felder in wizard-Zustand schreiben; Finish live aktivieren
|
||||
@@ -2200,6 +2214,10 @@ add.addEventListener("click", async () => {
|
||||
localStorage.setItem("tp_token", r.token);
|
||||
toast(t("user_created", { u: r.username }), "ok");
|
||||
await afterAuth();
|
||||
// Einstellungen frisch rendern, falls gerade geoeffnet
|
||||
if ($("#view-settings").classList.contains("is-active")) {
|
||||
renderSettingsView();
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.status === 403) {
|
||||
toast(eMsg(e), "error");
|
||||
|
||||
Reference in new issue
Block a user