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
+10 -3
View File
@@ -12,9 +12,13 @@ class LoginCard extends StatefulWidget {
final LoginController controller;
final VoidCallback onSuccess;
/// Signs in an additional account instead of the first one.
final bool addingAccount;
const LoginCard({
required this.controller,
required this.onSuccess,
this.addingAccount = false,
super.key,
});
@@ -83,8 +87,11 @@ class _LoginCardState extends State<LoginCard> {
return Form(
key: _formKey,
child: LoginCardFrame(
title: 'Anmelden',
hint: 'Melde dich mit deinen Marianum-Zugangsdaten an.',
title: widget.addingAccount ? 'Schulkonto hinzufügen' : 'Anmelden',
hint: widget.addingAccount
? 'Melde dich mit den Marianum-Zugangsdaten des Kontos an, das '
'du hinzufügen möchtest.'
: 'Melde dich mit deinen Marianum-Zugangsdaten an.',
children: [
TextFormField(
key: const Key('login-username-field'),
@@ -127,7 +134,7 @@ class _LoginCardState extends State<LoginCard> {
const SizedBox(height: 20),
LoginSubmitButton(
key: const Key('login-submit-button'),
label: 'Anmelden',
label: widget.addingAccount ? 'Hinzufügen' : 'Anmelden',
loading: loading,
onPressed: _submit,
),