Refine VPN installer and menu-bar app integration
This commit is contained in:
@@ -74,6 +74,9 @@ struct VPNMenuView: View {
|
||||
Button("Обновить статус модулей") {
|
||||
vpnManager.refreshStatus()
|
||||
}
|
||||
Button("Изменить логин и пароль") {
|
||||
vpnManager.configureLogin()
|
||||
}
|
||||
Divider()
|
||||
Button("Открыть логи") {
|
||||
let logPath = FileManager.default.homeDirectoryForCurrentUser
|
||||
@@ -91,19 +94,18 @@ struct VPNMenuView: View {
|
||||
Group {
|
||||
Label("VPN отключён", systemImage: "circle")
|
||||
.disabled(true)
|
||||
Label(vpnManager.installModeLabel, systemImage: "slider.horizontal.3")
|
||||
.disabled(true)
|
||||
if let setupHint = vpnManager.installSetupHint {
|
||||
Label(setupHint, systemImage: "info.circle")
|
||||
.disabled(true)
|
||||
}
|
||||
Divider()
|
||||
Button("Подключить автоматически") {
|
||||
vpnManager.connect(mode: .auto)
|
||||
ForEach(vpnManager.availableLaunchModes) { mode in
|
||||
Button(mode.menuTitle) {
|
||||
vpnManager.connect(mode: mode)
|
||||
}
|
||||
}
|
||||
.keyboardShortcut("c")
|
||||
Button("Подключить вручную") {
|
||||
vpnManager.connect(mode: .manual)
|
||||
}
|
||||
.keyboardShortcut("m")
|
||||
Button("Подключить полностью вручную") {
|
||||
vpnManager.connect(mode: .manualFull)
|
||||
}
|
||||
.keyboardShortcut("f")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user