Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: Menu bar related changes" #66

Merged
merged 1 commit into from Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions PlayCover/View/MainView.swift
Expand Up @@ -68,7 +68,7 @@ struct MainView: View {
@State var noticesExpanded = false
@State var bottomHeight: CGFloat = 0

@Binding var showToast: Bool
@State private var showToast = false

var body: some View {
if apps.updatingApps { ProgressView() }
Expand Down Expand Up @@ -162,9 +162,8 @@ struct MainView: View {
}

struct Previews_MainView_Previews: PreviewProvider {
@State static var showToast = false
static var previews: some View {
MainView(showToast: $showToast)
MainView()
.padding()
.environmentObject(UpdateService.shared)
.environmentObject(InstallVM.shared)
Expand Down
40 changes: 0 additions & 40 deletions PlayCover/View/MenuBarView.swift

This file was deleted.

26 changes: 22 additions & 4 deletions PlayCover/View/PlayCoverApp.swift
Expand Up @@ -38,11 +38,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
@main
struct PlayCoverApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@State var showToast = false

var body: some Scene {
WindowGroup {
MainView(showToast: $showToast)
MainView()
.padding()
.environmentObject(UpdateService.shared)
.environmentObject(InstallVM.shared)
Expand All @@ -62,8 +61,27 @@ struct PlayCoverApp: App {
}
}.handlesExternalEvents(matching: Set(arrayLiteral: "{same path of URL?}")) // create new window if doesn't exist
.commands {
PlayCoverMenuView(showToast: $showToast)
PlayCoverHelpMenuView()
CommandGroup(after: .help) {
Divider()
Button("Website") {
NSWorkspace.shared.open(URL(string: "https://playcover.io")!)

}
Button("GitHub") {
NSWorkspace.shared.open(URL(string:"https://github.com/PlayCover/PlayCover/")!)
}
Button("Documentation") {
NSWorkspace.shared.open(URL(string:"https://github.com/PlayCover/PlayCover/wiki")!)
}
Button("Discord") {
NSWorkspace.shared.open(URL(string: "https://discord.gg/PlayCover")!)
}
}
CommandGroup(after: .systemServices) {
Button("Copy log") {
Log.shared.logdata.copyToClipBoard()
}
}
}
}

Expand Down