Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

ui changes and string changes

a5xwin54b9e1913a45
diff --git a/mobile/apps/auth/lib/l10n/arb/app_en.arb b/mobile/apps/auth/lib/l10n/arb/app_en.arb
index c84fd8dda1..57d2aeb53d 100644
--- a/mobile/apps/auth/lib/l10n/arb/app_en.arb
+++ b/mobile/apps/auth/lib/l10n/arb/app_en.arb
@@ -10,7 +10,7 @@
"onBoardingGetStarted": "Get Started",
"setupFirstAccount": "Setup your first account",
"importScanQrCode": "Scan a QR Code",
- "qrCode": "QR Code",
+ "qrCode": "QR code",
"qr": "QR",
"importEnterSetupKey": "Enter a setup key",
"importAccountPageTitle": "Enter account details",
diff --git a/mobile/apps/auth/lib/ui/code_widget.dart b/mobile/apps/auth/lib/ui/code_widget.dart
index 737e7fa8c7..aa2bfc5cea 100644
--- a/mobile/apps/auth/lib/ui/code_widget.dart
+++ b/mobile/apps/auth/lib/ui/code_widget.dart
@@ -436,12 +436,15 @@ Widget clippedCard(AppLocalizations l10n) {
: Theme.of(context).textTheme.titleLarge,
),
if (!isCompactMode) const SizedBox(height: 2),
- Text(
- safeDecode(widget.code.account).trim(),
- style: Theme.of(context).textTheme.bodySmall?.copyWith(
- fontSize: isCompactMode ? 12 : 12,
- color: Colors.grey,
- ),
+ Transform.translate(
+ offset: Offset(isSelected ? -30.0 : 0, 0),
+ child: Text(
+ safeDecode(widget.code.account).trim(),
+ style: Theme.of(context).textTheme.bodySmall?.copyWith(
+ fontSize: isCompactMode ? 12 : 12,
+ color: Colors.grey,
+ ),
+ ),
),
],
),
diff --git a/mobile/apps/auth/lib/ui/home/add_tag_sheet.dart b/mobile/apps/auth/lib/ui/home/add_tag_sheet.dart
index fe3341ddda..68f1a59f05 100644
--- a/mobile/apps/auth/lib/ui/home/add_tag_sheet.dart
+++ b/mobile/apps/auth/lib/ui/home/add_tag_sheet.dart
@@ -141,6 +141,9 @@ class _AddTagSheetState extends State<AddTagSheet> {
IconButton(
icon: const Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
+ style: IconButton.styleFrom(
+ backgroundColor: colorScheme.fillFaint.withValues(alpha: 0.025),
+ ),
),
],
),
@@ -157,20 +160,30 @@ class _AddTagSheetState extends State<AddTagSheet> {
code.display.isCustomIcon ? code.display.iconID : code.issuer;
return SizedBox(
- width: 60,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- IconUtils.instance.getIcon(context, iconData.trim(), width: 40),
- const SizedBox(height: 8),
- Text(
- code.issuer,
- overflow: TextOverflow.ellipsis,
- style: textTheme.mini.copyWith(color: colorScheme.textMuted,),
- ),
- ],
- ),
- );
+ width: 60,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 50,
+ height: 50,
+ decoration: BoxDecoration(
+ color: colorScheme.fillFaint.withValues(alpha: 0.02),
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Center(
+ child: IconUtils.instance.getIcon(context, iconData.trim(), width: 28),
+ ),
+ ),
+ const SizedBox(height: 8),
+ Text(
+ code.issuer,
+ overflow: TextOverflow.ellipsis,
+ style: textTheme.mini.copyWith(color: colorScheme.textMuted,),
+ ),
+ ],
+ ),
+);
},
),
),
@@ -188,13 +201,24 @@ class _AddTagSheetState extends State<AddTagSheet> {
..._allTags.map((tag) {
final isSelected = _selectedTagsInSheet.contains(tag);
return ChoiceChip(
- label: Text(tag),
+ label: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(tag),
+ if (isSelected) ...[
+ const SizedBox(width: 6),
+ const Icon(Icons.check, size: 16, color: Colors.white,),
+ ],
+ ],
+ ),
selected: isSelected,
+ showCheckmark: false,
onSelected: (selected) {
setState(() {
if (selected) {
_selectedTagsInSheet.add(tag);
- } else {
+ }
+ else {
_selectedTagsInSheet.remove(tag);
}
});
@@ -204,7 +228,6 @@ class _AddTagSheetState extends State<AddTagSheet> {
labelStyle: TextStyle(
color: isSelected ? Colors.white : colorScheme.textBase,
),
- avatar: isSelected ? const Icon(Icons.check, color: Colors.white, size: 16) : null,
side: BorderSide.none,
shape: const StadiumBorder(),
);
diff --git a/mobile/apps/auth/lib/ui/home_page.dart b/mobile/apps/auth/lib/ui/home_page.dart
index b3859fe520..dcb5fe8fdd 100644
--- a/mobile/apps/auth/lib/ui/home_page.dart
+++ b/mobile/apps/auth/lib/ui/home_page.dart
@@ -408,7 +408,7 @@ Widget _buildClearActionButton(IconData icon, String label, VoidCallback onTap)
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
- Icon(icon, color: colorScheme.textBase, size: 18), //bottom row icon props
+ Icon(icon, color: colorScheme.textBase, size: 21), //bottom row icon props
const SizedBox(height: 8),
Text(label, style: textTheme.small.copyWith(color: colorScheme.textBase, fontSize: 11)),
],
@@ -420,6 +420,7 @@ Widget _buildClearActionButton(IconData icon, String label, VoidCallback onTap)
Widget _buildSingleSelectActions(Code code) {
final colorScheme = getEnteColorScheme(context);
return Column(
+ key: const ValueKey('single_select_actions'),
mainAxisSize: MainAxisSize.min,
children: [
Row(
@@ -471,6 +472,7 @@ Widget _buildSingleSelectActions(Code code) {
Widget _buildMultiSelectActions(Set<String> selectedIds) {
final colorScheme = getEnteColorScheme(context);
return Container(
+ key: const ValueKey('multi_select_actions'),
decoration: BoxDecoration(
color: Theme.of(context).brightness == Brightness.dark
? colorScheme.backgroundElevated2
@@ -566,7 +568,7 @@ Widget _buildMultiSelectActions(Set<String> selectedIds) {
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
- Icon(icon, color: colorScheme.textBase, size: 18), //top row icon props
+ Icon(icon, color: colorScheme.textBase, size: 21), //top row icon props
const SizedBox(height: 8),
Text(
label,
@@ -592,15 +594,27 @@ Widget _buildActionButtons() {
return const SizedBox.shrink();
}
+ final Widget actionWidget;
if (selectedIds.length == 1) {
final selectedCode = _allCodes?.firstWhereOrNull(
(c) => c.secret == selectedIds.first,
);
if (selectedCode == null) return const SizedBox.shrink();
- return _buildSingleSelectActions(selectedCode);
+ actionWidget = _buildSingleSelectActions(selectedCode);
} else {
- return _buildMultiSelectActions(selectedIds);
+ 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,
+ );
},
);
}
@@ -608,140 +622,152 @@ Widget _buildActionButtons() {
Widget _buildSelectionActionBar() {
final bottomPadding = MediaQuery.of(context).padding.bottom;
final colorScheme = getEnteColorScheme(context);
+ final isDarkMode = Theme.of(context).brightness == Brightness.dark;
return ConstrainedBox(
constraints: BoxConstraints(
- maxHeight: MediaQuery.of(context).size.height * 0.4,
- ),
+ maxHeight: MediaQuery.of(context).size.height * 0.4,
+ ),
child: Card(
margin: EdgeInsets.zero,
- shape: const RoundedRectangleBorder(
- borderRadius: BorderRadius.only(
+
+ shape: RoundedRectangleBorder(
+ borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
),
+ side: BorderSide(
+ color: colorScheme.strokeMuted.withValues(alpha: 0.1),
+ width: 1,
+ ),
),
+ shadowColor: isDarkMode ? Colors.black.withOpacity(0.7) : Colors.grey.withOpacity(0.5),
elevation: 4,
- color: Theme.of(context).brightness == Brightness.dark
- ? colorScheme.fillFaint
- : colorScheme.backgroundElevated2,
+ color: isDarkMode
+ ? colorScheme.fillFaint
+ : colorScheme.backgroundElevated2,
child: Padding(
- padding: EdgeInsets.fromLTRB(16, 16, 16, 16 + bottomPadding),
+ padding: EdgeInsets.fromLTRB(16, 16, 16, 28 + bottomPadding),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
- Row(
- children: [
- //Select all pill
- Material(
- shape: StadiumBorder(
- side: BorderSide(color: colorScheme.strokeMuted, width: 0.5),
- ),
- color: colorScheme.backgroundElevated2,
- clipBehavior: Clip.antiAlias,
- child: InkWell(
- onTap: () {
- final allVisibleCodeIds =
- _filteredCodes.map((c) => c.secret).toSet();
- _codeDisplayStore.selectedCodeIds.value = allVisibleCodeIds;
- },
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- const Icon(
- Icons.check_circle_outline_outlined,
- color: Colors.grey,
- size: 15,
- ),
- const SizedBox(width: 6),
- Text(context.l10n.selectAll, style: const TextStyle(fontSize: 11)),
- ],
- ),
- ),
- ),
- ),
-
- // Center code logo icon
- Expanded(
- child: ValueListenableBuilder<Set<String>>(
- valueListenable: _codeDisplayStore.selectedCodeIds,
- builder: (context, selectedIds, child) {
- if (selectedIds.isEmpty) {
- return const SizedBox.shrink();
- }
- final selectedCodes = _allCodes
- ?.where((c) => selectedIds.contains(c.secret))
- .toList() ??
- [];
- final codesToShow = selectedCodes.take(3).toList();
- return Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- ...codesToShow.map((code) {
- final iconData = code.display.isCustomIcon
- ? code.display.iconID
- : code.issuer;
- return Padding(
- padding: const EdgeInsets.symmetric(horizontal: 4.0),
- child: IconUtils.instance
- .getIcon(context, iconData.trim(), width: 17),
- );
- }),
- if (selectedIds.length > 3)
- Padding(
- padding: const EdgeInsets.only(left: 4.0),
- child: Text(
- '+${selectedIds.length - 3}',
- style: const TextStyle(),
+ Row(
+ children: [
+ //Select all pill
+ Material(
+ shape: StadiumBorder(
+ side: BorderSide(color: colorScheme.strokeMuted, width: 0.5),
+ ),
+ color: colorScheme.backgroundElevated2,
+ clipBehavior: Clip.antiAlias,
+ child: InkWell(
+ onTap: () {
+ final allVisibleCodeIds =
+ _filteredCodes.map((c) => c.secret).toSet();
+ _codeDisplayStore.selectedCodeIds.value = allVisibleCodeIds;
+ },
+ child: Padding(
+ padding:
+ const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(context.l10n.selectAll,
+ style: const TextStyle(fontSize: 11),),
+ const SizedBox(width: 6),
+ const Icon(
+ Icons.check_circle_outline_outlined,
+ color: Colors.grey,
+ size: 15,
+ ),
+ ],
+ ),
+ ),
+ ),
),
- ),
- ],
- );
- },
- ),
- ),
- // N selected pill
- ValueListenableBuilder<Set<String>>(
- valueListenable: _codeDisplayStore.selectedCodeIds,
- builder: (context, selectedIds, child) {
- return Material(
- shape: StadiumBorder(
- side: BorderSide(color: colorScheme.strokeMuted, width: 0.5),
- ),
- color: colorScheme.backgroundElevated2,
- clipBehavior: Clip.antiAlias,
- child: InkWell(
- onTap: () {
- _codeDisplayStore.clearSelection();
- },
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Text(
- '${selectedIds.length} selected',
- style: const TextStyle(fontSize: 11),
+ // Center code logo icon
+ Expanded(
+ child: ValueListenableBuilder<Set<String>>(
+ valueListenable: _codeDisplayStore.selectedCodeIds,
+ builder: (context, selectedIds, child) {
+ if (selectedIds.isEmpty) {
+ return const SizedBox.shrink();
+ }
+ final selectedCodes = _allCodes
+ ?.where((c) => selectedIds.contains(c.secret))
+ .toList() ??
+ [];
+ final codesToShow = selectedCodes.take(3).toList();
+ return Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ ...codesToShow.map((code) {
+ final iconData = code.display.isCustomIcon
+ ? code.display.iconID
+ : code.issuer;
+ return Padding(
+ padding:
+ const EdgeInsets.symmetric(horizontal: 4.0),
+ child: IconUtils.instance
+ .getIcon(context, iconData.trim(), width: 17),
+ );
+ }),
+ if (selectedIds.length > 3)
+ Padding(
+ padding: const EdgeInsets.only(left: 4.0),
+ child: Text(
+ '+${selectedIds.length - 3}',
+ style: const TextStyle(),
+ ),
+ ),
+ ],
+ );
+ },
+ ),
),
- const SizedBox(width: 6),
- const Icon(
- Icons.close,
- size: 15,
- color: Colors.grey,
+
+ // N selected pill
+ ValueListenableBuilder<Set<String>>(
+ valueListenable: _codeDisplayStore.selectedCodeIds,
+ builder: (context, selectedIds, child) {
+ return Material(
+ shape: StadiumBorder(
+ side: BorderSide(
+ color: colorScheme.strokeMuted, width: 0.5,),
+ ),
+ color: colorScheme.backgroundElevated2,
+ clipBehavior: Clip.antiAlias,
+ child: InkWell(
+ onTap: () {
+ _codeDisplayStore.clearSelection();
+ },
+ child: Padding(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 12.0, vertical: 8.0,),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ '${selectedIds.length} selected',
+ style: const TextStyle(fontSize: 11),
+ ),
+ const SizedBox(width: 6),
+ const Icon(
+ Icons.close,
+ size: 15,
+ color: Colors.grey,
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ },
),
],
),
- ),
- ),
- );
- },
- ),
- ],
-),
const SizedBox(height: 16),
_buildActionButtons(),
],