mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-07 22:07:49 -06:00
feat: add permission/user/group models, start integration into code
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:hive_flutter/adapters.dart';
|
||||
import 'package:paperless_mobile/core/config/hive/hive_config.dart';
|
||||
import 'package:paperless_mobile/extensions/flutter_extensions.dart';
|
||||
import 'package:paperless_mobile/core/database/tables/global_settings.dart';
|
||||
import 'package:paperless_mobile/core/database/tables/local_user_account.dart';
|
||||
import 'package:paperless_mobile/features/login/cubit/authentication_cubit.dart';
|
||||
import 'package:paperless_mobile/features/login/model/login_form_credentials.dart';
|
||||
import 'package:paperless_mobile/core/database/tables/local_user_account.dart';
|
||||
import 'package:paperless_mobile/features/login/view/login_page.dart';
|
||||
import 'package:paperless_mobile/core/database/tables/global_settings.dart';
|
||||
import 'package:paperless_mobile/features/settings/view/dialogs/switch_account_dialog.dart';
|
||||
import 'package:paperless_mobile/features/settings/view/pages/switching_accounts_page.dart';
|
||||
import 'package:paperless_mobile/features/settings/view/widgets/global_settings_builder.dart';
|
||||
@@ -33,18 +29,18 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
.whereNot((element) => element == globalSettings.currentLoggedInUser)
|
||||
.toList();
|
||||
return SimpleDialog(
|
||||
insetPadding: EdgeInsets.all(24),
|
||||
contentPadding: EdgeInsets.all(8),
|
||||
insetPadding: const EdgeInsets.all(24),
|
||||
contentPadding: const EdgeInsets.all(8),
|
||||
title: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Align(
|
||||
const Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: CloseButton(),
|
||||
),
|
||||
Center(child: Text(S.of(context)!.accounts)),
|
||||
],
|
||||
), //TODO: INTL
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
),
|
||||
@@ -103,7 +99,7 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
isThreeLine: true,
|
||||
isThreeLine: account.fullName != null,
|
||||
leading: UserAvatar(
|
||||
account: account,
|
||||
userId: userId,
|
||||
@@ -116,7 +112,7 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
PopupMenuItem(
|
||||
child: ListTile(
|
||||
title: Text(S.of(context)!.switchAccount),
|
||||
leading: Icon(Icons.switch_account_rounded),
|
||||
leading: const Icon(Icons.switch_account_rounded),
|
||||
),
|
||||
value: 0,
|
||||
),
|
||||
@@ -124,7 +120,7 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
PopupMenuItem(
|
||||
child: ListTile(
|
||||
title: Text(S.of(context)!.remove),
|
||||
leading: Icon(
|
||||
leading: const Icon(
|
||||
Icons.person_remove,
|
||||
color: Colors.red,
|
||||
),
|
||||
@@ -135,7 +131,7 @@ class ManageAccountsPage extends StatelessWidget {
|
||||
PopupMenuItem(
|
||||
child: ListTile(
|
||||
title: Text(S.of(context)!.logout),
|
||||
leading: Icon(
|
||||
leading: const Icon(
|
||||
Icons.person_remove,
|
||||
color: Colors.red,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user