[ADD] News, Browse and Settings views ported to SwiftUI

This commit contains WIP SwiftUI versions of most of the views in SideStore.
This commit is contained in:
Fabian Thies
2022-11-23 22:34:02 +01:00
parent ed2270ff46
commit 16a8bce102
30 changed files with 2047 additions and 2 deletions

View File

@@ -0,0 +1,48 @@
//
// BrowseAppPreviewView.swift
// SideStore
//
// Created by Fabian Thies on 20.11.22.
// Copyright © 2022 Fabian Thies. All rights reserved.
//
import SwiftUI
import AltStoreCore
struct BrowseAppPreviewView: View {
let storeApp: StoreApp
var body: some View {
VStack {
AppRowView(app: storeApp)
if let subtitle = storeApp.subtitle {
Text(subtitle)
}
if !storeApp.screenshotURLs.isEmpty {
HStack {
ForEach(storeApp.screenshotURLs.prefix(2)) { url in
if #available(iOS 15.0, *) {
AsyncImage(url: url) { image in
image
.resizable()
.aspectRatio(contentMode: .fit)
} placeholder: {
Color(UIColor.secondarySystemBackground)
}
.cornerRadius(8)
}
}
}
.frame(height: 300)
}
}
}
}
//struct BrowseAppPreviewView_Previews: PreviewProvider {
// static var previews: some View {
// BrowseAppPreviewView()
// }
//}