From 0e5872f75d19d6caaac67424adc1adc64220c688 Mon Sep 17 00:00:00 2001 From: winebarrel Date: Sun, 24 Nov 2024 23:33:17 +0900 Subject: [PATCH] Add github link --- Pulse/RightClickMenuView.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Pulse/RightClickMenuView.swift b/Pulse/RightClickMenuView.swift index 2a8880f..a73d7c5 100644 --- a/Pulse/RightClickMenuView.swift +++ b/Pulse/RightClickMenuView.swift @@ -1,10 +1,21 @@ import SwiftUI struct RightClickMenuView: View { + @AppStorage("githubQuery") private var githubQuery = Constants.defaultGithubQuery + var body: some View { Divider() - Button("TODO") { - // TODO: + Button("Pull Requests") { + Task { + let url = URL(string: "https://github.com/pulls?q=" + (githubQuery.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""))! + NSWorkspace.shared.open(url) + } + } + Button("Issues") { + Task { + let url = URL(string: "https://github.com/issues")! + NSWorkspace.shared.open(url) + } } Divider() SettingsLink {