mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-06 01:37:22 +01:00
About screen. (#707)
This commit is contained in:
@@ -32,6 +32,10 @@ struct Secretive: App {
|
||||
WindowGroup(id: String(describing: IntegrationsView.self)) {
|
||||
IntegrationsView()
|
||||
}
|
||||
WindowGroup(id: String(describing: AboutView.self)) {
|
||||
AboutView()
|
||||
}
|
||||
.windowStyle(.hiddenTitleBar)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,6 +49,11 @@ extension Secretive {
|
||||
@FocusedValue(\.showCreateSecret) var showCreateSecret
|
||||
|
||||
var body: some Commands {
|
||||
CommandGroup(replacing: .appInfo) {
|
||||
Button(.aboutMenuBarTitle, systemImage: "info.circle") {
|
||||
openWindow(id: String(describing: AboutView.self))
|
||||
}
|
||||
}
|
||||
CommandGroup(before: CommandGroupPlacement.appSettings) {
|
||||
Button(.integrationsMenuBarTitle, systemImage: "app.connected.to.app.below.fill") {
|
||||
openWindow(id: String(describing: IntegrationsView.self))
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2580
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6119\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/maxgoedjen/secretive"}}{\fldrslt
|
||||
\f0\fs24 \cf0 GitHub Repository}}
|
||||
\f0\fs24 \
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
\cf0 \
|
||||
{\field{\*\fldinst{HYPERLINK "GITHUB_BUILD_URL"}}{\fldrslt Build Log}}\
|
||||
\
|
||||
Special Thanks To:\
|
||||
\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/maxgoedjen/secretive/graphs/contributors"}}{\fldrslt Contributors}}:\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/0xflotus"}}{\fldrslt 0xflotus}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/aaron-trout"}}{\fldrslt Aaron Trout}}\
|
||||
\pard\pardeftab720\partightenfactor0
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/EppO"}}{\fldrslt \cf0 Florent Monbillard}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/vladimyr"}}{\fldrslt Dario Vladovi\uc0\u263 }}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/lavalleeale"}}{\fldrslt Alex Lavallee}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/joshheyse"}}{\fldrslt Josh}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/diesal11"}}{\fldrslt Dylan Lundy}}\
|
||||
\
|
||||
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
|
||||
\cf0 Testers:\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/bdash"}}{\fldrslt Mark Rowe}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/danielctull"}}{\fldrslt Daniel Tull}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/davedelong"}}{\fldrslt Dave DeLong}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/esttorhe"}}{\fldrslt Esteban Torres}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/joeblau"}}{\fldrslt Joe Blau}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/marksands"}}{\fldrslt Mark Sands}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/mergesort"}}{\fldrslt Joe Fabisevich}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/phillco"}}{\fldrslt Phil Cohen}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/zackdotcomputer"}}{\fldrslt Zack Sheppard}}}
|
||||
@@ -24,6 +24,8 @@
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>$(PRODUCT_NAME) is MIT Licensed.</string>
|
||||
<key>GitHubBuildLog</key>
|
||||
<string>$(CI_BUILD_LINK)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticTermination</key>
|
||||
|
||||
69
Sources/Secretive/Views/Views/AboutView.swift
Normal file
69
Sources/Secretive/Views/Views/AboutView.swift
Normal file
@@ -0,0 +1,69 @@
|
||||
import SwiftUI
|
||||
|
||||
struct AboutView: View {
|
||||
var body: some View {
|
||||
if #available(macOS 15.0, *) {
|
||||
AboutViewContent()
|
||||
.containerBackground(
|
||||
.thinMaterial, for: .window
|
||||
)
|
||||
} else {
|
||||
AboutViewContent()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct AboutViewContent: View {
|
||||
|
||||
@Environment(\.openURL) var openURL
|
||||
var body: some View {
|
||||
VStack(spacing: 10) {
|
||||
HStack {
|
||||
Image(nsImage: NSApplication.shared.applicationIconImage)
|
||||
VStack(alignment: .leading) {
|
||||
Text(verbatim: "Secretive")
|
||||
.font(.system(.largeTitle, weight: .bold))
|
||||
Text("**\(Bundle.main.versionNumber)** (\(Bundle.main.buildNumber))")
|
||||
.fixedSize(horizontal: true, vertical: false)
|
||||
HStack {
|
||||
Button(.aboutViewOnGithubButton) {
|
||||
openURL(URL(string: "https://github.com/maxgoedjen/secretive")!)
|
||||
}
|
||||
.normalButton()
|
||||
Button(.aboutBuildLogButton) {
|
||||
openURL(Bundle.main.buildLog)
|
||||
}
|
||||
.normalButton()
|
||||
}
|
||||
}
|
||||
}
|
||||
Text(.aboutThanks(contributorsLink: "https://github.com/maxgoedjen/secretive/graphs/contributors", sponsorsLink: "https://github.com/sponsors/maxgoedjen"))
|
||||
.font(.headline)
|
||||
Text(.aboutOpenSourceNotice)
|
||||
.font(.subheadline)
|
||||
}
|
||||
.padding(EdgeInsets(top: 10, leading: 30, bottom: 30, trailing: 30))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private extension Bundle {
|
||||
|
||||
var buildLog: URL {
|
||||
URL(string: infoDictionary!["GitHubBuildLog"] as! String)!
|
||||
}
|
||||
|
||||
var versionNumber: String {
|
||||
infoDictionary?["CFBundleShortVersionString"] as? String ?? "0.0.0"
|
||||
}
|
||||
|
||||
var buildNumber: String {
|
||||
infoDictionary?["CFBundleVersion"] as? String ?? "0.0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#Preview {
|
||||
AboutView()
|
||||
.frame(width: 500, height: 250)
|
||||
}
|
||||
Reference in New Issue
Block a user