mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 00:12:09 +03:00
Add label for pinned and non-pinned OATH accounts
This commit is contained in:
parent
75c167dea3
commit
aa5773bafa
@ -418,6 +418,7 @@
|
||||
"s_pin_account": "Konto anpinnen",
|
||||
"s_unpin_account": "Konto nicht mehr anpinnen",
|
||||
"s_no_pinned_accounts": "Keine angepinnten Konten",
|
||||
"s_pinned": null,
|
||||
"l_pin_account_desc": null,
|
||||
"s_rename_account": "Konto umbenennen",
|
||||
"l_rename_account_desc": null,
|
||||
|
@ -418,6 +418,7 @@
|
||||
"s_pin_account": "Pin account",
|
||||
"s_unpin_account": "Unpin account",
|
||||
"s_no_pinned_accounts": "No pinned accounts",
|
||||
"s_pinned": "Pinned",
|
||||
"l_pin_account_desc": "Keep your important accounts together",
|
||||
"s_rename_account": "Rename account",
|
||||
"l_rename_account_desc": "Edit the issuer/name of the account",
|
||||
|
@ -418,6 +418,7 @@
|
||||
"s_pin_account": "Épingler compte",
|
||||
"s_unpin_account": "Détacher compte",
|
||||
"s_no_pinned_accounts": "Aucun compte épinglé",
|
||||
"s_pinned": null,
|
||||
"l_pin_account_desc": "Conserver vos comptes importants ensemble",
|
||||
"s_rename_account": "Renommer compte",
|
||||
"l_rename_account_desc": "Modifier émetteur/nom du compte",
|
||||
|
@ -418,6 +418,7 @@
|
||||
"s_pin_account": "アカウントをピン留めする",
|
||||
"s_unpin_account": "アカウントのピン留めを解除",
|
||||
"s_no_pinned_accounts": "ピン留めされたアカウントはありません",
|
||||
"s_pinned": null,
|
||||
"l_pin_account_desc": "重要なアカウントをまとめて保持",
|
||||
"s_rename_account": "アカウント名を変更",
|
||||
"l_rename_account_desc": "アカウントの発行者/名前を編集",
|
||||
|
@ -418,6 +418,7 @@
|
||||
"s_pin_account": "Przypnij konto",
|
||||
"s_unpin_account": "Odepnij konto",
|
||||
"s_no_pinned_accounts": "Brak przypiętych kont",
|
||||
"s_pinned": null,
|
||||
"l_pin_account_desc": "Przechowuj ważne konta razem",
|
||||
"s_rename_account": "Zmień nazwę konta",
|
||||
"l_rename_account_desc": "Edytuj wydawcę/nazwę konta",
|
||||
|
@ -33,6 +33,9 @@ class AccountList extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final theme = Theme.of(context);
|
||||
final labelStyle =
|
||||
theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.primary);
|
||||
final credentials = ref.watch(filteredCredentialsProvider(accounts));
|
||||
final favorites = ref.watch(favoritesProvider);
|
||||
if (credentials.isEmpty) {
|
||||
@ -59,8 +62,13 @@ class AccountList extends ConsumerWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (pinnedCreds.isNotEmpty)
|
||||
if (pinnedCreds.isNotEmpty) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, bottom: 8),
|
||||
child: Text(l10n.s_pinned, style: labelStyle),
|
||||
),
|
||||
Padding(
|
||||
padding: pinnedLayout == FlexLayout.grid
|
||||
? const EdgeInsets.only(left: 16.0, right: 16)
|
||||
@ -77,14 +85,17 @@ class AccountList extends ConsumerWidget {
|
||||
runSpacing: 8.0,
|
||||
),
|
||||
),
|
||||
if (pinnedCreds.isNotEmpty && creds.isNotEmpty)
|
||||
],
|
||||
if (pinnedCreds.isNotEmpty && creds.isNotEmpty) ...[
|
||||
const SizedBox(height: 24),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
// child: Divider(
|
||||
// color: Theme.of(context).colorScheme.secondaryContainer,
|
||||
// ),
|
||||
// ),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 16, bottom: 8),
|
||||
child: Text(
|
||||
l10n.s_accounts,
|
||||
style: labelStyle,
|
||||
),
|
||||
),
|
||||
],
|
||||
Padding(
|
||||
padding: normalLayout == FlexLayout.grid
|
||||
? const EdgeInsets.only(left: 16.0, right: 16)
|
||||
|
@ -481,7 +481,6 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
|
||||
color: e == oathLayout
|
||||
? Theme.of(context).colorScheme.primary
|
||||
: null,
|
||||
fill: e == oathLayout ? 1 : 0,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -508,7 +507,6 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
|
||||
icon: Icon(
|
||||
oathLayout._icon,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
fill: 1,
|
||||
),
|
||||
itemBuilder: (context) => [
|
||||
...availableLayouts.map(
|
||||
|
Loading…
Reference in New Issue
Block a user