Activity menu: add cellular row, replace Retry header with Clear Errors

- Adds cellular row (antenna icon) below Wi-Fi in connection status section;
  orange when active, muted when not in use
- Replaces "Retry Failed" header button in errors section with "Clear Errors"
  (destructive, calls clearErrorHistory); retry action retained in error detail sheet

Co-Authored-By: Kutesir <kutesir@provoc.ug>
Co-Authored-By: Sentry <sentry@provoc.ug>
This commit is contained in:
Robin Kutesa
2026-05-18 23:42:43 +03:00
parent 9cb1bc29ca
commit 777024e9c7

View File

@@ -193,6 +193,31 @@ struct AppMenuView: View {
.padding(.horizontal, AppTheme.cardPad)
.padding(.vertical, 14)
menuHairline
// Cellular row
HStack(spacing: 12) {
iconBadge("antenna.radiowaves.left.and.right", color: lanMonitor.isOnCellular ? Color(red: 1.0, green: 0.58, blue: 0.0) : AppTheme.inkSecondary)
VStack(alignment: .leading, spacing: 2) {
Text("Cellular")
.font(AppTheme.body())
.foregroundStyle(AppTheme.ink)
Text(lanMonitor.isOnCellular ? "Active" : "Not in use")
.font(AppTheme.micro())
.foregroundStyle(AppTheme.inkTertiary)
}
Spacer()
statusBadge(
label: lanMonitor.isOnCellular ? "Active" : "Off",
color: lanMonitor.isOnCellular ? Color(red: 1.0, green: 0.58, blue: 0.0) : AppTheme.inkQuaternary
)
}
.padding(.horizontal, AppTheme.cardPad)
.padding(.vertical, 14)
if lanMonitor.isTailscaleActive {
menuHairline
@@ -338,13 +363,13 @@ struct AppMenuView: View {
HStack {
menuSectionLabel("ERRORS")
Spacer()
if !engine.job.status.isActive {
if !errorEntries.isEmpty {
Button {
retryBackup()
store.clearErrorHistory()
} label: {
Label("Retry Failed", systemImage: "arrow.clockwise")
Label("Clear Errors", systemImage: "trash")
.font(.system(size: 11, weight: .medium))
.foregroundStyle(AppTheme.interactive)
.foregroundStyle(AppTheme.destructive)
}
}
}