Reorganize AltStore project into UIKit and SwiftUI folders

This commit is contained in:
naturecodevoid
2023-05-20 12:35:53 -07:00
parent e06cca8224
commit 2db073d2c5
115 changed files with 41 additions and 25 deletions

View File

@@ -0,0 +1,55 @@
//
// AppRowView.swift
// SideStore
//
// Created by Fabian Thies on 18.11.22.
// Copyright © 2022 Fabian Thies. All rights reserved.
//
import SwiftUI
import AltStoreCore
struct AppRowView: View {
let app: AppProtocol
var storeApp: StoreApp? {
(app as? StoreApp) ?? (app as? InstalledApp)?.storeApp
}
var showRemainingDays: Bool = false
var body: some View {
HStack(alignment: .center, spacing: 12) {
AppIconView(iconUrl: storeApp?.iconURL, isSideStore: storeApp?.isSideStore ?? false)
VStack(alignment: .leading, spacing: 2) {
Text(app.name)
.bold()
Text(storeApp?.developerName ?? L10n.AppRowView.sideloaded)
.font(.callout)
.foregroundColor(.secondary)
if false {
RatingStars(rating: 4)
.frame(height: 12)
.foregroundColor(.secondary)
}
}
.lineLimit(1)
Spacer()
AppPillButton(app: app, showRemainingDays: showRemainingDays)
}
.padding()
.tintedBackground(Color(storeApp?.tintColor ?? UIColor(Color.accentColor)))
.clipShape(RoundedRectangle(cornerRadius: 24, style: .circular))
}
}
//struct AppRowView_Previews: PreviewProvider {
// static var previews: some View {
// AppRowView()
// }
//}