Use strict concurrency checking in Xcode 14 to find misuses with Swift concurrency. Cleanup files and rearrange them along with fixing comment headers. Signed-off-by: kingbri <bdashore3@proton.me>
38 lines
913 B
Swift
38 lines
913 B
Swift
//
|
|
// SourceCatalogButtonView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 8/5/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SourceCatalogButtonView: View {
|
|
@EnvironmentObject var sourceManager: SourceManager
|
|
|
|
let availableSource: SourceJson
|
|
|
|
var body: some View {
|
|
HStack {
|
|
VStack(alignment: .leading, spacing: 5) {
|
|
HStack {
|
|
Text(availableSource.name)
|
|
Text("v\(availableSource.version)")
|
|
.foregroundColor(.secondary)
|
|
}
|
|
|
|
Text("by \(availableSource.author ?? "Unknown")")
|
|
.foregroundColor(.secondary)
|
|
}
|
|
|
|
Spacer()
|
|
|
|
Button("Install") {
|
|
Task {
|
|
await sourceManager.installSource(sourceJson: availableSource)
|
|
}
|
|
}
|
|
}
|
|
.padding(.vertical, 2)
|
|
}
|
|
}
|