mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add permanent device deletion and refine frontend UI/snackbars
Backend:
- Add db::devices::delete to erase a device and its events atomically
- Expose DELETE /api/devices/{mac}/permanently, wired to OpenAPI
- Cover the new db method and endpoint with tests
Frontend:
- Delete action for not-registered devices (detail screen + list row)
and an opt-in "permanently delete" checkbox in the Forget dialog
- Navigate to the devices list after deleting from the detail screen
- Refine button emphasis to M3: single filled primary, error-colored
text buttons for destructive actions, Test demoted to filled-tonal
- Flash the backend-config Test button red on a failed connection test
- Render snackbars through a top-level ScaffoldMessenger host so they
show above dialogs; keep the built-in SnackBar (with an Overlay host)
Docs:
- CLAUDE.md: rustfmt edition 2024, don't revert formatter-only changes,
prefer built-in Flutter components, follow existing patterns + M3
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2541d0989c
commit
587e097291
@@ -6,6 +6,7 @@ import 'package:frontend/theme/catppuccin_mocha_theme.dart';
|
||||
import 'package:frontend/utils/local_network_permission.dart';
|
||||
import 'package:frontend/utils/pref_utils.dart';
|
||||
import 'package:frontend/utils/push_service.dart';
|
||||
import 'package:frontend/utils/ui_snackbars.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'navigation.dart';
|
||||
import 'theme/gruvbox_theme.dart';
|
||||
@@ -64,6 +65,9 @@ final class MainApp extends StatelessWidget {
|
||||
title: 'OOTT',
|
||||
theme: appState.theme,
|
||||
routerConfig: router,
|
||||
// Host snackbars above the router's Navigator so they render on top
|
||||
// of dialogs (their barrier no longer dims them). See buildSnackbarHost.
|
||||
builder: buildSnackbarHost,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user