Skip to content

Commit

Permalink
v1.1 - Missed something
Browse files Browse the repository at this point in the history
  • Loading branch information
alienator88 committed Apr 10, 2024
1 parent 4592dae commit e678004
Show file tree
Hide file tree
Showing 9 changed files with 288 additions and 166 deletions.
16 changes: 12 additions & 4 deletions Viz.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
C73944BD2BC449C800EE7EBF /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C73944BB2BC449C800EE7EBF /* AboutView.swift */; };
C73944BE2BC449C800EE7EBF /* AboutWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = C73944BC2BC449C800EE7EBF /* AboutWindow.swift */; };
C73944C32BC4756800EE7EBF /* Magnet in Frameworks */ = {isa = PBXBuildFile; productRef = C73944C22BC4756800EE7EBF /* Magnet */; };
C76920112BC5EB5E00D23CEC /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C76920102BC5EB5E00D23CEC /* MainView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -39,6 +40,8 @@
C73944B82BC4499700EE7EBF /* AboutCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutCommand.swift; sourceTree = "<group>"; };
C73944BB2BC449C800EE7EBF /* AboutView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
C73944BC2BC449C800EE7EBF /* AboutWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutWindow.swift; sourceTree = "<group>"; };
C76920102BC5EB5E00D23CEC /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
C7FD442B2BC5CADF00777BEF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -72,6 +75,7 @@
C7174C922BC06EE500DBEF75 /* Viz */ = {
isa = PBXGroup;
children = (
C7FD442B2BC5CADF00777BEF /* Info.plist */,
C73944BA2BC449BA00EE7EBF /* About Window */,
C73944AF2BC447B600EE7EBF /* Updater */,
C7174C932BC06EE500DBEF75 /* VizApp.swift */,
Expand All @@ -82,6 +86,7 @@
C7174CAE2BC0C14900DBEF75 /* printscreen.mp3 */,
C7174CB02BC0C6A800DBEF75 /* Utilities.swift */,
C73944B62BC4489C00EE7EBF /* AppState.swift */,
C76920102BC5EB5E00D23CEC /* MainView.swift */,
);
path = Viz;
sourceTree = "<group>";
Expand Down Expand Up @@ -183,6 +188,7 @@
buildActionMask = 2147483647;
files = (
C7174CA32BC06F1200DBEF75 /* OCR.swift in Sources */,
C76920112BC5EB5E00D23CEC /* MainView.swift in Sources */,
C73944B92BC4499700EE7EBF /* AboutCommand.swift in Sources */,
C7174CAB2BC0A52100DBEF75 /* PreviewWindow.swift in Sources */,
C73944B32BC4487700EE7EBF /* NewWin.swift in Sources */,
Expand Down Expand Up @@ -325,12 +331,13 @@
CODE_SIGN_ENTITLEMENTS = Viz/Viz.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BK8443AXLU;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Viz/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Viz;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_LSUIElement = YES;
Expand All @@ -340,7 +347,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Viz;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -356,12 +363,13 @@
CODE_SIGN_ENTITLEMENTS = Viz/Viz.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BK8443AXLU;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Viz/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Viz;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_LSUIElement = YES;
Expand All @@ -371,7 +379,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 1.0;
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.alienator88.Viz;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
147 changes: 56 additions & 91 deletions Viz/About Window/AboutView.swift
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)
}
}
6 changes: 3 additions & 3 deletions Viz/About Window/AboutWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class AboutWindow: NSWindowController {
let visualEffect = NSVisualEffectView()
visualEffect.blendingMode = .behindWindow
visualEffect.state = .active
visualEffect.material = .underWindowBackground
visualEffect.material = .sidebar

let contentView = makeAboutView()

let hostView = NSHostingView(rootView: contentView)
Expand All @@ -37,7 +37,7 @@ class AboutWindow: NSWindowController {
}

private static func makeWindow() -> NSWindow {
let contentRect = NSRect(x: 0, y: 0, width: 500, height: 260)
let contentRect = NSRect(x: 0, y: 0, width: 400, height: 400)
let styleMask: NSWindow.StyleMask = [
.titled,
.closable,
Expand Down
5 changes: 5 additions & 0 deletions Viz/Info.plist
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>
Loading

0 comments on commit e678004

Please sign in to comment.