π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
ui updates, huge icon revamps & animation fixes
a5xwin68528edfb22b
diff --git a/mobile/apps/auth/lib/ui/code_widget.dart b/mobile/apps/auth/lib/ui/code_widget.dartindex aa2bfc5cea..cd881d1e09 100644--- a/mobile/apps/auth/lib/ui/code_widget.dart+++ b/mobile/apps/auth/lib/ui/code_widget.dart@@ -148,7 +148,8 @@ class _CodeWidgetState extends State<CodeWidget> {crossAxisAlignment: CrossAxisAlignment.start,mainAxisAlignment: MainAxisAlignment.spaceBetween,children: [- if (widget.code.type.isTOTPCompatible)+ if (widget.code.type.isTOTPCompatible &&+ !CodeDisplayStore.instance.isSelectionModeActive.value)CodeTimerProgress(key: ValueKey('period_${widget.code.period}'),period: widget.code.period,@@ -211,7 +212,7 @@ Widget clippedCard(AppLocalizations l10n) {decoration: BoxDecoration(borderRadius: BorderRadius.circular(8),color: isSelected- ? colorScheme.primary400.withValues(alpha: 0.08)+ ? colorScheme.primary400.withValues(alpha: 0.10): Theme.of(context).colorScheme.codeCardBackgroundColor,//add purple overlay when selectedborder: isSelected@@ -417,27 +418,47 @@ Widget clippedCard(AppLocalizations l10n) {crossAxisAlignment: CrossAxisAlignment.start,children: [if (isSelected)- Padding(- padding: const EdgeInsets.only(right: 8.0),- child: Icon(- Icons.check_circle,+ Padding(+ padding: const EdgeInsets.only(right: 4.0),+ child: Transform.translate(+ offset: const Offset(0, 2.0),+ child: SizedBox(+ width: isCompactMode ? 16 : 20,+ height: isCompactMode ? 16 : 20,+ child: Stack(+ alignment: Alignment.center,+ children: [+ Icon(+ Icons.circle,color: colorScheme.primary400,- size: isCompactMode ? 20 : 24,+ size: isCompactMode ? 16 : 20, //checkbox circle size),- ),+ Icon(+ Icons.check,+ color: Colors.white,+ size: isCompactMode ? 8 : 12, // checkbox tick size+ ),+ ],+ ),+ ),+ ),+ ),Expanded(child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [- Text(- safeDecode(widget.code.issuer).trim(),- style: isCompactMode- ? Theme.of(context).textTheme.bodyMedium- : Theme.of(context).textTheme.titleLarge,+ Transform.translate(+ offset: Offset(isSelected ? 0.0 : 0, 0), //position of label when selected+ child: Text(+ safeDecode(widget.code.issuer).trim(),+ style: isCompactMode+ ? Theme.of(context).textTheme.bodyMedium+ : Theme.of(context).textTheme.titleLarge,+ ),),if (!isCompactMode) const SizedBox(height: 2),Transform.translate(- offset: Offset(isSelected ? -30.0 : 0, 0),+ offset: Offset(isSelected ? -21.0 : 0, 0), //position of mail when selectedchild: Text(safeDecode(widget.code.account).trim(),style: Theme.of(context).textTheme.bodySmall?.copyWith(diff --git a/mobile/apps/auth/lib/ui/home_page.dart b/mobile/apps/auth/lib/ui/home_page.dartindex dcb5fe8fdd..d0b5c7f3ce 100644--- a/mobile/apps/auth/lib/ui/home_page.dart+++ b/mobile/apps/auth/lib/ui/home_page.dart@@ -54,6 +54,7 @@ import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:flutter_speed_dial/flutter_speed_dial.dart';import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';+import 'package:hugeicons/hugeicons.dart';import 'package:logging/logging.dart';import 'package:move_to_background/move_to_background.dart';@@ -209,14 +210,30 @@ Widget _buildTrashSelectActions() {return Container(decoration: BoxDecoration(color: Theme.of(context).brightness == Brightness.light- ? const Color(0xFFF7F7F7)- : const Color(0xFF1E1E1E),+ ? const Color(0xFFF7F7F7)+ : const Color(0xFF1E1E1E),borderRadius: BorderRadius.circular(12),),child: Row(children: [- _buildClearActionButton(Icons.restore,context.l10n.restore, _onRestoreSelectedPressed,),- _buildClearActionButton(Icons.delete_forever,context.l10n.delete, _onDeleteForeverPressed),+ _buildClearActionButton(+ context.l10n.restore,+ _onRestoreSelectedPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedRestoreBin,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),+ _buildClearActionButton(+ context.l10n.delete,+ _onDeleteForeverPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedDelete04,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),],),);@@ -393,7 +410,11 @@ Future<void> _onShowQrPressed(Code code) async {);}-Widget _buildClearActionButton(IconData icon, String label, VoidCallback onTap) {+Widget _buildClearActionButton(+ String label,+ VoidCallback onTap,+ {IconData? icon, Widget? iconWidget,}+) {final colorScheme = getEnteColorScheme(context);final textTheme = getEnteTextTheme(context);@@ -408,7 +429,7 @@ Widget _buildClearActionButton(IconData icon, String label, VoidCallback onTap)child: Column(mainAxisSize: MainAxisSize.min,children: [- Icon(icon, color: colorScheme.textBase, size: 21), //bottom row icon props+ iconWidget ?? Icon(icon!, color: colorScheme.textBase, size: 21),const SizedBox(height: 8),Text(label, style: textTheme.small.copyWith(color: colorScheme.textBase, fontSize: 11)),],@@ -425,43 +446,86 @@ Widget _buildSingleSelectActions(Code code) {children: [Row(children: [- _buildActionButton(Icons.edit_outlined, context.l10n.edit, () => _onEditPressed(code)),+ _buildActionButton(+ context.l10n.edit,+ () => _onEditPressed(code),+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedEdit03,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),const SizedBox(width: 10),- _buildActionButton(Icons.share_outlined, context.l10n.share, () => _onSharePressed(code)),+ _buildActionButton(+ context.l10n.share,+ () => _onSharePressed(code),+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedNavigation03,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),const SizedBox(width: 10),- _buildActionButton(Icons.qr_code, context.l10n.qrCode, () => _onShowQrPressed(code)),+ _buildActionButton(+ context.l10n.qrCode,+ () => _onShowQrPressed(code),+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedQrCode,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),],),const SizedBox(height: 16),Container(decoration: BoxDecoration(color: Theme.of(context).brightness == Brightness.dark- ? colorScheme.backgroundElevated2- : const Color(0xFFF7F7F7),- //color of the bottom button row on single select+ ? colorScheme.backgroundElevated2+ : const Color(0xFFF7F7F7),borderRadius: BorderRadius.circular(12),),child: Row(children: [ValueListenableBuilder<Set<String>>(- valueListenable: _codeDisplayStore.selectedCodeIds,- builder: (context, selectedIds, child) {- if (selectedIds.isEmpty) return const Expanded(child: SizedBox.shrink());-- final selectedCodes = _allCodes?.where((c) => selectedIds.contains(c.secret)).toList() ?? [];- if (selectedCodes.isEmpty) return const Expanded(child: SizedBox.shrink());-- final bool allArePinned = selectedCodes.every((code) => code.isPinned);-- return _buildClearActionButton(- allArePinned ? Icons.push_pin : Icons.push_pin_outlined,- allArePinned ? context.l10n.unpinText : context.l10n.pinText,- _onPinSelectedPressed,- );- },-),- _buildClearActionButton(Icons.label_outline, context.l10n.addTag, _onAddTagPressed),- _buildClearActionButton(Icons.delete_outline, context.l10n.trash, _onTrashSelectedPressed),+ valueListenable: _codeDisplayStore.selectedCodeIds,+ builder: (context, selectedIds, child) {+ if (selectedIds.isEmpty) return const Expanded(child: SizedBox.shrink());+ final selectedCodes = _allCodes?.where((c) => selectedIds.contains(c.secret)).toList() ?? [];+ if (selectedCodes.isEmpty) return const Expanded(child: SizedBox.shrink());+ final bool allArePinned = selectedCodes.every((code) => code.isPinned);++ return _buildClearActionButton(+ allArePinned ? context.l10n.unpinText : context.l10n.pinText,+ _onPinSelectedPressed,+ iconWidget: HugeIcon(+ icon: allArePinned+ ? HugeIcons.strokeRoundedPin+ : HugeIcons.strokeRoundedPinOff,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ );+ },+ ),+ _buildClearActionButton(+ context.l10n.addTag,+ _onAddTagPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedTags,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),+ _buildClearActionButton(+ context.l10n.trash,+ _onTrashSelectedPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedDelete02,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),+ ),],),),@@ -488,53 +552,82 @@ Widget _buildMultiSelectActions(Set<String> selectedIds) {if (selectedCodes.isEmpty) return const SizedBox.shrink();final bool allArePinned = selectedCodes.every((code) => code.isPinned);- final bool allAreUnpinned = selectedCodes.every((code) => !code.isPinned);- final bool isMixed = !allArePinned && !allAreUnpinned;+ final bool isMixed = !allArePinned && !selectedCodes.every((code) => !code.isPinned);if (isMixed) {- //mixed state: when selection contains both pinned and unpinned codes+ // Mixed state: when selection contains both pinned and unpinned codesreturn Row(children: [_buildClearActionButton(- Icons.push_pin_outlined,context.l10n.pinText,_onPinSelectedPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedPinOff,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),_buildClearActionButton(- Icons.push_pin,context.l10n.unpinText,_onUnpinSelectedPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedPin,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),_buildClearActionButton(- Icons.label_outline,context.l10n.addTag,_onAddTagPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedTags,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),_buildClearActionButton(- Icons.delete_outline,context.l10n.trash,_onTrashSelectedPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedDelete02,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),],);} else {- //when selection contains either only pinned OR only unpinned codes+ // When selection contains either only pinned OR only unpinned codesreturn Row(children: [_buildClearActionButton(- allArePinned ? Icons.push_pin : Icons.push_pin_outlined,allArePinned ? context.l10n.unpinText : context.l10n.pinText,_onPinSelectedPressed,+ iconWidget: HugeIcon(+ icon: allArePinned+ ? HugeIcons.strokeRoundedPin+ : HugeIcons.strokeRoundedPinOff,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),_buildClearActionButton(- Icons.label_outline,context.l10n.addTag,_onAddTagPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedTags,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),_buildClearActionButton(- Icons.delete_outline,context.l10n.trash,_onTrashSelectedPressed,+ iconWidget: HugeIcon(+ icon: HugeIcons.strokeRoundedDelete02,+ size: 21,+ color: getEnteColorScheme(context).textBase,+ ),),],);@@ -544,7 +637,11 @@ Widget _buildMultiSelectActions(Set<String> selectedIds) {);}- Widget _buildActionButton(IconData icon, String label, VoidCallback onTap) {+ Widget _buildActionButton(+ String label,+ VoidCallback onTap,+ {IconData? icon, Widget? iconWidget,}+) {final colorScheme = getEnteColorScheme(context);final textTheme = getEnteTextTheme(context);@@ -552,9 +649,8 @@ Widget _buildMultiSelectActions(Set<String> selectedIds) {child: Container(decoration: BoxDecoration(color: Theme.of(context).brightness == Brightness.dark- ? colorScheme.backgroundElevated2- : const Color(0xFFF7F7F7),-+ ? colorScheme.backgroundElevated2+ : const Color(0xFFF7F7F7),borderRadius: BorderRadius.circular(12),),child: InkWell(@@ -568,7 +664,7 @@ Widget _buildMultiSelectActions(Set<String> selectedIds) {mainAxisAlignment: MainAxisAlignment.center,mainAxisSize: MainAxisSize.min,children: [- Icon(icon, color: colorScheme.textBase, size: 21), //top row icon props+ iconWidget ?? Icon(icon!, color: colorScheme.textBase, size: 21),const SizedBox(height: 8),Text(label,@@ -604,17 +700,30 @@ Widget _buildActionButtons() {} else {actionWidget = _buildMultiSelectActions(selectedIds);}- return AnimatedSwitcher( //size transition for multi/single select action bar- duration: const Duration(milliseconds: 250),- transitionBuilder: (Widget child, Animation<double> animation) {- return SizeTransition(- axisAlignment: 1.0,- sizeFactor: animation,- child: child,- );- },- child: actionWidget,- );+ final double containerHeight;+ if (selectedIds.isEmpty) {+ containerHeight = 0.0;+ } else if (selectedIds.length == 1) {+ containerHeight = 160.0;+ } else {+ containerHeight = 80.0;+ }++ return AnimatedContainer(+ duration: const Duration(milliseconds: 250),+ curve: Curves.easeInOut,+ height: containerHeight,+ child: SingleChildScrollView(+ physics: const NeverScrollableScrollPhysics(),+ child: ConstrainedBox(+ constraints: BoxConstraints(+ minHeight: containerHeight,+ maxHeight: containerHeight,+ ),+ child: actionWidget,+ ),+ ),+);},);}@@ -676,8 +785,8 @@ Widget _buildActionButtons() {Text(context.l10n.selectAll,style: const TextStyle(fontSize: 11),),const SizedBox(width: 6),- const Icon(- Icons.check_circle_outline_outlined,+ const HugeIcon(+ icon: HugeIcons.strokeRoundedTickDouble02,color: Colors.grey,size: 15,),@@ -1472,14 +1581,14 @@ Widget build(BuildContext context) {animationCurve: Curves.elasticInOut,children: [SpeedDialChild(- child: const Icon(Icons.qr_code),+ child: const HugeIcon(icon: HugeIcons.strokeRoundedQrCode),foregroundColor: Theme.of(context).colorScheme.fabForegroundColor,backgroundColor: Theme.of(context).colorScheme.fabBackgroundColor,labelWidget: SpeedDialLabelWidget(context.l10n.scanAQrCode),onTap: _redirectToScannerPage,),SpeedDialChild(- child: const Icon(Icons.keyboard),+ child: const Icon(Icons.keyboard_alt_outlined),foregroundColor: Theme.of(context).colorScheme.fabForegroundColor,backgroundColor: Theme.of(context).colorScheme.fabBackgroundColor,labelWidget: SpeedDialLabelWidget(context.l10n.enterDetailsManually),@@ -1487,7 +1596,7 @@ Widget build(BuildContext context) {),if (PlatformUtil.isMobile())SpeedDialChild(- child: const Icon(Icons.image),+ child: const HugeIcon(icon: HugeIcons.strokeRoundedAlbum02),backgroundColor: Theme.of(context).colorScheme.fabBackgroundColor,foregroundColor: Theme.of(context).colorScheme.fabForegroundColor,labelWidget: SpeedDialLabelWidget(context.l10n.importFromGallery),diff --git a/mobile/apps/auth/pubspec.lock b/mobile/apps/auth/pubspec.lockindex fb1c81c5af..ce97e6c251 100644--- a/mobile/apps/auth/pubspec.lock+++ b/mobile/apps/auth/pubspec.lock@@ -957,6 +957,14 @@ packages:url: "https://pub.dev"source: hostedversion: "0.1.0"+ hugeicons:+ dependency: "direct main"+ description:+ name: hugeicons+ sha256: b4a695c2100217a0b4d2378f0102d948925c97e37417baa6e2d9cb62ba8fb2f7+ url: "https://pub.dev"+ source: hosted+ version: "1.1.0"image:dependency: "direct main"description:diff --git a/mobile/apps/auth/pubspec.yaml b/mobile/apps/auth/pubspec.yamlindex e42d6078af..991eddf3ff 100644--- a/mobile/apps/auth/pubspec.yaml+++ b/mobile/apps/auth/pubspec.yaml@@ -85,6 +85,7 @@ dependencies:fluttertoast: ^8.1.1google_nav_bar: ^5.0.5 #supportedgradient_borders: ^1.0.0+ hugeicons: ^1.1.0http: ^1.1.0image: ^4.5.4intl: ^0.20.2