tutorial for how to reset collections
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "CustomCollections.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.5 MiB |
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "Language-light.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filename" : "Language_dark.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 527 KiB |
|
After Width: | Height: | Size: 576 KiB |
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "OriginalCollection-light.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filename" : "OriginalCollection-dark.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "SetPrimary-light.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"filename" : "SetPrimary-dark.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"appearances" : [
|
||||||
|
{
|
||||||
|
"appearance" : "luminosity",
|
||||||
|
"value" : "dark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 497 KiB |
|
After Width: | Height: | Size: 549 KiB |
@@ -24,7 +24,7 @@ struct Pocket_PosterApp: App {
|
|||||||
if finishedTutorial {
|
if finishedTutorial {
|
||||||
ContentView(selectedTendies: $selectedTendies)
|
ContentView(selectedTendies: $selectedTendies)
|
||||||
} else {
|
} else {
|
||||||
OnBoardingView()
|
OnBoardingView(cards: onBoardingCards, isFinished: $finishedTutorial)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.transition(.opacity)
|
.transition(.opacity)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ struct ContentView: View {
|
|||||||
@State var showErrorAlert = false
|
@State var showErrorAlert = false
|
||||||
@State var showSuccessAlert = false
|
@State var showSuccessAlert = false
|
||||||
@State var lastError: String?
|
@State var lastError: String?
|
||||||
|
@State var hideResetHelp: Bool = true
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
@@ -45,7 +46,7 @@ struct ContentView: View {
|
|||||||
Text("Select Tendies")
|
Text("Select Tendies")
|
||||||
}
|
}
|
||||||
.buttonStyle(TintedButton(color: .green, fullwidth: true))
|
.buttonStyle(TintedButton(color: .green, fullwidth: true))
|
||||||
.padding(10)
|
.padding(.vertical, 10)
|
||||||
|
|
||||||
if !selectedTendies.wrappedValue.isEmpty {
|
if !selectedTendies.wrappedValue.isEmpty {
|
||||||
HStack {
|
HStack {
|
||||||
@@ -64,36 +65,41 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
if !selectedTendies.wrappedValue.isEmpty {
|
if pbHash == "" {
|
||||||
if pbHash == "" {
|
Text("Enter your PosterBoard app hash in Settings.")
|
||||||
Text("Enter your PosterBoard app hash in Settings.")
|
} else {
|
||||||
} else {
|
if !selectedTendies.wrappedValue.isEmpty {
|
||||||
Button(action: {
|
Button(action: {
|
||||||
UIImpactFeedbackGenerator(style: .soft).impactOccurred()
|
UIImpactFeedbackGenerator(style: .soft).impactOccurred()
|
||||||
// UIApplication.shared.alert(title: NSLocalizedString("Applying Tendies...", comment: ""), body: NSLocalizedString("Please wait", comment: ""), animated: false, withButton: false)
|
// UIApplication.shared.alert(title: NSLocalizedString("Applying Tendies...", comment: ""), body: NSLocalizedString("Please wait", comment: ""), animated: false, withButton: false)
|
||||||
|
|
||||||
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
|
||||||
do {
|
do {
|
||||||
try PosterBoardManager.applyTendies(selectedTendies.wrappedValue, appHash: pbHash)
|
try PosterBoardManager.applyTendies(selectedTendies.wrappedValue, appHash: pbHash)
|
||||||
selectedTendies.wrappedValue.removeAll()
|
selectedTendies.wrappedValue.removeAll()
|
||||||
try? FileManager.default.removeItem(at: PosterBoardManager.getTendiesStoreURL())
|
try? FileManager.default.removeItem(at: PosterBoardManager.getTendiesStoreURL())
|
||||||
Haptic.shared.notify(.success)
|
Haptic.shared.notify(.success)
|
||||||
// UIApplication.shared.dismissAlert(animated: true)
|
// UIApplication.shared.dismissAlert(animated: true)
|
||||||
// TODO: Clear downloaded tendies
|
lastError = "The PosterBoard app will now open. Please close it from the app switcher."
|
||||||
lastError = "The PosterBoard app will now open. Please close it from the app switcher."
|
showSuccessAlert.toggle()
|
||||||
showSuccessAlert.toggle()
|
} catch {
|
||||||
} catch {
|
Haptic.shared.notify(.error)
|
||||||
Haptic.shared.notify(.error)
|
// UIApplication.shared.dismissAlert(animated: true)
|
||||||
// UIApplication.shared.dismissAlert(animated: true)
|
lastError = error.localizedDescription
|
||||||
lastError = error.localizedDescription
|
showErrorAlert.toggle()
|
||||||
showErrorAlert.toggle()
|
}
|
||||||
}
|
// }
|
||||||
// }
|
|
||||||
}) {
|
}) {
|
||||||
Text("Apply")
|
Text("Apply")
|
||||||
}
|
}
|
||||||
.buttonStyle(TintedButton(color: .blue, fullwidth: true))
|
.buttonStyle(TintedButton(color: .blue, fullwidth: true))
|
||||||
}
|
}
|
||||||
|
Button(action: {
|
||||||
|
hideResetHelp = false
|
||||||
|
}) {
|
||||||
|
Text("Reset Collections")
|
||||||
|
}
|
||||||
|
.buttonStyle(TintedButton(color: .red, fullwidth: true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,6 +136,12 @@ struct ContentView: View {
|
|||||||
} message: {
|
} message: {
|
||||||
Text(lastError ?? "???")
|
Text(lastError ?? "???")
|
||||||
}
|
}
|
||||||
|
.overlay {
|
||||||
|
OnBoardingView(cards: resetCollectionsInfo, isFinished: $hideResetHelp)
|
||||||
|
.opacity(hideResetHelp ? 0.0 : 1.0)
|
||||||
|
.transition(.opacity)
|
||||||
|
.animation(.easeOut(duration: 0.5), value: hideResetHelp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func delete(at offsets: IndexSet) {
|
func delete(at offsets: IndexSet) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct OnBoardingCardButtons: View {
|
struct OnBoardingCardButtons: View {
|
||||||
@AppStorage("finishedTutorial") var finishedTutorial: Bool?
|
@Binding var isFinished: Bool
|
||||||
|
|
||||||
@Binding var idx: Int
|
@Binding var idx: Int
|
||||||
@Binding var isAnimating: Bool
|
@Binding var isAnimating: Bool
|
||||||
@@ -74,7 +74,7 @@ struct OnBoardingCardButtons: View {
|
|||||||
func playFinishAnimation() {
|
func playFinishAnimation() {
|
||||||
isAnimating = false
|
isAnimating = false
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
|
||||||
finishedTutorial = true
|
isFinished = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,6 +83,7 @@ struct OnBoardingCardView: View {
|
|||||||
var info: OnBoardingPage
|
var info: OnBoardingPage
|
||||||
var pageCount: Int
|
var pageCount: Int
|
||||||
@Binding var idx: Int
|
@Binding var idx: Int
|
||||||
|
@Binding var isFinished: Bool
|
||||||
|
|
||||||
@State private var isAnimating: Bool = false
|
@State private var isAnimating: Bool = false
|
||||||
@State private var imgCornerRadius: CGFloat = 10.0
|
@State private var imgCornerRadius: CGFloat = 10.0
|
||||||
@@ -130,7 +131,7 @@ struct OnBoardingCardView: View {
|
|||||||
.accentColor(Color.white)
|
.accentColor(Color.white)
|
||||||
}
|
}
|
||||||
|
|
||||||
OnBoardingCardButtons(idx: $idx, isAnimating: $isAnimating, showDismiss: idx == 0, showFinish: idx == pageCount-1)
|
OnBoardingCardButtons(isFinished: $isFinished, idx: $idx, isAnimating: $isAnimating, showDismiss: idx == 0, showFinish: idx == pageCount-1)
|
||||||
}
|
}
|
||||||
.opacity(isAnimating ? 1.0 : 0.0)
|
.opacity(isAnimating ? 1.0 : 0.0)
|
||||||
.animation(.easeOut(duration: 0.5), value: isAnimating)
|
.animation(.easeOut(duration: 0.5), value: isAnimating)
|
||||||
|
|||||||
@@ -55,3 +55,26 @@ let onBoardingCards: [OnBoardingPage] = [
|
|||||||
linkName: "Find Wallpapers"
|
linkName: "Find Wallpapers"
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
let resetCollectionsInfo: [OnBoardingPage] = [
|
||||||
|
.init(
|
||||||
|
title: "How to Reset Collections",
|
||||||
|
description: "Due to the way this exploit works, it cannot delete files.\n\nHere is a guide on how to do it manually.",
|
||||||
|
image: "CustomCollection"
|
||||||
|
),
|
||||||
|
.init(
|
||||||
|
title: "Open the Language Settings",
|
||||||
|
description: "Inside the Settings app, navigate to General > Language & Region",
|
||||||
|
image: "Language"
|
||||||
|
),
|
||||||
|
.init(
|
||||||
|
title: "Set the Primary Language",
|
||||||
|
description: "It doesn't matter what you set it to.\n\nAfterwards set it back to your native language.",
|
||||||
|
image: "SetPrimary"
|
||||||
|
),
|
||||||
|
.init(
|
||||||
|
title: "Verify That It Worked",
|
||||||
|
description: "Everything on PosterBoard should refresh. Check the Collections to see if they reset.",
|
||||||
|
image: "OriginalCollection"
|
||||||
|
)
|
||||||
|
]
|
||||||
@@ -8,11 +8,14 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct OnBoardingView: View {
|
struct OnBoardingView: View {
|
||||||
|
let cards: [OnBoardingPage]
|
||||||
|
|
||||||
|
@Binding var isFinished: Bool
|
||||||
@State var currentIndex: Int = 0
|
@State var currentIndex: Int = 0
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack {
|
||||||
OnBoardingCardView(info: onBoardingCards[currentIndex], pageCount: onBoardingCards.count, idx: $currentIndex)
|
OnBoardingCardView(info: cards[currentIndex], pageCount: cards.count, idx: $currentIndex, isFinished: $isFinished)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||