Skip to content

armgit / ente

Public Imported from GitHub
0

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

tweak: rename heatmap card to weekly pulse

laurenspriemc0904325c061
diff --git a/mobile/apps/photos/lib/services/wrapped/builders/stats_candidate_builder.dart b/mobile/apps/photos/lib/services/wrapped/builders/stats_candidate_builder.dart
index 23ac1089fe..e6b7b91cfd 100644
--- a/mobile/apps/photos/lib/services/wrapped/builders/stats_candidate_builder.dart
+++ b/mobile/apps/photos/lib/services/wrapped/builders/stats_candidate_builder.dart
@@ -342,7 +342,7 @@ class StatsCandidateBuilder extends WrappedCandidateBuilder {
return <WrappedCard>[
WrappedCard(
type: WrappedCardType.statsHeatmap,
- title: "Season rhythm",
+ title: "Weekly pulse",
subtitle: subtitleText,
meta: meta,
),
diff --git a/mobile/apps/photos/lib/ui/wrapped/cards/stats_card_content.dart b/mobile/apps/photos/lib/ui/wrapped/cards/stats_card_content.dart
index e9d9fae0a7..cb43d64254 100644
--- a/mobile/apps/photos/lib/ui/wrapped/cards/stats_card_content.dart
+++ b/mobile/apps/photos/lib/ui/wrapped/cards/stats_card_content.dart
@@ -1023,13 +1023,16 @@ class _HeatmapCardContent extends StatelessWidget {
colorScheme: colorScheme,
)
else
- _YearHeatmap(
- grid: grid,
- weekLabels: weekLabels,
- weekdayLabels: weekdayLabels,
- maxCount: maxCount,
+ _HeatmapBackground(
colorScheme: colorScheme,
- textTheme: textTheme,
+ child: _YearHeatmap(
+ grid: grid,
+ weekLabels: weekLabels,
+ weekdayLabels: weekdayLabels,
+ maxCount: maxCount,
+ colorScheme: colorScheme,
+ textTheme: textTheme,
+ ),
),
if (chips.isNotEmpty) ...[
const SizedBox(height: 16),
@@ -1213,6 +1216,36 @@ class _YearHeatmap extends StatelessWidget {
}
}
+class _HeatmapBackground extends StatelessWidget {
+ const _HeatmapBackground({
+ required this.child,
+ required this.colorScheme,
+ });
+
+ final Widget child;
+ final EnteColorScheme colorScheme;
+
+ @override
+ Widget build(BuildContext context) {
+ final Color base = Colors.black.withValues(alpha: 0.32);
+ final Color border = Colors.white.withValues(alpha: 0.16);
+ return DecoratedBox(
+ decoration: BoxDecoration(
+ color: base,
+ borderRadius: BorderRadius.circular(16),
+ border: Border.all(
+ color: border,
+ strokeAlign: BorderSide.strokeAlignInside,
+ ),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(16, 18, 16, 12),
+ child: child,
+ ),
+ );
+ }
+}
+
class _HeatmapCell extends StatelessWidget {
const _HeatmapCell({
required this.value,