system overview is cleaner now

This commit is contained in:
Stefan Lange-Hegermann
2025-10-29 10:22:54 +01:00
parent 10dc0e4fa9
commit 45a462295d
9 changed files with 48 additions and 28 deletions

View File

@@ -35,30 +35,7 @@ struct SystemOverviewView: View {
VStack(alignment: .leading, spacing: 16) {
Text(systemOverviewTitle)
.font(.headline.weight(.semibold))
HStack(spacing: 14) {
ZStack {
RoundedRectangle(cornerRadius: 12, style: .continuous)
.fill(Color.componentColor(named: system.colorName))
.frame(width: 54, height: 54)
Image(systemName: system.iconName)
.font(.system(size: 24, weight: .semibold))
.foregroundStyle(Color.white)
}
VStack(alignment: .leading, spacing: 6) {
Text(system.name)
.font(.title3.weight(.semibold))
.lineLimit(2)
.multilineTextAlignment(.leading)
if !system.location.isEmpty {
Label(system.location, systemImage: "mappin.and.ellipse")
.font(.subheadline)
.foregroundStyle(.secondary)
.labelStyle(.titleAndIcon)
}
}
Spacer()
}
ViewThatFits(in: .horizontal) {
HStack(spacing: 16) {
@@ -290,7 +267,6 @@ struct SystemOverviewView: View {
.foregroundStyle(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
Button(action: onCreateBattery) {
Label(batteryEmptyCreateAction, systemImage: "plus")
.frame(maxWidth: .infinity)