mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 08:07:59 -06:00
feat: rework account management page, add tooltip to settings
This commit is contained in:
@@ -170,6 +170,7 @@ class AuthenticationCubit extends Cubit<AuthenticationState> {
|
||||
}) async {
|
||||
assert(credentials.password != null && credentials.username != null);
|
||||
final userId = "${credentials.username}@$serverUrl";
|
||||
|
||||
final userAccountsBox = Hive.box<UserAccount>(HiveBoxes.userAccount);
|
||||
final userSettingsBox = Hive.box<UserSettings>(HiveBoxes.userSettings);
|
||||
|
||||
|
||||
@@ -28,11 +28,13 @@ class LoginPage extends StatefulWidget {
|
||||
) onSubmit;
|
||||
|
||||
final String submitText;
|
||||
final String titleString;
|
||||
|
||||
const LoginPage({
|
||||
Key? key,
|
||||
required this.onSubmit,
|
||||
required this.submitText,
|
||||
required this.titleString,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -47,7 +49,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false, // appBar: AppBar(
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: FormBuilder(
|
||||
key: _formKey,
|
||||
child: PageView(
|
||||
@@ -55,6 +57,7 @@ class _LoginPageState extends State<LoginPage> {
|
||||
scrollBehavior: NeverScrollableScrollBehavior(),
|
||||
children: [
|
||||
ServerConnectionPage(
|
||||
titleString: widget.titleString,
|
||||
formBuilderKey: _formKey,
|
||||
onContinue: () {
|
||||
_pageController.nextPage(
|
||||
|
||||
@@ -15,11 +15,13 @@ import 'package:provider/provider.dart';
|
||||
class ServerConnectionPage extends StatefulWidget {
|
||||
final GlobalKey<FormBuilderState> formBuilderKey;
|
||||
final void Function() onContinue;
|
||||
final String titleString;
|
||||
|
||||
const ServerConnectionPage({
|
||||
super.key,
|
||||
required this.formBuilderKey,
|
||||
required this.onContinue,
|
||||
required this.titleString,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -35,7 +37,7 @@ class _ServerConnectionPageState extends State<ServerConnectionPage> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
toolbarHeight: kToolbarHeight - 4,
|
||||
title: Text(S.of(context)!.connectToPaperless),
|
||||
title: Text(widget.titleString),
|
||||
bottom: PreferredSize(
|
||||
child:
|
||||
_isCheckingConnection ? const LinearProgressIndicator() : const SizedBox(height: 4.0),
|
||||
|
||||
Reference in New Issue
Block a user