Add per-sport location settings and clarify recovery groups
This commit is contained in:
@@ -826,6 +826,12 @@ button {
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.sport-choice__card small {
|
||||
color: var(--muted);
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.sport-choice input:checked + .sport-choice__card {
|
||||
border-color: rgba(139, 228, 255, 0.44);
|
||||
background: linear-gradient(180deg, rgba(96, 184, 255, 0.18), rgba(255, 255, 255, 0.08));
|
||||
@@ -1002,6 +1008,12 @@ input[type="range"] {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.section-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 0.95rem;
|
||||
}
|
||||
|
||||
.primary-button,
|
||||
.ghost-button,
|
||||
.button-link {
|
||||
|
||||
+11
-1
@@ -763,11 +763,16 @@
|
||||
const syncPreview = row => {
|
||||
const labelInput = row.querySelector('input[data-name-template$="[label]"]');
|
||||
const iconSelect = row.querySelector('select[data-name-template$="[icon]"]');
|
||||
const locationSelect = row.querySelector('select[data-name-template$="[location]"]');
|
||||
const previewText = row.querySelector(".sport-pill span:last-child");
|
||||
const previewImage = row.querySelector(".sport-pill img");
|
||||
|
||||
if (previewText) {
|
||||
previewText.textContent = (labelInput && labelInput.value.trim()) || "Neue Sportart";
|
||||
const label = (labelInput && labelInput.value.trim()) || "Neue Sportart";
|
||||
const location = locationSelect && locationSelect.value
|
||||
? locationSelect.options[locationSelect.selectedIndex]?.textContent || ""
|
||||
: "";
|
||||
previewText.textContent = location ? `${label} · ${location}` : label;
|
||||
}
|
||||
|
||||
if (previewImage && iconSelect) {
|
||||
@@ -808,6 +813,7 @@
|
||||
const idInput = row.querySelector('input[data-name-template$="[id]"]');
|
||||
const labelInput = row.querySelector('input[data-name-template$="[label]"]');
|
||||
const iconSelect = row.querySelector('select[data-name-template$="[icon]"]');
|
||||
const locationSelect = row.querySelector('select[data-name-template$="[location]"]');
|
||||
const groupInput = row.querySelector('input[data-name-template$="[recovery_group]"]');
|
||||
const bonusInput = row.querySelector('input[data-name-template$="[bonus_points]"]');
|
||||
const consecutiveInput = row.querySelector('input[data-name-template$="[allow_consecutive]"]');
|
||||
@@ -821,6 +827,9 @@
|
||||
if (iconSelect) {
|
||||
iconSelect.value = values.icon || "run";
|
||||
}
|
||||
if (locationSelect) {
|
||||
locationSelect.value = values.location || "";
|
||||
}
|
||||
if (groupInput) {
|
||||
groupInput.value = values.recovery_group || "";
|
||||
}
|
||||
@@ -845,6 +854,7 @@
|
||||
id: button.dataset.id || "",
|
||||
label: button.dataset.label || "",
|
||||
icon: button.dataset.icon || "run",
|
||||
location: button.dataset.location || "",
|
||||
recovery_group: button.dataset.recoveryGroup || "",
|
||||
bonus_points: button.dataset.bonusPoints || "2",
|
||||
allow_consecutive: button.dataset.allowConsecutive === "1",
|
||||
|
||||
Reference in New Issue
Block a user