forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppInfoView.swift
More file actions
36 lines (31 loc) · 1.03 KB
/
AppInfoView.swift
File metadata and controls
36 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import SwiftUI
struct AppInfoView: View {
@State var appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
var body: some View {
Section {
VStack(alignment: .leading) {
HStack(alignment: .top) {
Text("Copilot For Xcode")
.font(.title)
Text(appVersion ?? "")
.font(.footnote)
.foregroundColor(.white.opacity(0.5))
Spacer()
}
Link(destination: URL(string: "https://github.com/intitni/CopilotForXcode")!) {
HStack(spacing: 2) {
Image(systemName: "link")
Text("GitHub")
}
}
.focusable(false)
}
}
}
}
struct AppInfoView_Preview: PreviewProvider {
static var previews: some View {
AppInfoView()
.background(.black)
}
}