mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 11:13:28 +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 SwiftUI
|
||||||
import AsyncImage
|
import AsyncImage
|
||||||
import ExpandableText
|
import ExpandableText
|
||||||
|
import SFSafeSymbols
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
|
|
||||||
struct AppDetailView: View {
|
struct AppDetailView: View {
|
||||||
@@ -93,6 +94,10 @@ struct AppDetailView: View {
|
|||||||
|
|
||||||
var contentView: some View {
|
var contentView: some View {
|
||||||
VStack(alignment: .leading, spacing: 32) {
|
VStack(alignment: .leading, spacing: 32) {
|
||||||
|
if storeApp.sourceIdentifier == Source.altStoreIdentifier {
|
||||||
|
officialAppBadge
|
||||||
|
}
|
||||||
|
|
||||||
if let subtitle = storeApp.subtitle {
|
if let subtitle = storeApp.subtitle {
|
||||||
Text(subtitle)
|
Text(subtitle)
|
||||||
.multilineTextAlignment(.center)
|
.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 {
|
var currentVersionView: some View {
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
HStack(alignment: .bottom) {
|
HStack(alignment: .bottom) {
|
||||||
|
|||||||
Reference in New Issue
Block a user