Add various informative alert-boxes

This commit is contained in:
2025-11-09 21:31:03 +01:00
parent c108859899
commit fd5e714074
23 changed files with 426 additions and 130 deletions

View File

@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'package:simplecloudnotifier/api/api_client.dart';
import 'package:simplecloudnotifier/api/api_exception.dart';
import 'package:simplecloudnotifier/components/layout/scaffold.dart';
import 'package:simplecloudnotifier/state/application_log.dart';
import 'package:simplecloudnotifier/state/globals.dart';
@@ -162,9 +163,12 @@ class _AccountLoginPageState extends State<AccountLoginPage> {
Toaster.success("Login", "Successfully logged in");
Navi.popToRoot(context);
} catch (exc, trace) {
} on APIException catch (exc, trace) {
if (!exc.toastShown) Toaster.error("Error", 'Failed to verify token');
ApplicationLog.error('Failed to verify token: ' + exc.toString(), trace: trace);
} catch (exc, trace) {
Toaster.error("Error", 'Failed to verify token');
ApplicationLog.error('Failed to verify token: ' + exc.toString(), trace: trace);
} finally {
setState(() => loading = false);
}