added support for multiple accounts, guardian login bugfixes, ui changes

This commit is contained in:
2026-09-23 20:50:12 +02:00
parent 630497abdd
commit 84098af7e2
37 changed files with 1759 additions and 376 deletions
@@ -14,9 +14,13 @@ class GuardianLoginCard extends StatefulWidget {
final GuardianLoginController controller;
final VoidCallback onSuccess;
/// Signs in an additional account instead of the first one.
final bool addingAccount;
const GuardianLoginCard({
required this.controller,
required this.onSuccess,
this.addingAccount = false,
super.key,
});
@@ -118,7 +122,9 @@ class _GuardianLoginCardState extends State<GuardianLoginCard> {
return Form(
key: _emailFormKey,
child: LoginCardFrame(
title: 'Anmeldung für Eltern',
title: widget.addingAccount
? 'Elternkonto hinzufügen'
: 'Anmeldung für Eltern',
hint:
'Gib die E-Mail-Adresse ein, die bei der Schule hinterlegt ist. '
'Du erhältst einen Anmeldecode per E-Mail.',
@@ -194,7 +200,7 @@ class _GuardianLoginCardState extends State<GuardianLoginCard> {
const SizedBox(height: 20),
LoginSubmitButton(
key: const Key('guardian-verify-button'),
label: 'Anmelden',
label: widget.addingAccount ? 'Hinzufügen' : 'Anmelden',
loading: _controller.loading,
onPressed: _submitCode,
),