feat: Add new translations, add list of existing accounts to login page

This commit is contained in:
Anton Stubenbord
2023-05-30 01:19:27 +02:00
parent cd56f5fdb8
commit 1dc7d22d3a
19 changed files with 694 additions and 381 deletions

View File

@@ -2,18 +2,16 @@ import 'package:flutter/material.dart';
import 'package:paperless_mobile/core/database/tables/local_user_account.dart';
class UserAvatar extends StatelessWidget {
final String userId;
final LocalUserAccount account;
const UserAvatar({
super.key,
required this.userId,
required this.account,
});
@override
Widget build(BuildContext context) {
final backgroundColor = Colors.primaries[userId.hashCode % Colors.primaries.length];
final backgroundColor = Colors.primaries[account.id.hashCode % Colors.primaries.length];
final foregroundColor = backgroundColor.computeLuminance() > 0.5 ? Colors.black : Colors.white;
return CircleAvatar(
child: Text((account.paperlessUser.fullName ?? account.paperlessUser.username)