mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[ADD] Badge in AppDetailView for apps from the official source and (WIP) trusted sources
This commit is contained in:
committed by
Joe Mattiello
parent
875453533b
commit
f17d00c0bc
@@ -9,6 +9,7 @@
|
||||
import SwiftUI
|
||||
import AsyncImage
|
||||
import ExpandableText
|
||||
import SFSafeSymbols
|
||||
import AltStoreCore
|
||||
|
||||
struct AppDetailView: View {
|
||||
@@ -93,6 +94,10 @@ struct AppDetailView: View {
|
||||
|
||||
var contentView: some View {
|
||||
VStack(alignment: .leading, spacing: 32) {
|
||||
if storeApp.sourceIdentifier == Source.altStoreIdentifier {
|
||||
officialAppBadge
|
||||
}
|
||||
|
||||
if let subtitle = storeApp.subtitle {
|
||||
Text(subtitle)
|
||||
.multilineTextAlignment(.center)
|
||||
@@ -129,6 +134,26 @@ struct AppDetailView: View {
|
||||
)
|
||||
}
|
||||
|
||||
var officialAppBadge: some View {
|
||||
HStack {
|
||||
Spacer()
|
||||
Image(systemSymbol: .checkmarkSealFill)
|
||||
Text("Official App")
|
||||
Spacer()
|
||||
}
|
||||
.foregroundColor(.accentColor)
|
||||
}
|
||||
|
||||
var trustedAppBadge: some View {
|
||||
HStack {
|
||||
Spacer()
|
||||
Image(systemSymbol: .shieldLefthalfFill)
|
||||
Text("From Trusted Source")
|
||||
Spacer()
|
||||
}
|
||||
.foregroundColor(.accentColor)
|
||||
}
|
||||
|
||||
var currentVersionView: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
HStack(alignment: .bottom) {
|
||||
|
||||
Reference in New Issue
Block a user