mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-16 14:24:42 +00:00
feat: add feedback menu item
This commit is contained in:
@@ -2024,6 +2024,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"反馈…": {
|
||||
"extractionState": "manual",
|
||||
"localizations": {
|
||||
"en": {
|
||||
"stringUnit": {
|
||||
"state": "translated",
|
||||
"value": "Feedback…"
|
||||
}
|
||||
},
|
||||
"zh-Hans": {
|
||||
"stringUnit": {
|
||||
"state": "translated",
|
||||
"value": "反馈…"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"诊断…": {
|
||||
"extractionState": "manual",
|
||||
"localizations": {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
/// 菜单栏面板:窗口入口与退出。
|
||||
/// 菜单栏面板:窗口入口、反馈与退出。
|
||||
struct ProxyStatusMenu: View {
|
||||
@Environment(\.openWindow) private var openWindow
|
||||
@Environment(\.openURL) private var openURL
|
||||
/// 只捕获本面板的宿主窗口,打开主窗口时不会误关其他窗口。
|
||||
@State private var windowAnchor = NSView(frame: .zero)
|
||||
|
||||
@@ -23,6 +24,16 @@ struct ProxyStatusMenu: View {
|
||||
}
|
||||
.padding(12)
|
||||
|
||||
Divider()
|
||||
|
||||
Button("反馈…") {
|
||||
windowAnchor.window?.orderOut(nil)
|
||||
if let url = URL(string: "https://github.com/shadowsocks/ShadowsocksX-NG/discussions") {
|
||||
openURL(url)
|
||||
}
|
||||
}
|
||||
.padding(12)
|
||||
|
||||
Button("关于 ShadowsocksX-NG2") {
|
||||
windowAnchor.window?.orderOut(nil)
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
|
||||
Reference in New Issue
Block a user