Commit Graph

142 Commits

Author SHA1 Message Date
Olof Hedman
5696e1f950 Merge branch 'main' into ios-google-signin 2025-09-20 16:02:19 +02:00
e0240f44b5 Move ImageViewerDialog to CommonDialogsShell; use existing UI shells from app.klottr.ui
Remove unused local FornsokDialog/DmDialog/fetchBitmapFromUrl duplicates from MainActivity
2025-09-20 01:34:08 +02:00
21c05cfad4 Use shared NearbyBundle for Nearby results; replace Triple in Android 2025-09-20 01:06:16 +02:00
2bfec2d737 Split dialog shells into ui/; move image fetchers to app.net; use shared LastLocationStore; clean imports
- Move Nearby/Username/About shells to app.klottr.ui.CommonDialogsShell
- Move Wiki/Fornsok/DM shells to app.klottr.ui.DetailDialogsShell
- Extract fetchWikiThumbBitmap to app.klottr.net.WikiThumb
- Add app.klottr.net.HttpImage (fetchBitmapFromUrl) and use it from DM dialog
- Switch detail dialogs to LastLocationStore.lastKnown (GeoPoint) from shared API
- Remove unused imports from MainActivity
2025-09-20 00:18:24 +02:00
8580ff198c Remove unused declarations; fix KMP expect/actual and SettingsStore duplicates
- Safe-delete unused declarations across app/ and shared/
- Optimize imports
- KMP: align expect/actual for formatRelativeOrTime(ms: Long) and update callers
- SettingsStore: remove duplicate wrapper functions causing overloads
2025-09-19 14:40:54 +02:00
f73e11078b Share open models: move OpenKlotter/OpenWiki/OpenFornsok to :shared and update Android imports 2025-09-19 13:27:19 +02:00
8e7d7315b0 Rename Android root composable to KlottrAppShell to reflect shared-driven UI 2025-09-19 13:06:25 +02:00
5b9f18f405 Share Username dialog body; make BasicTextField cursor visible in dark mode
- New: shared/ui/UsernameDialogContent.kt (material-free)
- Android: use UsernameDialogContent for title/message/input; keep platform buttons
- Fix: pass cursorColor (Material color) to shared content so caret is visible in dark theme
2025-09-19 12:57:39 +02:00
cc07e892ec Share Nearby dialog container and fix night-mode text in detail dialogs
- New: shared/ui/NearbyDialogContent.kt (material-free container for dialog body)
- Android: use NearbyDialogContent in NearbyDialog; keep AlertDialog shell only
- Fix: pass MaterialTheme colors to Wiki/Fornsok/DM detail contents (title/body/caption) so text follows light/dark mode
2025-09-19 00:02:53 +02:00
793419893a Share login-required content; use shared composable in Android dialog 2025-09-18 23:29:19 +02:00
9da472fd2d Share About content: add material-free KlottrAboutContent; use it inside Android AlertDialog 2025-09-18 23:18:05 +02:00
32afeb5a31 Simplify Nearby flow: store results as Triple and feed dialog directly; remove unused Android lists 2025-09-18 23:02:03 +02:00
a9b6d18611 Share home UI: add material-free KlottrHomeContent and use it from Android
- New: shared/ui/KlottrHomeContent.kt (material-free; header/footer slots)
- Android: replace Scaffold body Column with KlottrHomeContent(); keep AppBar and dialog shells
- Fix: add dp import in shared; use weight(1f) for center area so Login/Logout footer stays visible
- No behavior change; prepares moving root towards :shared
2025-09-18 22:32:43 +02:00
f0d9f8ef2e Rely on shared FoundContent for empty state; simplify MainActivity 2025-09-18 21:17:51 +02:00
ee440e3ffb Share DM/Wiki/Fornsok detail UI (material-free); Android keeps only dialog shells 2025-09-18 20:00:11 +02:00
eb23694091 Detail access via shared rule: integrate decideDetailAccess in KlotterDialog and fix blockedText nullability 2025-09-18 18:48:13 +02:00
722763fccb Detail formatting to shared: use buildFoundDetailStrings in KlotterDialog (millis→strings via commonMain) 2025-09-18 16:45:59 +02:00
cf049bade1 Shared detail UX: make image clickable in FoundDetailContent (use onImageClick via Modifier.clickable) 2025-09-18 16:17:05 +02:00
061beaaa84 Move detail body to shared CMP: add FoundDetailContent and integrate in MainActivity (preserve image click, keep Android actions) 2025-09-18 16:08:20 +02:00
fbae61eb16 Move unit formatting to :shared: add expect/actual formatRelativeOrTime, port formatCoords/formatDistance to commonMain (JVM-free), remove app UnitFormat + TimeFormat files, update SettingsContent to use shared formatter 2025-09-18 14:48:57 +02:00
fd1afcbb55 Logging cleanup: delete AppLog.kt and enable KLog via BuildConfig in MainActivity 2025-09-18 14:12:15 +02:00
8c9bf5f5f5 Replace AppLog with shared KLog across app module


