Refactor project structure and API

This commit is contained in:
Micha
2025-11-15 19:49:28 +01:00
parent 23ffe1268a
commit 7593a781f2
33 changed files with 966 additions and 404 deletions

42
Views/Rows/InfoRow.swift Normal file
View File

@@ -0,0 +1,42 @@
//
// InfoView.swift
// iKeyMon
//
// Created by tracer on 30.03.25.
//
import SwiftUI
struct InfoRow: View {
var label: String
var value: [String]
var color: Color = .primary
init(label: String, value: String) {
self.label = label
self.value = [value]
}
init(label: String, value: [String]) {
self.label = label
self.value = value
}
var body: some View {
HStack(alignment: .top) {
Text(label)
.foregroundStyle(.secondary)
.frame(width: 160, alignment: .leading)
VStack(alignment: .leading, spacing: 2) {
ForEach(value, id: \.self) { item in
Text(item)
}
}
}
.padding(.vertical, 4)
}
}
#Preview {
InfoRow(label: "Hostname", value: "keyhelp.lab.24unix.net")
}