mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-22 17:51:29 +03:00
Merge PR #1568
This commit is contained in:
commit
efade221cd
@ -504,6 +504,12 @@ class _AppPageState extends ConsumerState<AppPage> {
|
||||
widget.detailViewBuilder != null || widget.keyActionsBuilder != null;
|
||||
var body = _buildMainContent(context, hasManage);
|
||||
|
||||
var navigationText = showNavigation
|
||||
? (fullyExpanded
|
||||
? l10n.s_collapse_navigation
|
||||
: MaterialLocalizations.of(context).openAppDrawerTooltip)
|
||||
: l10n.s_expand_navigation;
|
||||
|
||||
if (widget.onFileDropped != null) {
|
||||
body = FileDropTarget(
|
||||
onFileDropped: widget.onFileDropped!,
|
||||
@ -631,13 +637,8 @@ class _AppPageState extends ConsumerState<AppPage> {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: IconButton(
|
||||
icon: const Icon(Symbols.menu),
|
||||
tooltip: showNavigation
|
||||
? (fullyExpanded
|
||||
? l10n.s_collapse_navigation
|
||||
: MaterialLocalizations.of(context)
|
||||
.openAppDrawerTooltip)
|
||||
: l10n.s_expand_navigation,
|
||||
icon: Icon(Symbols.menu, semanticLabel: navigationText),
|
||||
tooltip: navigationText,
|
||||
onPressed: fullyExpanded
|
||||
? () {
|
||||
ref
|
||||
@ -681,10 +682,12 @@ class _AppPageState extends ConsumerState<AppPage> {
|
||||
);
|
||||
},
|
||||
icon: widget.keyActionsBadge
|
||||
? const Badge(
|
||||
child: Icon(Symbols.more_vert),
|
||||
? Badge(
|
||||
child: Icon(Symbols.more_vert,
|
||||
semanticLabel: l10n.s_configure_yk),
|
||||
)
|
||||
: const Icon(Symbols.more_vert),
|
||||
: Icon(Symbols.more_vert,
|
||||
semanticLabel: l10n.s_configure_yk),
|
||||
iconSize: 24,
|
||||
tooltip: l10n.s_configure_yk,
|
||||
padding: const EdgeInsets.all(12),
|
||||
|
@ -285,8 +285,11 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
|
||||
overflow: TextOverflow.fade,
|
||||
softWrap: false,
|
||||
),
|
||||
subtitle: Text(widget.subtitle,
|
||||
overflow: TextOverflow.fade, softWrap: false),
|
||||
subtitle: Text(
|
||||
widget.subtitle,
|
||||
overflow: TextOverflow.fade,
|
||||
softWrap: false,
|
||||
),
|
||||
dense: true,
|
||||
onTap: widget.onTap,
|
||||
),
|
||||
@ -314,19 +317,23 @@ class _DeviceRowState extends ConsumerState<_DeviceRow> {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 6.5),
|
||||
child: widget.selected
|
||||
? IconButton.filled(
|
||||
tooltip: isDesktop ? tooltip : null,
|
||||
icon: widget.leading,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
onPressed: widget.onTap,
|
||||
)
|
||||
: IconButton(
|
||||
tooltip: isDesktop ? tooltip : null,
|
||||
icon: widget.leading,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
onPressed: widget.onTap,
|
||||
color: colorScheme.secondary,
|
||||
),
|
||||
? Semantics(
|
||||
label: tooltip,
|
||||
child: IconButton.filled(
|
||||
tooltip: isDesktop ? tooltip : null,
|
||||
icon: widget.leading,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
onPressed: widget.onTap,
|
||||
))
|
||||
: Semantics(
|
||||
label: tooltip,
|
||||
child: IconButton(
|
||||
tooltip: isDesktop ? tooltip : null,
|
||||
icon: widget.leading,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
onPressed: widget.onTap,
|
||||
color: colorScheme.secondary,
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -145,8 +145,12 @@ class NavigationContent extends ConsumerWidget {
|
||||
...availableSections.map((app) => NavigationItem(
|
||||
key: app._key,
|
||||
title: app.getDisplayName(l10n),
|
||||
leading: Icon(app._icon,
|
||||
fill: app == currentSection ? 1.0 : 0.0),
|
||||
leading: Icon(
|
||||
app._icon,
|
||||
fill: app == currentSection ? 1.0 : 0.0,
|
||||
semanticLabel:
|
||||
!extended ? app.getDisplayName(l10n) : null,
|
||||
),
|
||||
collapsed: !extended,
|
||||
selected: app == currentSection,
|
||||
onTap: data == null && currentSection == Section.home ||
|
||||
|
Loading…
Reference in New Issue
Block a user