2025-09-18 13:04:13 +02:00
42c1f6311d Cleanup Nearby: remove legacy states/imports and avoid entries shadowing in NearbyDialog 2025-09-18 12:43:42 +02:00
Olof Hedman
14e94bfc8e Correct initialisation of UIKit scene and fix for forced compatibility mode 2025-09-17 14:22:52 +02:00
Olof Hedman
9e367105bb Renamed Google Auth implementation for iOS 2025-09-17 14:21:17 +02:00
Olof Hedman
ce2c96daa7 Increase java heap for gradle (got oom when compiling xcframework) 2025-09-16 16:44:37 +02:00
Olof Hedman
2eed4d56ac Main UI in Shared (KlottrRoot.kt) that also work on iOS 2025-09-16 16:33:52 +02:00
Olof Hedman
d0046646fc Manual Info.plist with app id:s for google signin 2025-09-16 13:41:02 +02:00
Olof Hedman
a57580a96f Build shared framework as static to easily work on device 2025-09-16 13:39:47 +02:00
Olof Hedman
3b000f9b2d Change bundle id to app.klottr 2025-09-16 13:39:12 +02:00
Olof Hedman
ba93d0ad9d Use kotlin platform independent time instead of jvm System 2025-09-16 13:38:36 +02:00
Olof Hedman
e1832c7744 Implement LastLocationStore for ios 2025-09-16 13:37:49 +02:00
Olof Hedman
f691f48093 Merge branch 'main' into ios-google-signin 2025-09-16 13:37:15 +02:00
2ff8349c1d app(nearby): move markNewFinds to fetch phase; simplify NearbyDialog to render built entries; drop wiki/klotter/radius params from dialog and call site 2025-09-16 00:26:56 +02:00
c54833dfe2 shared(nearby): add getNearbyBundle use-case (fetch+build); app(nearby): store built entries state, pass entries to NearbyDialog, remove in-dialog build 2025-09-16 00:09:45 +02:00
4119f4165e shared(nearby): apply toggle+radius filtering in KMP builder; app(nearby): pass toggles to builder and dialog
- shared: buildNearbyEntries(...) now accepts showKlotter/showWiki/showDm/showFornsok and
  filters by per-layer radii (Wiki/DM/Fornsok) while keeping Klotter visible outside 20 m
  (label falls back to “Okänt klotter”). Sorting by distance remains.
- app: NearbyDialog signature includes toggles and forwards them to the shared builder.
- app: call site updated to pass toggles; behavior unified across platforms.
- No Material dependencies added; Android build stays green.
2025-09-15 23:25:30 +02:00
2d5312ab57 shared(ui/nearby): unify open handling via FoundOpenAction; app(nearby): map single onOpenAction in NearbyDialog; drop per-layer callbacks
- shared: NearbyContent replaces onWikiClick/onDmClick/onFornsokClick/onKlotterClick
  with a single onOpenAction (material-free; keeps TextStyle injection).
- shared: route clicks through resolveNearbyOpenAction(e, dm, forn) and emit FoundOpenAction.
- app: NearbyDialog updated to pass onOpenAction and map FoundOpenAction to
  openKlotter/openWiki/openFornsok/openDm.
- app/shared: remove obsolete per-layer callback wiring; clean up unused params/imports.
- No behavioral change; Android stays green.
2025-09-15 22:10:43 +02:00
851b03a97f feat: instant found refresh, silent self-notes, better write flow
Found list updates live (KvPrefs listener + broadcasts) — no rotation needed.

Auto-mark newly created notes as “found” and auto-scroll list to top.

Suppress notification for the just-created note (TTL), keep others unchanged.

Write dialog: BasicTextField plumbing with visible cursor (dark mode), full-area focus, proper placeholders.

