-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4592dae
commit e678004
Showing
9 changed files
with
288 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,73 @@ | ||
import SwiftUI | ||
|
||
struct AboutView: View { | ||
|
||
let icon: NSImage | ||
let name: String | ||
let version: String | ||
let build: String | ||
let developerName: String | ||
@State private var revealDetails = true | ||
|
||
var body: some View { | ||
|
||
VStack { | ||
HStack(alignment: .top) { | ||
VStack(alignment: .center){ | ||
Image(nsImage: icon) | ||
.padding() | ||
.padding(.bottom, 5) | ||
HStack(alignment: .center){ | ||
Button | ||
{ | ||
NSWorkspace.shared.open(URL(string: "https://github.com/alienator88/Viz")!) | ||
} label: { | ||
Label("alienator88", systemImage: "ellipsis.curlybraces") | ||
} | ||
} | ||
|
||
Spacer() | ||
} | ||
|
||
VStack(alignment: .leading) { | ||
HStack(alignment: .firstTextBaseline) { | ||
Text(name) | ||
.font(.title) | ||
.bold() | ||
.foregroundStyle( | ||
LinearGradient( | ||
colors: [.purple, .pink, .blue], | ||
startPoint: .leading, | ||
endPoint: .trailing | ||
) | ||
) | ||
Spacer() | ||
HStack { | ||
Text("v\(version)") | ||
Text(" (build \(build))") | ||
} | ||
// .foregroundStyle( | ||
// LinearGradient( | ||
// colors: [.purple, .pink, .orange], | ||
// startPoint: .leading, | ||
// endPoint: .trailing | ||
// ) | ||
// ) | ||
|
||
|
||
} | ||
Divider() | ||
.padding(.top, -8) | ||
HStack{ | ||
Text("Developed by:") | ||
.bold() | ||
.padding(.bottom, 2) | ||
Text(developerName) | ||
.padding(.bottom, 2) | ||
} | ||
|
||
|
||
DisclosureGroup(isExpanded: $revealDetails) | ||
{ | ||
List | ||
{ | ||
|
||
HStack{ | ||
VStack(alignment: .leading){ | ||
Text("App Icon") | ||
Text("ChatGPT").font(.footnote) | ||
} | ||
Spacer() | ||
// Button | ||
// { | ||
// NSWorkspace.shared.open(URL(string: "https://www.freepik.com/free-vector/classic-spartan-helmet-with-gradient-style_3272693.htm")!) | ||
// } label: { | ||
// Label("Site", systemImage: "paperplane") | ||
// } | ||
} | ||
|
||
} | ||
.listStyle(.bordered(alternatesRowBackgrounds: true)) | ||
.frame( | ||
minWidth: 0, | ||
maxWidth: .infinity, | ||
idealHeight: 80 | ||
) | ||
} label: { | ||
Text("Acknowledgements") | ||
} | ||
|
||
|
||
Spacer() | ||
|
||
} | ||
.padding(EdgeInsets(top: 20, leading: 0, bottom: 0, trailing: 30)) | ||
Image(nsImage: icon) | ||
.padding() | ||
// .padding(.bottom, 5) | ||
|
||
Text(name) | ||
.font(.title) | ||
.bold() | ||
.foregroundStyle( | ||
LinearGradient( | ||
colors: [.red, .purple, .blue], | ||
startPoint: .leading, | ||
endPoint: .trailing | ||
) | ||
) | ||
|
||
Text("Version \(version) (Build \(build))") | ||
.padding(.top, 4) | ||
|
||
Spacer() | ||
|
||
// Divider() | ||
// .padding(.vertical) | ||
|
||
// HStack() { | ||
// Text("Resources").font(.title2).bold() | ||
// Spacer() | ||
// } | ||
// .padding() | ||
// | ||
// HStack{ | ||
// VStack(alignment: .leading){ | ||
// Text("App Icon") | ||
// Text("ChatGPT").font(.footnote) | ||
// } | ||
// Spacer() | ||
// Button | ||
// { | ||
// NSWorkspace.shared.open(URL(string: "https://www.freepik.com/free-vector/classic-spartan-helmet-with-gradient-style_3272693.htm")!) | ||
// } label: { | ||
// Label("Site", systemImage: "paperplane") | ||
// } | ||
// } | ||
// .padding() | ||
|
||
HStack(spacing: 0){ | ||
Spacer() | ||
Text("Made with ❤️ by ") | ||
Text("\(developerName) (dev@itsalin.com)") | ||
.bold() | ||
Spacer() | ||
} | ||
.padding() | ||
|
||
|
||
} | ||
.padding() | ||
.frame(maxWidth: .infinity, maxHeight: .infinity) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
</plist> |
Oops, something went wrong.