From 9c317d89a39d0871f15f8282aec6c7f3dde7768c Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Fri, 26 Jun 2026 22:42:44 +0800
Subject: [PATCH] Polish Pro status UI and app grid layout
---
src/Apptag/ProAccessViews.swift | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/Apptag/ProAccessViews.swift b/src/Apptag/ProAccessViews.swift
index 1d4bcd6..51c1daa 100644
--- a/src/Apptag/ProAccessViews.swift
+++ b/src/Apptag/ProAccessViews.swift
@@ -14,7 +14,14 @@
var compact = false
var body: some View {
- Text(text)
+ HStack(spacing: compact ? 4 : 5) {
+ if showsCrown {
+ Image(systemName: "crown.fill")
+ .font(.system(size: compact ? 9 : 10, weight: .bold))
+ }
+
+ Text(text)
+ }
.font(.system(size: compact ? 10 : 11, weight: .semibold))
.foregroundStyle(foregroundColor)
.lineLimit(1)
@@ -33,11 +40,11 @@
private var foregroundColor: Color {
switch style {
case .locked:
- return Color.accentColor
+ return Color(red: 0.56, green: 0.35, blue: 0.03)
case .preview:
return Color(red: 0.30, green: 0.22, blue: 0.08)
case .unlocked, .legacy:
- return Color(red: 0.10, green: 0.42, blue: 0.24)
+ return Color(red: 0.56, green: 0.35, blue: 0.03)
case .neutral:
return .secondary
}
@@ -46,11 +53,11 @@
private var backgroundColor: Color {
switch style {
case .locked:
- return Color.accentColor.opacity(0.10)
+ return Color(red: 1.0, green: 0.78, blue: 0.22).opacity(0.18)
case .preview:
return Color.orange.opacity(0.14)
case .unlocked, .legacy:
- return Color.green.opacity(0.12)
+ return Color(red: 1.0, green: 0.78, blue: 0.22).opacity(0.18)
case .neutral:
return Color.secondary.opacity(0.10)
}
@@ -59,15 +66,24 @@
private var strokeColor: Color {
switch style {
case .locked:
- return Color.accentColor.opacity(0.26)
+ return Color(red: 0.93, green: 0.62, blue: 0.10).opacity(0.42)
case .preview:
return Color.orange.opacity(0.28)
case .unlocked, .legacy:
- return Color.green.opacity(0.26)
+ return Color(red: 0.93, green: 0.62, blue: 0.10).opacity(0.42)
case .neutral:
return Color.secondary.opacity(0.18)
}
}
+
+ private var showsCrown: Bool {
+ switch style {
+ case .locked, .unlocked, .legacy:
+ return text.localizedCaseInsensitiveContains("Pro")
+ case .preview, .neutral:
+ return false
+ }
+ }
}
extension ProFeature {
--
Gitblit v1.9.3