macOS CI / build-and-test (push) Skipped
- Add LicenseWindowView.swift with ICCery license, ArgyllCMS AGPLv3 license (from bundled License.txt), and attribution links to upstream and Gronod fork - Add "View Licenses" button to AboutView.swift that opens license window as sheet - Update fetch-argyll.sh to copy License.txt to Vendor/Argyll/ root - Add UI tests for license window content, links, and AGPL isolation note The license window includes: - ICCery license text (embedded from LICENCE.md) - ArgyllCMS AGPLv3 license (dynamically loaded from bundled Resources/Argyll/License.txt) - Attribution to Graeme Gill with link to argyllcms.com - Attribution to Gronod fork with link to git.i3omb.com/gronod/argyllcms - AGPL subprocess isolation note
82 lines
2.6 KiB
Swift
82 lines
2.6 KiB
Swift
import AppKit
|
|
import SwiftUI
|
|
import ICCeryCore
|
|
|
|
/// About dialog for ICCery (issue #31, docs/21 §Modals).
|
|
struct AboutView: View {
|
|
let onClose: () -> Void
|
|
|
|
@State private var showingLicenses = false
|
|
|
|
private let info = ArtefactFiles.appInfo()
|
|
|
|
var body: some View {
|
|
VStack(spacing: 20) {
|
|
if let icon = NSImage(named: NSImage.applicationIconName) {
|
|
Image(nsImage: icon)
|
|
.resizable()
|
|
.scaledToFit()
|
|
.frame(height: 64)
|
|
}
|
|
|
|
Text("ICCery")
|
|
.font(.title)
|
|
.foregroundStyle(Theme.text)
|
|
|
|
VStack(alignment: .leading, spacing: 4) {
|
|
HStack {
|
|
Text("Version:")
|
|
.foregroundStyle(.secondary)
|
|
Text(info.version)
|
|
.foregroundStyle(Theme.text)
|
|
.accessibilityIdentifier("aboutVersion")
|
|
}
|
|
.accessibilityElement(children: .contain)
|
|
HStack {
|
|
Text("Build:")
|
|
.foregroundStyle(.secondary)
|
|
Text(info.build)
|
|
.foregroundStyle(Theme.text)
|
|
}
|
|
.accessibilityElement(children: .contain)
|
|
HStack {
|
|
Text("Build date:")
|
|
.foregroundStyle(.secondary)
|
|
Text(info.buildDate)
|
|
.foregroundStyle(Theme.text)
|
|
.accessibilityIdentifier("aboutBuildDate")
|
|
}
|
|
.accessibilityElement(children: .contain)
|
|
}
|
|
.font(.callout)
|
|
.accessibilityElement(children: .contain)
|
|
|
|
Text("Native macOS printer profiling workstation.")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
.multilineTextAlignment(.center)
|
|
|
|
Button("View Licenses") {
|
|
showingLicenses = true
|
|
}
|
|
.controlSize(.large)
|
|
.accessibilityIdentifier("viewLicensesBtn")
|
|
|
|
Button("Close") {
|
|
onClose()
|
|
}
|
|
.controlSize(.large)
|
|
.keyboardShortcut(.cancelAction)
|
|
.accessibilityIdentifier("closeAboutBtn")
|
|
}
|
|
.padding(32)
|
|
.frame(width: 360)
|
|
.background(Theme.panel)
|
|
.accessibilityElement(children: .contain)
|
|
.accessibilityIdentifier("aboutDialog")
|
|
.sheet(isPresented: $showingLicenses) {
|
|
LicenseWindowView()
|
|
}
|
|
}
|
|
}
|