| | |
| | | } |
| | | switch proEntitlement.accessState { |
| | | case .free: |
| | | return .locked |
| | | return .neutral |
| | | case .purchased: |
| | | return .unlocked |
| | | case .legacy: |
| | |
| | | ) |
| | | } |
| | | |
| | | private var dataProStatusCard: some View { |
| | | private var proStatusCard: some View { |
| | | HStack(alignment: .top, spacing: 18) { |
| | | VStack(alignment: .leading, spacing: 10) { |
| | | HStack(spacing: 10) { |
| | |
| | | Spacer(minLength: 36) |
| | | |
| | | VStack(alignment: .center, spacing: 24) { |
| | | dataProStatusCard |
| | | |
| | | dataSection(minHeight: 124) { |
| | | HStack(alignment: .center, spacing: 12) { |
| | | dataSectionTitle(tr("settings.initialLayout")) |
| | |
| | | case .about: |
| | | // Tab 6: About |
| | | VStack(spacing: 0) { |
| | | Spacer(minLength: 72) |
| | | Spacer(minLength: 44) |
| | | |
| | | HStack { |
| | | if let icon = NSImage(named: NSImage.applicationIconName) { |
| | | Image(nsImage: icon) |
| | | .resizable() |
| | | .frame(width: 128, height: 128) |
| | | } |
| | | VStack(alignment: .leading, spacing: 4) { |
| | | Text("TagLauncher") |
| | | .font(.title2) |
| | | .fontWeight(.semibold) |
| | | Text(tr("app.description")) |
| | | .font(.body) |
| | | .foregroundStyle(.secondary) |
| | | Text("\(tr("app.version")) \(appVersion) (\(tr("app.build")) \(buildVersion))") |
| | | .font(.callout) |
| | | .foregroundStyle(.tertiary) |
| | | VStack(alignment: .center, spacing: 24) { |
| | | proStatusCard |
| | | |
| | | Divider() |
| | | .padding(.vertical, 4) |
| | | |
| | | HStack(spacing: 8) { |
| | | Button { |
| | | NSWorkspace.shared.open(helpPDFURL) |
| | | } label: { |
| | | Label(tr("help.openPDF"), systemImage: "questionmark.circle") |
| | | } |
| | | .buttonStyle(.borderedProminent) |
| | | .controlSize(.regular) |
| | | |
| | | Button { |
| | | NSPasteboard.general.clearContents() |
| | | NSPasteboard.general.setString(helpPDFURL.absoluteString, forType: .string) |
| | | } label: { |
| | | Image(systemName: "link") |
| | | } |
| | | .buttonStyle(.bordered) |
| | | .controlSize(.regular) |
| | | .help(tr("help.copyLink")) |
| | | HStack(alignment: .center, spacing: 24) { |
| | | if let icon = NSImage(named: NSImage.applicationIconName) { |
| | | Image(nsImage: icon) |
| | | .resizable() |
| | | .frame(width: 112, height: 112) |
| | | } |
| | | VStack(alignment: .leading, spacing: 4) { |
| | | Text("TagLauncher") |
| | | .font(.title2) |
| | | .fontWeight(.semibold) |
| | | Text(tr("app.description")) |
| | | .font(.body) |
| | | .foregroundStyle(.secondary) |
| | | Text("\(tr("app.version")) \(appVersion) (\(tr("app.build")) \(buildVersion))") |
| | | .font(.callout) |
| | | .foregroundStyle(.tertiary) |
| | | |
| | | Text(tr("help.currentLanguage")) |
| | | .font(.caption) |
| | | .foregroundStyle(.secondary) |
| | | .padding(.bottom, 2) |
| | | Divider() |
| | | .padding(.vertical, 4) |
| | | |
| | | Text("万物之中,希望最美") |
| | | .font(.caption) |
| | | .foregroundStyle(.secondary) |
| | | Text("永桔@shanghai3168@gmail.com") |
| | | .font(.caption) |
| | | .foregroundStyle(.secondary) |
| | | HStack(spacing: 8) { |
| | | Button { |
| | | NSWorkspace.shared.open(helpPDFURL) |
| | | } label: { |
| | | Label(tr("help.openPDF"), systemImage: "questionmark.circle") |
| | | } |
| | | .buttonStyle(.borderedProminent) |
| | | .controlSize(.regular) |
| | | |
| | | Button { |
| | | NSPasteboard.general.clearContents() |
| | | NSPasteboard.general.setString(helpPDFURL.absoluteString, forType: .string) |
| | | } label: { |
| | | Image(systemName: "link") |
| | | } |
| | | .buttonStyle(.bordered) |
| | | .controlSize(.regular) |
| | | .help(tr("help.copyLink")) |
| | | } |
| | | |
| | | Text(tr("help.currentLanguage")) |
| | | .font(.caption) |
| | | .foregroundStyle(.secondary) |
| | | .padding(.bottom, 2) |
| | | |
| | | Text("万物之中,希望最美") |
| | | .font(.caption) |
| | | .foregroundStyle(.secondary) |
| | | Text("永桔@shanghai3168@gmail.com") |
| | | .font(.caption) |
| | | .foregroundStyle(.secondary) |
| | | } |
| | | } |
| | | .frame(width: dataPanelWidth, alignment: .leading) |
| | | } |
| | | .frame(width: 560, alignment: .leading) |
| | | .frame(width: dataPanelWidth, alignment: .center) |
| | | |
| | | Spacer(minLength: 30) |
| | | Spacer(minLength: 18) |