mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add a GET /api/config endpoint exposing the front-end-facing backend
configuration (currently the notification delivery method, grouped under
a nested "notifications" object so the shape can grow). The settings
screen fetches it on init and only shows the per-device push toggle when
the backend method is "push" (and the platform supports push, which keeps
it off the browser).
Also fold in related push-notifications cleanups: fix the Android app
label ("frontend" -> "OOTT") so the notification permission dialog reads
correctly, remove the completed push_notifications.md plan, and update
TODO.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
10 lines
442 B
Dart
10 lines
442 B
Dart
part of '../oott_api.dart';
|
|
|
|
/// Front-end configuration endpoint: the subset of backend settings the UI needs
|
|
/// to adapt itself (currently the notification delivery method).
|
|
extension ConfigApi on BackendAPI {
|
|
/// Fetches the backend's UI-facing configuration. Used by the settings screen
|
|
/// to show push controls only when the backend delivers via push.
|
|
Future<AppConfig> getConfig() => _getModel('/config', AppConfig.fromJson);
|
|
}
|