Skip to content

Commit 3af4645

Browse files
committed
feat: Added a way to display the search bar by scrolling above the list.
1 parent 9b828ea commit 3af4645

27 files changed

+1260
-865
lines changed

lib/i18n/de/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"title": "Schaltfläche „Kopieren“ anzeigen",
2727
"subtitle": "Ist diese Option aktiviert, wird neben jedem TOTP ein Kopiersymbol angezeigt. Andernfalls kopiert ein einfaches Tippen den Code in die Zwischenablage."
2828
},
29+
"displaySearchIconButton": {
30+
"title": "Suchschaltfläche anzeigen",
31+
"subtitle": "Wenn aktiviert, wird eine Suchschaltfläche in der Menüleiste angezeigt. Andernfalls wird die Suchleiste über der TOTP-Liste platziert."
32+
},
2933
"theme": {
3034
"title": "Thema",
3135
"subtitle": "Ändern Sie den Anwendungsthemen und Helligkeit.",

lib/i18n/en/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"title": "Display copy button",
2727
"subtitle": "If enabled, will display a copy button next to your TOTPs. Otherwise, a simple tap will copy the code into your clipboard."
2828
},
29+
"displaySearchIconButton": {
30+
"title": "Display search button",
31+
"subtitle": "If enabled, will display a search button in the menu bar. Otherwise, the search bar will be placed above the TOTP list."
32+
},
2933
"theme": {
3034
"title": "Theme",
3135
"subtitle": "Change the application theme and brightness.",

lib/i18n/fr/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"title": "Afficher un bouton de copie",
2727
"subtitle": "Si activé, affiche un bouton de copie à côté des TOTPs. Sinon, un simple appui permet de copier les codes dans votre presse-papiers."
2828
},
29+
"displaySearchIconButton": {
30+
"title": "Afficher un bouton de recherche",
31+
"subtitle": "Si activé, affiche un bouton de recherche dans la barre de menu. Sinon, la barre de recherche sera placée au-dessus de la liste des TOTPs."
32+
},
2933
"theme": {
3034
"title": "Thème",
3135
"subtitle": "Changer le thème de l'application et la luminosité.",

lib/i18n/it/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"title": "Mostra pulsante di copia",
2727
"subtitle": "Se abilitato, mostrerà un pulsante di copia accanto ai tuoi TOTP. Altrimenti, un semplice tocco copierà il codice negli appunti."
2828
},
29+
"displaySearchIconButton": {
30+
"title": "Mostra pulsante di ricerca",
31+
"subtitle": "Se abilitato, verrà visualizzato un pulsante di ricerca nella barra dei menu. Altrimenti, la barra di ricerca verrà posizionata sopra l'elenco TOTP."
32+
},
2933
"theme": {
3034
"title": "Tema",
3135
"subtitle": "Cambia il tema dell'applicazione e la luminosità.",

lib/i18n/pt/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"title": "Exibir botão de cópia",
2727
"subtitle": "Se ativado, exibirá um botão de cópia ao lado dos seus TOTPs. Caso contrário, um simples toque copiará o código para a área de transferência."
2828
},
29+
"displaySearchIconButton": {
30+
"title": "Exibir botão de pesquisa",
31+
"subtitle": "Se ativado, exibirá um botão de pesquisa na barra de menus. Caso contrário, a barra de pesquisa será posicionada acima da lista TOTP."
32+
},
2933
"theme": {
3034
"title": "Tema",
3135
"subtitle": "Altere o tema da aplicação e a luminosidade.",

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:open_authenticator/model/settings/theme.dart';
1919
import 'package:open_authenticator/model/storage/online.dart';
2020
import 'package:open_authenticator/model/totp/repository.dart';
2121
import 'package:open_authenticator/pages/contributor_plan_paywall/page.dart';
22-
import 'package:open_authenticator/pages/home.dart';
22+
import 'package:open_authenticator/pages/home/page.dart';
2323
import 'package:open_authenticator/pages/intro/page.dart';
2424
import 'package:open_authenticator/pages/scan.dart';
2525
import 'package:open_authenticator/pages/settings/page.dart';
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import 'package:flutter_riverpod/flutter_riverpod.dart';
2+
import 'package:open_authenticator/model/settings/entry.dart';
3+
4+
/// The display search button settings entry provider.
5+
final displaySearchButtonSettingsEntryProvider = AsyncNotifierProvider.autoDispose<DisplaySearchButtonSettingsEntry, bool>(DisplaySearchButtonSettingsEntry.new);
6+
7+
/// A settings entry that allows to control whether to show a search button in the app bar.
8+
class DisplaySearchButtonSettingsEntry extends SettingsEntry<bool> {
9+
/// Creates a new display search button settings entry instance.
10+
DisplaySearchButtonSettingsEntry()
11+
: super(
12+
key: 'displaySearchButton',
13+
defaultValue: true,
14+
);
15+
}

0 commit comments

Comments
 (0)