mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 11:13:28 +01:00
[ADD] WIP: Add My Apps view with support for sideloading new apps, refreshing installed apps and much more
This commit is contained in:
53
AltStore/Views/My Apps/AppAction.swift
Normal file
53
AltStore/Views/My Apps/AppAction.swift
Normal file
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// AppAction.swift
|
||||
// SideStore
|
||||
//
|
||||
// Created by Fabian Thies on 20.12.22.
|
||||
// Copyright © 2022 SideStore. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum AppAction: Int, CaseIterable {
|
||||
case install, open, refresh
|
||||
case activate, deactivate
|
||||
case remove
|
||||
case enableJIT
|
||||
case backup, exportBackup, restoreBackup
|
||||
case chooseCustomIcon, resetCustomIcon
|
||||
|
||||
|
||||
var title: String {
|
||||
switch self {
|
||||
case .install: return "Install"
|
||||
case .open: return "Open"
|
||||
case .refresh: return "Refresh"
|
||||
case .activate: return "Activate"
|
||||
case .deactivate: return "Deactivate"
|
||||
case .remove: return "Remove"
|
||||
case .enableJIT: return "Enable JIT"
|
||||
case .backup: return "Back Up"
|
||||
case .exportBackup: return "Export Backup"
|
||||
case .restoreBackup: return "Restore Backup"
|
||||
case .chooseCustomIcon: return "Change Icon"
|
||||
case .resetCustomIcon: return "Reset Icon"
|
||||
}
|
||||
}
|
||||
|
||||
var imageName: String {
|
||||
switch self {
|
||||
case .install: return "Install"
|
||||
case .open: return "arrow.up.forward.app"
|
||||
case .refresh: return "arrow.clockwise"
|
||||
case .activate: return "checkmark.circle"
|
||||
case .deactivate: return "xmark.circle"
|
||||
case .remove: return "trash"
|
||||
case .enableJIT: return "bolt"
|
||||
case .backup: return "doc.on.doc"
|
||||
case .exportBackup: return "arrow.up.doc"
|
||||
case .restoreBackup: return "arrow.down.doc"
|
||||
case .chooseCustomIcon: return "photo"
|
||||
case .resetCustomIcon: return "arrow.uturn.left"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user