tablet error screen can recover from a stale bar_id; admin drink reorder gets a non-drag fallback
- App.tsx: the error screen (shown when api.config(barId) fails, e.g. an admin deleted/renamed the bar while this tablet was offline) only offered 'Neu laden', which re-reads the same stale localStorage bar_id and fails again — a permanent stuck loop with no in-app fix. Added a 'Bar wechseln' button reusing the existing changeBar() logic, which now also clears the error state. - Admin.tsx BarDrinkEditor: the drag-and-drop reorder is a mouse-oriented API that doesn't fire on touch-only input and has no keyboard equivalent. Added ▲/▼ buttons alongside the drag handle so reordering works regardless of input method.
This commit is contained in:
parent
59f6041a16
commit
058c77524a
3 changed files with 30 additions and 1 deletions
|
|
@ -322,6 +322,19 @@ function BarDrinkEditor({
|
|||
>
|
||||
<span class="grip" aria-hidden="true">⋮⋮</span>
|
||||
<span class="dnd-name">{idx + 1}. {d.name}</span>
|
||||
{/* Drag-and-drop above doesn't fire on touch-only input (no
|
||||
mouse) and has no keyboard equivalent — these buttons are
|
||||
the fallback that works regardless of input method. */}
|
||||
<button onClick={() => reorder(idx, idx - 1)} disabled={idx === 0} aria-label="nach oben">
|
||||
▲
|
||||
</button>
|
||||
<button
|
||||
onClick={() => reorder(idx, idx + 1)}
|
||||
disabled={idx === selected.length - 1}
|
||||
aria-label="nach unten"
|
||||
>
|
||||
▼
|
||||
</button>
|
||||
<button onClick={() => remove(idx)}>×</button>
|
||||
</li>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue