Match storage stats to stats strip — plain inline, no card background

Removed gray card background/clipShape. storageStat now uses
30pt light monospacedDigit with statDividers, identical to
compactStat on page 0. Consistent design across all pages.

Co-Authored-By: Kutesir <kutesir@provoc.ug>
Co-Authored-By: Sentry <sentry@provoc.ug>
This commit is contained in:
Robin Kutesa
2026-05-21 14:44:38 +03:00
parent 54b8ac59be
commit 5f98dfc15c

View File

@@ -872,26 +872,17 @@ struct BackupView: View {
@ViewBuilder @ViewBuilder
private var page1BelowContent: some View { private var page1BelowContent: some View {
// Storage stats card // Storage stats plain inline, matches stats strip design
HStack(spacing: 0) { HStack(spacing: 0) {
storageStat(String(format: "%.0f GB", deviceUsedGB), label: "USED", storageStat(String(format: "%.0f GB", deviceUsedGB), label: "USED",
color: Color(red: 1.0, green: 0.58, blue: 0.0)) color: Color(red: 1.0, green: 0.58, blue: 0.0))
Rectangle() statDivider
.fill(AppTheme.separator.opacity(0.35))
.frame(width: 0.5)
.padding(.vertical, 14)
storageStat(String(format: "%.0f GB", deviceFreeGB), label: "FREE", storageStat(String(format: "%.0f GB", deviceFreeGB), label: "FREE",
color: AppTheme.inkSecondary) color: AppTheme.inkSecondary)
Rectangle() statDivider
.fill(AppTheme.separator.opacity(0.35))
.frame(width: 0.5)
.padding(.vertical, 14)
storageStat(String(format: "%.1f GB", junkGB), label: "JUNK", storageStat(String(format: "%.1f GB", junkGB), label: "JUNK",
color: AppTheme.positive) color: AppTheme.positive)
} }
.frame(maxWidth: .infinity)
.background(AppTheme.surfaceSunken)
.clipShape(RoundedRectangle(cornerRadius: 18, style: .continuous))
.padding(.horizontal, AppTheme.hPad) .padding(.horizontal, AppTheme.hPad)
.padding(.bottom, 18) .padding(.bottom, 18)
@@ -996,18 +987,17 @@ struct BackupView: View {
// MARK: Storage helpers // MARK: Storage helpers
private func storageStat(_ value: String, label: String, color: Color) -> some View { private func storageStat(_ value: String, label: String, color: Color) -> some View {
VStack(spacing: 6) { VStack(spacing: 4) {
Text(value) Text(value)
.font(.system(size: 36, weight: .light)) .font(.system(size: 30, weight: .light))
.foregroundStyle(color) .foregroundStyle(color)
.monospacedDigit() .monospacedDigit()
Text(label) Text(label)
.font(.system(size: 10, weight: .regular, design: .monospaced)) .font(.system(size: 10, weight: .regular))
.foregroundStyle(AppTheme.inkQuaternary) .foregroundStyle(AppTheme.inkQuaternary)
.tracking(1.5)
} }
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.padding(.vertical, 22) .padding(.vertical, 8)
} }
private func storageLegend(color: Color, label: String) -> some View { private func storageLegend(color: Color, label: String) -> some View {