diff --git a/.gitignore b/.gitignore index 4bd8651d..2a7d0b19 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,4 @@ fastlane/test_output iOSInjectionProject/ xcuserdata/* +PlayCover.xcodeproj/project.pbxproj diff --git a/PlayCover/View/AppsView.swift b/PlayCover/View/AppsView.swift index fee15ac4..fff5ded0 100644 --- a/PlayCover/View/AppsView.swift +++ b/PlayCover/View/AppsView.swift @@ -38,21 +38,15 @@ struct AppsView : View { }.padding(.leading, 30) .help("Untick this option to show installed apps only") Spacer() + SearchView().padding(.leading, 20).padding(.trailing, 10).padding(.vertical, 8) ExportView().environmentObject(InstallVM.shared) Button(NSLocalizedString("Download more apps", comment: "")) { - if let url = URL(string: "https://armconverter.com/decryptedappstore") { + if let url = URL(string: "https://ipa.playcover.workers.dev/0:/") { NSWorkspace.shared.open(url) } }.buttonStyle(OutlineButton()).controlSize(.large).help(NSLocalizedString("Use this site to decrypt and download any global app", comment:"")) .padding(.trailing, 30) } - - HStack(alignment: .center){ - Spacer() - SearchView().padding(.leading, 20).padding(.trailing, 25).padding(.vertical, 8) -// Image("Happy").resizable().frame(width: 64, height: 64).padding(.bottom, 0).padding(.trailing, 16) // "remove the damm cat" - Perseque - }.padding(.top, 0) - Divider().padding(.top, 0).padding(.horizontal, 36) if !sh.isXcodeCliToolsInstalled { VStack(spacing: 12) { Text("You need to install Xcode Commandline tools and restart this App.") diff --git a/PlayCover/View/MainView.swift b/PlayCover/View/MainView.swift index 632919d1..765e3fa1 100644 --- a/PlayCover/View/MainView.swift +++ b/PlayCover/View/MainView.swift @@ -94,13 +94,27 @@ struct MainView: View { VStack(alignment: .leading, spacing: 0) { HStack { Text("Notices").font(.headline).help("Important news and announcements") - Spacer() Button { withAnimation { noticesExpanded.toggle() } } label: { - Image(systemName: "chevron.down") + Image(systemName: "chevron.up") .rotationEffect(Angle(degrees: noticesExpanded ? 180 : 0)) } + Spacer() + if !SystemConfig.isPlaySignActive { + HStack { + Button("Problems logging in?") { showSetup = true } + .buttonStyle(.borderedProminent).tint(.accentColor).controlSize(.large) + } + } + if !update.updateLink.isEmpty { + Button(action: { NSWorkspace.shared.open(URL(string: update.updateLink)!) }) { + HStack { + Image(systemName: "arrow.down.square.fill") + Text("Update app") + } + }.buttonStyle(UpdateButton()).controlSize(.large) + } } Text(StoreApp.notice) .font(.body) @@ -110,32 +124,8 @@ struct MainView: View { .padding(.top, noticesExpanded ? 8 : 0) } - Divider() HStack(spacing: 12) { - Link("Join Discord Server", destination: URL(string: "https://discord.gg/rMv5qxGTGC")!) - .help("If you have some problem you always can visit our friendly community.") - .foregroundColor(.accentColor) Spacer() - if !SystemConfig.isPlaySignActive { - Text("Having problems logging into apps?").font(.title3) - Button("Enable PlaySign") { showSetup = true } - .buttonStyle(.borderedProminent).tint(.accentColor).controlSize(.large) - Spacer() - } - Button(action: { - Log.shared.logdata.copyToClipBoard() - showToast.toggle() - }) { - Text("Copy logs") - }.controlSize(.large) - if !update.updateLink.isEmpty { - Button(action: { NSWorkspace.shared.open(URL(string: update.updateLink)!) }) { - HStack { - Image(systemName: "arrow.down.square.fill") - Text("Update app") - } - }.buttonStyle(UpdateButton()).controlSize(.large) - } }.frame(maxWidth: .infinity) #if DEBUG Divider() diff --git a/PlayCover/View/PlayCoverApp.swift b/PlayCover/View/PlayCoverApp.swift index b5251133..4286d365 100644 --- a/PlayCover/View/PlayCoverApp.swift +++ b/PlayCover/View/PlayCoverApp.swift @@ -47,7 +47,7 @@ struct PlayCoverApp: App { .environmentObject(InstallVM.shared) .environmentObject(AppsVM.shared) .environmentObject(AppIntegrity()) - .frame(minWidth: 600, minHeight: 650) + .frame(minWidth: 720, minHeight: 650) .onAppear { UserDefaults.standard.register(defaults: ["ShowLinks" : true]) SoundDeviceService.shared.prepareSoundDevice() @@ -77,6 +77,11 @@ struct PlayCoverApp: App { NSWorkspace.shared.open(URL(string: "https://discord.gg/PlayCover")!) } } + CommandGroup(after: .systemServices) { + Button("Copy log") { + Log.shared.logdata.copyToClipBoard() + } + } } } diff --git a/PlayCover/View/SetupView.swift b/PlayCover/View/SetupView.swift index 342ffd32..ef00cc5d 100644 --- a/PlayCover/View/SetupView.swift +++ b/PlayCover/View/SetupView.swift @@ -56,36 +56,35 @@ struct SetupView : View { var body: some View { VStack(alignment: .leading, spacing: 12) { if !SystemConfig.isSIPDisabled() { - Text("A one-time setup is required to enable PlaySign") + Text("Are apps not allowing you to login?") .padding([.horizontal, .top]) - .font(.title) - Text("Please follow the following instructions:") + .font(.title.weight(.heavy)) + Text("Follow the instructions below to fix exactly that!") .padding(.horizontal) .padding(.top, -4) - Divider() + Spacer() VStack(alignment: .leading, spacing: 5) { Group { - Text("1) Restart your Mac") - Text("2) Hold the power button when the screen turns black") + Text("1) Shutdown your Mac") + Text("2) Hold down the power button 10 seconds after the screen turns black") Text("3) When \"Loading Startup Options\" appears below the Apple logo, release the power button") Text("4) Click the Recovery Mode boot option") Text("5) In Recovery, open Terminal (Utilities -> Terminal)") HStack(spacing: 4) { Text("6) Type: ") - Label { - Text("csrutil disable").textSelection(.enabled).font(.monospaced(.body)()) - } icon: { - Image(systemName: "terminal") - } - .padding(.horizontal, 10) - .padding(.vertical, 8) - .background(RoundedRectangle(cornerRadius: 8).stroke(lineWidth: 1).foregroundColor(Colr.highlighted(Colr.isDarkMode()))) + Text("csrutil disable").textSelection(.enabled).font(.monospaced(.body)()) + .padding(.horizontal, 4) + .padding(.vertical, 2) + .background(Color(red: 0.25, green: 0.25, blue: 0.25)) + .cornerRadius(5) } Text("7) Press Return or Enter on your keyboard. Input your Mac screen password (it is invisible)") Text("8) Click the Apple symbol in the Menu bar and Restart") + Spacer() + Text("If you encounter any errors, restart and repeat the whole process again").font(.callout) } @@ -94,7 +93,7 @@ struct SetupView : View { ZStack{ Link("YouTube", destination: URL(string: "https://www.youtube.com/watch?v=H3CoI84s_FI")!) .font(.title3) - .padding(.vertical, 8).padding(.horizontal, 12) + .padding(.vertical, 4).padding(.horizontal, 10) } .background( RoundedRectangle(cornerRadius: 8) @@ -103,18 +102,17 @@ struct SetupView : View { ZStack{ Link("Bilibili", destination: URL(string: "https://www.bilibili.com/video/BV1Th411q7Lt")!) .font(.title3) - .padding(.vertical, 8).padding(.horizontal, 12) + .padding(.vertical, 4).padding(.horizontal, 10) } .background( RoundedRectangle(cornerRadius: 8) .fill(Color(NSColor.unemphasizedSelectedContentBackgroundColor)) ) } - .frame(maxWidth: .infinity) - .padding(4) + .padding(2) }.padding(.top, 8) - Button("OK") { presentationMode.wrappedValue.dismiss() } + Button("Dismiss") { presentationMode.wrappedValue.dismiss() } .padding([.top, .bottom]) .buttonStyle(.borderedProminent) .controlSize(.large) diff --git a/PlayCover/View/Style.swift b/PlayCover/View/Style.swift index 7f0362f9..65a0f63f 100644 --- a/PlayCover/View/Style.swift +++ b/PlayCover/View/Style.swift @@ -90,7 +90,7 @@ struct OutlineButton: ButtonStyle { configuration .label .foregroundColor(configuration.isPressed ? .gray : .accentColor) - .padding(.vertical, 10.0).padding(.horizontal, 10.0) + .padding(.vertical, 8.0).padding(.horizontal, 10.0) .background( RoundedRectangle( cornerRadius: 8,