Switch to gRPC client in Swift app
Some checks are pending
Build AppImage / Build AppImage (push) Waiting to run
Build Apple Apps / Build App (iOS) (push) Waiting to run
Build Apple Apps / Build App (iOS Simulator) (push) Waiting to run
Build Apple Apps / Build App (macOS) (push) Waiting to run
Build Docker / Build Docker Image (push) Waiting to run
Build Rust Crate / Build Crate (macOS (Intel)) (push) Waiting to run
Build Rust Crate / Build Crate (macOS) (push) Waiting to run
Build Rust Crate / Build Crate (Linux) (push) Waiting to run
Build Rust Crate / Build Crate (Windows) (push) Waiting to run

This commit is contained in:
Conrad Kramer 2024-07-13 18:08:43 -07:00
parent 25a0f7c421
commit 85640ffce1
93 changed files with 1666 additions and 1327 deletions

View file

@ -1,38 +0,0 @@
import SwiftUI
struct NetworkView<Content: View>: View {
var color: Color
var content: () -> Content
private var gradient: LinearGradient {
LinearGradient(
colors: [
color.opacity(0.8),
color
],
startPoint: .init(x: 0.2, y: 0),
endPoint: .init(x: 0.8, y: 1)
)
}
var body: some View {
content()
.frame(maxWidth: .infinity, minHeight: 175, maxHeight: 175)
.background(
RoundedRectangle(cornerRadius: 10)
.fill(gradient)
.background(
RoundedRectangle(cornerRadius: 10)
.fill(.white)
)
)
.shadow(color: .black.opacity(0.1), radius: 3.0, x: 0, y: 2)
}
}
extension NetworkView where Content == AnyView {
init(network: any Network) {
color = network.backgroundColor
content = { AnyView(network.label) }
}
}