mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-14 17:23:25 +01:00
[CHANGE] Replace system image name strings with SFSymbols
This commit is contained in:
committed by
Joe Mattiello
parent
bcd54067d3
commit
5697c4c063
@@ -20,6 +20,7 @@
|
|||||||
1920B04F2924AC8300744F60 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1920B04E2924AC8300744F60 /* Settings.bundle */; };
|
1920B04F2924AC8300744F60 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1920B04E2924AC8300744F60 /* Settings.bundle */; };
|
||||||
19B9B7452845E6DF0076EF69 /* SelectTeamViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B9B7442845E6DF0076EF69 /* SelectTeamViewController.swift */; };
|
19B9B7452845E6DF0076EF69 /* SelectTeamViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B9B7442845E6DF0076EF69 /* SelectTeamViewController.swift */; };
|
||||||
1F07F5672955D16A00F7BE95 /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 1F07F5662955D16A00F7BE95 /* SFSafeSymbols */; };
|
1F07F5672955D16A00F7BE95 /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 1F07F5662955D16A00F7BE95 /* SFSafeSymbols */; };
|
||||||
|
1F07F5692955D3EC00F7BE95 /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = 1F07F5682955D3EC00F7BE95 /* SFSafeSymbols */; };
|
||||||
1F0DD81C2932D2FF007608A4 /* AppScreenshotsScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0DD81B2932D2FF007608A4 /* AppScreenshotsScrollView.swift */; };
|
1F0DD81C2932D2FF007608A4 /* AppScreenshotsScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0DD81B2932D2FF007608A4 /* AppScreenshotsScrollView.swift */; };
|
||||||
1F0DD81F2932D84C007608A4 /* ExpandableText in Frameworks */ = {isa = PBXBuildFile; productRef = 1F0DD81E2932D84C007608A4 /* ExpandableText */; };
|
1F0DD81F2932D84C007608A4 /* ExpandableText in Frameworks */ = {isa = PBXBuildFile; productRef = 1F0DD81E2932D84C007608A4 /* ExpandableText */; };
|
||||||
1F0DD8212933B749007608A4 /* AppPermissionsGrid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0DD8202933B749007608A4 /* AppPermissionsGrid.swift */; };
|
1F0DD8212933B749007608A4 /* AppPermissionsGrid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0DD8202933B749007608A4 /* AppPermissionsGrid.swift */; };
|
||||||
@@ -983,6 +984,7 @@
|
|||||||
B3C395F1284F2DE700DA9E2F /* KeychainAccess in Frameworks */,
|
B3C395F1284F2DE700DA9E2F /* KeychainAccess in Frameworks */,
|
||||||
99C4EF4D2979132100CB538D /* SemanticVersion in Frameworks */,
|
99C4EF4D2979132100CB538D /* SemanticVersion in Frameworks */,
|
||||||
4879A95F2861046500FC1BBD /* AltSign in Frameworks */,
|
4879A95F2861046500FC1BBD /* AltSign in Frameworks */,
|
||||||
|
1F07F5692955D3EC00F7BE95 /* SFSafeSymbols in Frameworks */,
|
||||||
B39575F5284F29E20080B4FF /* Roxas.framework in Frameworks */,
|
B39575F5284F29E20080B4FF /* Roxas.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
@@ -2195,6 +2197,7 @@
|
|||||||
B3C395F0284F2DE700DA9E2F /* KeychainAccess */,
|
B3C395F0284F2DE700DA9E2F /* KeychainAccess */,
|
||||||
4879A95E2861046500FC1BBD /* AltSign */,
|
4879A95E2861046500FC1BBD /* AltSign */,
|
||||||
99C4EF4C2979132100CB538D /* SemanticVersion */,
|
99C4EF4C2979132100CB538D /* SemanticVersion */,
|
||||||
|
1F07F5682955D3EC00F7BE95 /* SFSafeSymbols */,
|
||||||
);
|
);
|
||||||
productName = AltStoreCore;
|
productName = AltStoreCore;
|
||||||
productReference = BF66EE7E2501AE50007EE018 /* AltStoreCore.framework */;
|
productReference = BF66EE7E2501AE50007EE018 /* AltStoreCore.framework */;
|
||||||
@@ -3751,6 +3754,11 @@
|
|||||||
package = 1F07F5652955D16A00F7BE95 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */;
|
package = 1F07F5652955D16A00F7BE95 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */;
|
||||||
productName = SFSafeSymbols;
|
productName = SFSafeSymbols;
|
||||||
};
|
};
|
||||||
|
1F07F5682955D3EC00F7BE95 /* SFSafeSymbols */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = 1F07F5652955D16A00F7BE95 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */;
|
||||||
|
productName = SFSafeSymbols;
|
||||||
|
};
|
||||||
1F0DD81E2932D84C007608A4 /* ExpandableText */ = {
|
1F0DD81E2932D84C007608A4 /* ExpandableText */ = {
|
||||||
isa = XCSwiftPackageProductDependency;
|
isa = XCSwiftPackageProductDependency;
|
||||||
package = 1F0DD81D2932D84C007608A4 /* XCRemoteSwiftPackageReference "ExpandableText" */;
|
package = 1F0DD81D2932D84C007608A4 /* XCRemoteSwiftPackageReference "ExpandableText" */;
|
||||||
|
|||||||
@@ -7,10 +7,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import SFSafeSymbols
|
||||||
|
|
||||||
protocol NavigationTab: RawRepresentable, Identifiable, CaseIterable, Hashable where RawValue == Int {
|
protocol NavigationTab: RawRepresentable, Identifiable, CaseIterable, Hashable where RawValue == Int {
|
||||||
static var defaultTab: Self { get }
|
static var defaultTab: Self { get }
|
||||||
var displaySymbol: String { get }
|
var displaySymbol: SFSymbol { get }
|
||||||
var displayName: String { get }
|
var displayName: String { get }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
|
|
||||||
struct RatingStars: View {
|
struct RatingStars: View {
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ struct RatingStars: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
ForEach(0..<5) { i in
|
ForEach(0..<5) { i in
|
||||||
Image(systemName: i < rating ? "star.fill" : "star")
|
Image(systemSymbol: i < rating ? .starFill : .star)
|
||||||
.resizable()
|
.resizable()
|
||||||
.aspectRatio(contentMode: .fit)
|
.aspectRatio(contentMode: .fit)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
|
|
||||||
struct AppPermissionsGrid: View {
|
struct AppPermissionsGrid: View {
|
||||||
@@ -34,7 +35,7 @@ struct AppPermissionGridItemView: View {
|
|||||||
self.isPopoverPresented = true
|
self.isPopoverPresented = true
|
||||||
} label: {
|
} label: {
|
||||||
VStack {
|
VStack {
|
||||||
Image(uiImage: (permission.type.icon?.withRenderingMode(.alwaysTemplate) ?? UIImage(systemName: "questionmark"))!) // TODO: Replace with system icon
|
Image(uiImage: permission.type.icon ?? UIImage(systemSymbol: .questionmark))
|
||||||
.padding()
|
.padding()
|
||||||
.background(Circle().foregroundColor(Color(.secondarySystemBackground)))
|
.background(Circle().foregroundColor(Color(.secondarySystemBackground)))
|
||||||
Text(permission.type.localizedShortName ?? permission.type.localizedName ?? "")
|
Text(permission.type.localizedShortName ?? permission.type.localizedName ?? "")
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
|
|
||||||
struct AddSourceView: View {
|
struct AddSourceView: View {
|
||||||
|
|
||||||
@@ -28,7 +29,7 @@ struct AddSourceView: View {
|
|||||||
Text("Please enter the source url here. Then, tap continue to validate and add the source in the next step.")
|
Text("Please enter the source url here. Then, tap continue to validate and add the source in the next step.")
|
||||||
|
|
||||||
HStack(alignment: .top) {
|
HStack(alignment: .top) {
|
||||||
Image(systemName: "exclamationmark.triangle.fill")
|
Image(systemSymbol: .exclamationmarkTriangleFill)
|
||||||
|
|
||||||
Text("Be careful with unvalidated third-party sources! Make sure to only add sources that you trust.")
|
Text("Be careful with unvalidated third-party sources! Make sure to only add sources that you trust.")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
|
|
||||||
struct BrowseView: View {
|
struct BrowseView: View {
|
||||||
@@ -76,7 +77,7 @@ struct BrowseView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
|
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "line.3.horizontal.decrease.circle")
|
Image(systemSymbol: .lineHorizontal3DecreaseCircle)
|
||||||
.imageScale(.large)
|
.imageScale(.large)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +128,7 @@ struct PromotedCategoryView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
Image(systemName: "dpad.right.filled")
|
Image(systemSymbol: .dpadRightFill)
|
||||||
Text("Games &\nEmulators")
|
Text("Games &\nEmulators")
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
|
|
||||||
struct ConfirmAddSourceView: View {
|
struct ConfirmAddSourceView: View {
|
||||||
@@ -64,7 +65,7 @@ struct ConfirmAddSourceView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
confirmationHandler(fetchedSource)
|
confirmationHandler(fetchedSource)
|
||||||
} label: {
|
} label: {
|
||||||
Label(title: { Text("Add Source") }, icon: { Image(systemName: "plus") })
|
Label("Add Source", systemSymbol: .plus)
|
||||||
}
|
}
|
||||||
.buttonStyle(FilledButtonStyle())
|
.buttonStyle(FilledButtonStyle())
|
||||||
.padding()
|
.padding()
|
||||||
@@ -75,7 +76,7 @@ struct ConfirmAddSourceView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
|
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "xmark.circle.fill")
|
Image(systemSymbol: .xmarkCircleFill)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
import CoreData
|
import CoreData
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ struct SourcesView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
self.removeSource(source)
|
self.removeSource(source)
|
||||||
} label: {
|
} label: {
|
||||||
Label("Remove", systemImage: "trash")
|
Label("Remove", systemSymbol: .trash)
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
@@ -85,7 +86,7 @@ struct SourcesView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
self.isShowingAddSourceAlert = true
|
self.isShowingAddSourceAlert = true
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "plus")
|
Image(systemSymbol: .plus)
|
||||||
}
|
}
|
||||||
.sheet(isPresented: self.$isShowingAddSourceAlert) {
|
.sheet(isPresented: self.$isShowingAddSourceAlert) {
|
||||||
NavigationView {
|
NavigationView {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import SFSafeSymbols
|
||||||
|
|
||||||
enum AppAction: Int, CaseIterable {
|
enum AppAction: Int, CaseIterable {
|
||||||
case install, open, refresh
|
case install, open, refresh
|
||||||
@@ -34,20 +35,20 @@ enum AppAction: Int, CaseIterable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var imageName: String {
|
var symbol: SFSymbol {
|
||||||
switch self {
|
switch self {
|
||||||
case .install: return "Install"
|
case .install: return .squareAndArrowDown
|
||||||
case .open: return "arrow.up.forward.app"
|
case .open: return .arrowUpForwardApp
|
||||||
case .refresh: return "arrow.clockwise"
|
case .refresh: return .arrowClockwise
|
||||||
case .activate: return "checkmark.circle"
|
case .activate: return .checkmarkCircle
|
||||||
case .deactivate: return "xmark.circle"
|
case .deactivate: return .xmarkCircle
|
||||||
case .remove: return "trash"
|
case .remove: return .trash
|
||||||
case .enableJIT: return "bolt"
|
case .enableJIT: return .bolt
|
||||||
case .backup: return "doc.on.doc"
|
case .backup: return .docOnDoc
|
||||||
case .exportBackup: return "arrow.up.doc"
|
case .exportBackup: return .arrowUpDoc
|
||||||
case .restoreBackup: return "arrow.down.doc"
|
case .restoreBackup: return .arrowDownDoc
|
||||||
case .chooseCustomIcon: return "photo"
|
case .chooseCustomIcon: return .photo
|
||||||
case .resetCustomIcon: return "arrow.uturn.left"
|
case .resetCustomIcon: return .arrowUturnLeft
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
import MobileCoreServices
|
import MobileCoreServices
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
|
|
||||||
@@ -119,7 +120,7 @@ struct MyAppsView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
self.isShowingFilePicker = true
|
self.isShowingFilePicker = true
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "plus")
|
Image(systemSymbol: .plus)
|
||||||
.imageScale(.large)
|
.imageScale(.large)
|
||||||
}
|
}
|
||||||
.sheet(isPresented: self.$isShowingFilePicker) {
|
.sheet(isPresented: self.$isShowingFilePicker) {
|
||||||
@@ -157,7 +158,7 @@ struct MyAppsView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
self.perform(action: action, for: app)
|
self.perform(action: action, for: app)
|
||||||
} label: {
|
} label: {
|
||||||
Label(action.title, systemImage: action.imageName)
|
Label(action.title, systemSymbol: action.symbol)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import SFSafeSymbols
|
||||||
|
|
||||||
struct RootView: View {
|
struct RootView: View {
|
||||||
|
|
||||||
@@ -78,12 +79,12 @@ extension RootView {
|
|||||||
|
|
||||||
static var defaultTab: RootView.Tab = .news
|
static var defaultTab: RootView.Tab = .news
|
||||||
|
|
||||||
var displaySymbol: String {
|
var displaySymbol: SFSymbol {
|
||||||
switch self {
|
switch self {
|
||||||
case .news: return "newspaper"
|
case .news: return .newspaper
|
||||||
case .browse: return "app.dashed"
|
case .browse: return .booksVertical
|
||||||
case .myApps: return "app.badge"
|
case .myApps: return .appBadge
|
||||||
case .settings: return "gearshape"
|
case .settings: return .gearshape
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +98,7 @@ extension RootView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var label: some View {
|
var label: some View {
|
||||||
Label(self.displayName, systemImage: self.displaySymbol)
|
Label(self.displayName, systemSymbol: self.displaySymbol)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import AsyncImage
|
import AsyncImage
|
||||||
|
import SFSafeSymbols
|
||||||
import AltStoreCore
|
import AltStoreCore
|
||||||
import Intents
|
import Intents
|
||||||
|
|
||||||
@@ -149,7 +150,7 @@ struct SettingsView: View {
|
|||||||
SwiftUI.Button {
|
SwiftUI.Button {
|
||||||
|
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "person.crop.circle")
|
Image(systemSymbol: .personCropCircle)
|
||||||
.imageScale(.large)
|
.imageScale(.large)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import CoreData
|
import CoreData
|
||||||
|
import SFSafeSymbols
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
public extension ALTAppPermissionType
|
public extension ALTAppPermissionType
|
||||||
@@ -46,28 +47,51 @@ public extension ALTAppPermissionType
|
|||||||
}
|
}
|
||||||
|
|
||||||
var icon: UIImage? {
|
var icon: UIImage? {
|
||||||
switch self
|
let symbol: SFSymbol? = {
|
||||||
{
|
switch self {
|
||||||
case .photos: return UIImage(systemName: "photo.on.rectangle.angled")
|
case .photos: return .photoOnRectangleAngled
|
||||||
case .camera: return UIImage(systemName: "camera.fill")
|
case .camera: return .cameraFill
|
||||||
case .location: return UIImage(systemName: "location.fill")
|
case .location: return .locationFill
|
||||||
case .contacts: return UIImage(systemName: "person.2.fill")
|
case .contacts: return .person2Fill
|
||||||
case .reminders: return UIImage(systemName: "checklist")
|
case .reminders:
|
||||||
case .appleMusic: return UIImage(systemName: "music.note")
|
if #available(iOS 15.0, *) {
|
||||||
case .microphone: return UIImage(systemName: "mic.fill")
|
return .checklist
|
||||||
case .speechRecognition: return UIImage(systemName: "waveform.and.mic")
|
}
|
||||||
case .backgroundAudio: return UIImage(systemName: "speaker.fill")
|
return .listBullet
|
||||||
case .backgroundFetch: return UIImage(systemName: "square.and.arrow.down")
|
case .appleMusic: return .musicNote
|
||||||
case .bluetooth: return UIImage(systemName: "wave.3.right")
|
case .microphone: return .micFill
|
||||||
case .network: return UIImage(systemName: "network")
|
case .speechRecognition:
|
||||||
case .calendars: return UIImage(systemName: "calendar")
|
if #available(iOS 15.0, *) {
|
||||||
case .touchID: return UIImage(systemName: "touchid")
|
return .waveformAndMic
|
||||||
case .faceID: return UIImage(systemName: "faceid")
|
}
|
||||||
case .siri: return UIImage(systemName: "mic.and.signal.meter.fill")
|
return .recordingtape
|
||||||
case .motion: return UIImage(systemName: "figure.walk.motion")
|
case .backgroundAudio: return .speakerFill
|
||||||
default:
|
case .backgroundFetch: return .squareAndArrowDown
|
||||||
|
case .bluetooth: return .wave3Right
|
||||||
|
case .network: return .network
|
||||||
|
case .calendars: return .calendar
|
||||||
|
case .touchID: return .touchid
|
||||||
|
case .faceID: return .faceid
|
||||||
|
case .siri:
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
return .micAndSignalMeterFill
|
||||||
|
}
|
||||||
|
return .waveform
|
||||||
|
case .motion:
|
||||||
|
if #available(iOS 16.0, *) {
|
||||||
|
return .figureWalkMotion
|
||||||
|
}
|
||||||
|
return .figureWalk
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
guard let symbol = symbol else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return UIImage(systemSymbol: symbol)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user