Offline w/ image: persist file, queue OutboxWorker, idempotent retries.
2025-09-15 17:44:12 +02:00
7085e42b17 shared(ui): add WriteDocContent; app(write): integrate and fix focus/placeholder/cursor; outbox: persist image using captured URI 2025-09-15 00:46:00 +02:00
9deca99711 app(write): on UploadFailed, queue to outbox via shared use case; persist image locally and schedule upload worker 2025-09-14 23:23:04 +02:00
c65f230665 shared(location): add expect/actual LastLocationStore (GeoPoint)
app(util): adapt LastLocationStore to delegate to shared store while keeping android.location.Location API
2025-09-14 23:01:00 +02:00
ac451816e0 shared(nearby): add AutoScan (scanAndMarkFound + ScanConfig) with parallel fetch & DI
app(main): replace three autoscan effects with one using shared AutoScan; refresh Found on new items
app(settings): after “Clear all finds”, run immediate local rescan via shared AutoScan and repopulate UI
2025-09-14 22:47:52 +02:00
4c87ef9490 shared(nearby): parallelize fetchNearbyData with structured concurrency (async) while keeping DI and API unchanged 2025-09-14 22:08:43 +02:00
41270dacac shared(ui): refine SettingsContent (custom switches, highlighted dropdowns, compact day/night chips; red danger button) and integrate in Android SettingsDialog 2025-09-14 22:05:46 +02:00
80981284cd shared(create): add createNoteFlow use case (upload→create orchestration) with CreateNoteOutcome
app(main): use createNoteFlow in WriteDocDialog onSave; keep offline outbox path unchanged
2025-09-14 19:42:39 +02:00
dac05a23d4 shared(location): move AndroidLocationProvider to shared/androidMain; add play-services-location and coroutines-play-services deps; add iOS stub
app(main): update imports and keep using centralized provider for startup, auto-scans, and “Nearby” flow
2025-09-14 19:33:00 +02:00
5eb96a0ff1 KMP/location + UI: centralize location lookups and use shared panel shell in NearbyDialog
shared(commonMain): add location/LocationProvider (GeoPoint + interface).
app(location): add AndroidLocationProvider using FusedLocationProviderClient.
app(MainActivity): replace ad-hoc location calls with provider in startup, auto-scans (Wiki/DM/Fornsok), and “Nearby” button; persist lastKnownLat/Lon.
app(ui): use MapPanelShell inside NearbyDialog and set sensible max height (~80% of screen).
app(found): fix fetchNearbyData call to use gp.lat/gp.lon.
2025-09-14 18:20:38 +02:00
4e2d062329 KMP/UI: shared scrollbars, common “Nearby” open resolver, and map panel shell — wired into app
shared(ui): FoundList fills its space and adds a lightweight, material-free scrollbar thumb; expose optional LazyListState.
shared(ui): Harden FoundList scrollbar math (non-negative weights, safe totals) and use Color.takeOrElse for color fallback to avoid startup crash.
shared(ui): NearbyList fills its space and adds the same lightweight scrollbar; optional LazyListState support.

shared(nearby): Add resolveNearbyOpenAction for Nearby entries; map to FoundOpenAction (Klotter/Wiki/Fornsok/DM); fix import placement and remove unused import.
shared(ui): NearbyContent now fills its space (remove 420dp height cap) and delegates onEntryClick to resolveNearbyOpenAction.

shared(ui): Add material-free MapPanelShell to host title/main/footers above map and reuse across platforms.

app(ui): Use MapPanelShell for the main “Senaste” panel in KlottrApp — move header, FoundContent area, and login/logout row into the shared shell; main area is full-height.
app(ui): Use MapPanelShell inside NearbyDialog and set a sensible max height (~80% of screen) so content is clearly scrollable; keep AlertDialog title/buttons.
2025-09-14 17:55:43 +02:00
dae2513b7c shared(ui): NearbyList fills its space and adds a lightweight, material-free scrollbar thumb; optional LazyListState support
shared(nearby,ui): add resolveNearbyOpenAction for “Nearby” entries and remove 420dp height cap — NearbyContent now fills its space and uses the shared open resolver
2025-09-14 17:25:50 +02:00
a8e13c9556 shared(ui): FoundList fills space and adds a lightweight, material-free scrollbar thumb; exposes optional LazyListState
shared(ui): use Color.takeOrElse for scrollbar color fallback; remove dependency on isSpecified
shared(ui): harden FoundList scrollbar math (non-negative weights, safe totals); prevent startup crash on edge cases
2025-09-14 00:03:48 +02:00