@@ -26,6 +26,10 @@ struct MainTabView: View {
2626 themeExpansion? . preferredColorScheme ( for: appThemeRaw)
2727 }
2828
29+ private var isAppStoreBuild : Bool {
30+ themeExpansion? . isAppStoreBuild ?? true
31+ }
32+
2933 var body : some View {
3034 ZStack {
3135 // Allow global themed background to show
@@ -64,44 +68,42 @@ struct MainTabView: View {
6468 ZStack {
6569 Color . black. opacity ( 0.001 ) . ignoresSafeArea ( )
6670
67- VStack ( spacing: 20 ) {
68- Text ( " Update Required " )
69- . font ( . title. bold ( ) )
70- . multilineTextAlignment ( . center)
71-
72- Text ( " A new version ( \( latestVersion ?? " unknown " ) ) is available. Please update to continue using the app. " )
73- . multilineTextAlignment ( . center)
74- . font ( . callout)
75- . foregroundColor ( . secondary)
76- . padding ( . horizontal)
77-
78- Button ( action: {
79- if let url = URL ( string: " itms-apps://itunes.apple.com/app/id6744045754 " ) {
80- UIApplication . shared. open ( url)
71+ appGlassCard {
72+ VStack ( spacing: 20 ) {
73+ Text ( " Update Required " )
74+ . font ( . title. bold ( ) )
75+ . multilineTextAlignment ( . center)
76+
77+ Text ( " A new version ( \( latestVersion ?? " unknown " ) ) is available. Please update to continue using the app. " )
78+ . multilineTextAlignment ( . center)
79+ . font ( . callout)
80+ . foregroundColor ( . secondary)
81+ . padding ( . horizontal)
82+
83+ Button ( action: {
84+ let urlString : String
85+ if isAppStoreBuild {
86+ urlString = " itms-apps://itunes.apple.com/app/id6744045754 "
87+ } else {
88+ urlString = " altstore://source?url=https://StikDebug.xyz/apps.json "
89+ }
90+ if let url = URL ( string: urlString) {
91+ UIApplication . shared. open ( url)
92+ }
93+ } ) {
94+ Text ( " Update Now " )
95+ . font ( . headline. weight ( . semibold) )
96+ . frame ( maxWidth: . infinity)
97+ . padding ( . vertical, 12 )
98+ . background (
99+ RoundedRectangle ( cornerRadius: 14 , style: . continuous)
100+ . fill ( Color . accentColor)
101+ )
102+ . foregroundColor ( . white)
81103 }
82- } ) {
83- Text ( " Update Now " )
84- . font ( . headline. weight ( . semibold) )
85- . frame ( maxWidth: . infinity)
86- . padding ( . vertical, 12 )
87- . background (
88- RoundedRectangle ( cornerRadius: 14 , style: . continuous)
89- . fill ( Color . accentColor)
90- )
91- . foregroundColor ( . black)
104+ . padding ( . top, 10 )
92105 }
93- . padding ( . top, 10 )
94106 }
95- . padding ( 24 )
96- . background (
97- RoundedRectangle ( cornerRadius: 20 , style: . continuous)
98- . fill ( . ultraThinMaterial)
99- . overlay (
100- RoundedRectangle ( cornerRadius: 20 , style: . continuous)
101- . strokeBorder ( Color . white. opacity ( 0.15 ) , lineWidth: 1 )
102- )
103- )
104- . shadow ( color: . black. opacity ( 0.15 ) , radius: 12 , x: 0 , y: 4 )
105107 . padding ( . horizontal, 40 )
106108 }
107109 . transition ( . opacity. combined ( with: . scale) )
0 commit comments