comparison Simoleon/AboutView.swift @ 187:13d5a8deb6c2

add AboutView and FavoritesView
author Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com>
date Thu, 23 Dec 2021 16:12:22 +0100
parents
children
comparison
equal deleted inserted replaced
186:1ebd1c5dd302 187:13d5a8deb6c2
1 //
2 // AboutView.swift
3 // Simoleon
4 //
5 // Created by Dennis Concepción Martín on 23/12/21.
6 //
7
8 import SwiftUI
9
10 struct AboutView: View {
11 var body: some View {
12 Form {
13 let footerString = "This open source app was made by Dennis"
14 Section(footer: Text(footerString)) {
15 Link(destination: URL(string: "https://dennistech.io")!) {
16 Label {
17 Text("Web")
18 .foregroundColor(.primary)
19 } icon: {
20 Image(systemName: "safari")
21 .imageScale(.large)
22 }
23 }
24
25 Link(destination: URL(string: "https://twitter.com/dennisconcep")!) {
26 Label {
27 Text("Twitter")
28 .foregroundColor(.primary)
29 } icon: {
30 Image(systemName: "link")
31 .imageScale(.large)
32 }
33 }
34
35 Link(destination: URL(string: "https://github.com/denniscm190/simoleon")!) {
36 Label {
37 Text("Github")
38 .foregroundColor(.primary)
39 } icon: {
40 Image(systemName: "externaldrive.connected.to.line.below")
41 .imageScale(.large)
42 }
43 }
44 }
45 }
46 .navigationTitle("About")
47 .if(UIDevice.current.userInterfaceIdiom == .phone) { content in
48 NavigationView { content }
49 }
50 }
51 }
52
53 struct AboutView_Previews: PreviewProvider {
54 static var previews: some View {
55 AboutView()
56 }
57 }