mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[FIX] Show App IDs button only if user is logged in with their Apple ID
This commit is contained in:
committed by
Joe Mattiello
parent
ed1970245a
commit
d3e04c1db7
@@ -45,6 +45,7 @@ struct AddSourceView: View {
|
|||||||
}
|
}
|
||||||
.listStyle(InsetGroupedListStyle())
|
.listStyle(InsetGroupedListStyle())
|
||||||
.navigationTitle(L10n.AddSourceView.title)
|
.navigationTitle(L10n.AddSourceView.title)
|
||||||
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ struct MyAppsView: View {
|
|||||||
NSSortDescriptor(keyPath: \InstalledApp.storeApp?.latestVersion?.date, ascending: true),
|
NSSortDescriptor(keyPath: \InstalledApp.storeApp?.latestVersion?.date, ascending: true),
|
||||||
NSSortDescriptor(keyPath: \InstalledApp.name, ascending: true)
|
NSSortDescriptor(keyPath: \InstalledApp.name, ascending: true)
|
||||||
], predicate: NSPredicate(format: "%K == YES AND %K != nil AND %K != %K",
|
], predicate: NSPredicate(format: "%K == YES AND %K != nil AND %K != %K",
|
||||||
#keyPath(InstalledApp.isActive), #keyPath(InstalledApp.storeApp), #keyPath(InstalledApp.version), #keyPath(InstalledApp.storeApp.latestVersion.version)))
|
#keyPath(InstalledApp.isActive), #keyPath(InstalledApp.storeApp),
|
||||||
|
#keyPath(InstalledApp.version), #keyPath(InstalledApp.storeApp.latestVersion.version))
|
||||||
|
)
|
||||||
var updates: FetchedResults<InstalledApp>
|
var updates: FetchedResults<InstalledApp>
|
||||||
|
|
||||||
|
|
||||||
@@ -108,21 +110,23 @@ struct MyAppsView: View {
|
|||||||
self.rowView(for: app)
|
self.rowView(for: app)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VStack {
|
if let activeTeam = DatabaseManager.shared.activeTeam() {
|
||||||
if DatabaseManager.shared.activeTeam()?.type == .free {
|
VStack {
|
||||||
Text("\(remainingAppIDs) \(L10n.MyAppsView.appIDsRemaining)")
|
if activeTeam.type == .free {
|
||||||
.foregroundColor(.secondary)
|
Text("\(remainingAppIDs) \(L10n.MyAppsView.appIDsRemaining)")
|
||||||
}
|
.foregroundColor(.secondary)
|
||||||
|
}
|
||||||
SwiftUI.Button {
|
|
||||||
self.isShowingAppIDsView = true
|
SwiftUI.Button {
|
||||||
} label: {
|
self.isShowingAppIDsView = true
|
||||||
Text(L10n.MyAppsView.viewAppIDs)
|
} label: {
|
||||||
}
|
Text(L10n.MyAppsView.viewAppIDs)
|
||||||
.sheet(isPresented: self.$isShowingAppIDsView) {
|
}
|
||||||
NavigationView {
|
.sheet(isPresented: self.$isShowingAppIDsView) {
|
||||||
AppIDsView()
|
NavigationView {
|
||||||
|
AppIDsView()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user