Phase 3: event creation flow (GPS + success / error)

GpsService runs a single-shot position request with a hard timeout
and early-exit when Config.GPS_TARGET_ACCURACY_M is reached.
LoadingView renders a circular progress bar around the edge plus the
"Standort wird bestimmt" prompt; on callback it persists a new Event
via EventStore.add and transitions to SuccessView (green checkmark,
short vibration, auto-close) or ErrorView (red alert, 3× vibration,
German message, longer hold). TextUtils extracts the shared
multi-line centered text rendering so MenuView, LoadingView and
ErrorView all render wrapped German text consistently. Positioning
permission added to manifest.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
EiSiMo 2026-04-11 20:36:22 +02:00
parent d3494acc0d
commit 025d3007db
9 changed files with 332 additions and 17 deletions

View file

@ -82,14 +82,7 @@ class MenuView extends WatchUi.View {
var lines = _items[_selectedIndex][:lines] as Array<String>;
dc.setColor(Config.COLOR_FG, Config.COLOR_BG);
var font = Graphics.FONT_TINY;
var lineHeight = dc.getFontHeight(font);
var totalHeight = lines.size() * lineHeight;
var startY = cy - totalHeight / 2 + lineHeight / 2;
for (var j = 0; j < lines.size(); j++) {
dc.drawText(cx, startY + j * lineHeight, font, lines[j],
Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
}
TextUtils.drawCentered(dc, lines, cx, cy, Graphics.FONT_TINY);
}
// Scales a bitmap to the requested pixel size and draws it centered