Consolidates the mac.oai.pm subdomain references (introduced in the PolyForm Noncommercial relicense) to the root oai.pm domain, across the LICENSE file, README, and all Swift source file headers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
93 lines
2.7 KiB
Swift
93 lines
2.7 KiB
Swift
//
|
|
// AboutView.swift
|
|
// oAI
|
|
//
|
|
// About modal with app icon and version info
|
|
//
|
|
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0
|
|
// Copyright (C) 2026 Rune Olsen
|
|
//
|
|
// This file is part of oAI.
|
|
//
|
|
// oAI is licensed under the PolyForm Noncommercial License 1.0.0.
|
|
// You may use, study, modify, and share it for any noncommercial
|
|
// purpose. Commercial use — including selling oAI or any part of
|
|
// it, standalone or bundled into another product or service —
|
|
// requires a separate commercial license from the copyright holder.
|
|
//
|
|
// See the LICENSE file or
|
|
// <https://polyformproject.org/licenses/noncommercial/1.0.0> for
|
|
// the full license text. For commercial licensing, contact Rune
|
|
// Olsen via <https://oai.pm>.
|
|
|
|
|
|
import SwiftUI
|
|
|
|
struct AboutView: View {
|
|
@Environment(\.dismiss) var dismiss
|
|
|
|
private var appVersion: String {
|
|
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "1.0"
|
|
}
|
|
|
|
private var buildNumber: String {
|
|
Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "1"
|
|
}
|
|
|
|
var body: some View {
|
|
VStack(spacing: 16) {
|
|
Spacer().frame(height: 8)
|
|
|
|
Image("AppLogo")
|
|
.resizable()
|
|
.aspectRatio(contentMode: .fit)
|
|
.frame(width: 128, height: 128)
|
|
.clipShape(RoundedRectangle(cornerRadius: 24))
|
|
.shadow(color: .cyan.opacity(0.3), radius: 12)
|
|
|
|
Text("oAI")
|
|
.font(.system(size: 28, weight: .bold))
|
|
|
|
Text("Version \(appVersion) (\(buildNumber))")
|
|
.font(.callout)
|
|
.foregroundStyle(.secondary)
|
|
|
|
Text("Multi-provider AI chat client")
|
|
.font(.subheadline)
|
|
.foregroundStyle(.secondary)
|
|
|
|
Divider()
|
|
.padding(.horizontal, 40)
|
|
|
|
VStack(spacing: 4) {
|
|
Text("© 2026 [Rune Olsen](https://blog.rune.pm)")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
|
|
Text("[PolyForm Noncommercial License 1.0.0](https://polyformproject.org/licenses/noncommercial/1.0.0)")
|
|
.font(.caption)
|
|
.foregroundStyle(.secondary)
|
|
|
|
Text("Built with SwiftUI")
|
|
.font(.caption)
|
|
.foregroundStyle(.tertiary)
|
|
}
|
|
|
|
Spacer().frame(height: 4)
|
|
|
|
Button("OK") { dismiss() }
|
|
.keyboardShortcut(.return, modifiers: [])
|
|
.keyboardShortcut(.escape, modifiers: [])
|
|
.buttonStyle(.borderedProminent)
|
|
.controlSize(.regular)
|
|
|
|
Spacer().frame(height: 20)
|
|
}
|
|
.frame(width: 320, height: 390)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
AboutView()
|
|
}
|