forked from shadowfacts/Tusker
Add icons to About screen links
This commit is contained in:
parent
8b7c78e3b1
commit
6ebcc162e6
|
@ -45,7 +45,9 @@ struct AboutView: View {
|
|||
.appGroupedListRowBackground()
|
||||
|
||||
Section {
|
||||
Link("Website", destination: URL(string: "https://vaccor.space/tusker")!)
|
||||
Link(destination: URL(string: "https://vaccor.space/tusker")!) {
|
||||
Label("Website", systemImage: "safari")
|
||||
}
|
||||
Button {
|
||||
if MFMailComposeViewController.canSendMail() {
|
||||
Task {
|
||||
|
@ -56,7 +58,7 @@ struct AboutView: View {
|
|||
}
|
||||
} label: {
|
||||
HStack {
|
||||
Text("Get Support")
|
||||
Label("Get Support", systemImage: "envelope")
|
||||
Spacer()
|
||||
if isGettingLogData {
|
||||
ProgressView()
|
||||
|
@ -65,9 +67,14 @@ struct AboutView: View {
|
|||
}
|
||||
}
|
||||
.disabled(isGettingLogData)
|
||||
Link("Source Code", destination: URL(string: "https://git.shadowfacts.net/shadowfacts/Tusker")!)
|
||||
Link("Issue Tracker", destination: URL(string: "https://git.shadowfacts.net/shadowfacts/Tusker/issues")!)
|
||||
Link(destination: URL(string: "https://git.shadowfacts.net/shadowfacts/Tusker")!) {
|
||||
Label("Source Code", systemImage: "curlybraces")
|
||||
}
|
||||
Link(destination: URL(string: "https://git.shadowfacts.net/shadowfacts/Tusker/issues")!) {
|
||||
Label("Issue Tracker", systemImage: "checklist")
|
||||
}
|
||||
}
|
||||
.labelStyle(AboutLinksLabelStyle())
|
||||
.appGroupedListRowBackground()
|
||||
}
|
||||
.listStyle(.insetGrouped)
|
||||
|
@ -166,6 +173,15 @@ private struct MailSheet: UIViewControllerRepresentable {
|
|||
}
|
||||
}
|
||||
|
||||
private struct AboutLinksLabelStyle: LabelStyle {
|
||||
func makeBody(configuration: Configuration) -> some View {
|
||||
HStack(alignment: .lastTextBaseline, spacing: 8) {
|
||||
configuration.icon
|
||||
configuration.title
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct AboutView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
AboutView()
|
||||
|
|
Loading…
Reference in New Issue