Улучши удаление и строку статуса VPN
This commit is contained in:
@@ -30,6 +30,12 @@ struct StatusBarLabel: View {
|
||||
private var iconName: String {
|
||||
switch vpnManager.state {
|
||||
case .disconnected:
|
||||
if vpnManager.moduleStatusSystemImage == "exclamationmark.triangle" {
|
||||
return "exclamationmark.shield"
|
||||
}
|
||||
if vpnManager.moduleStatusSystemImage == "questionmark.circle" {
|
||||
return "questionmark.circle"
|
||||
}
|
||||
return "shield.slash"
|
||||
case .unlocking, .connecting:
|
||||
return "shield.lefthalf.filled"
|
||||
@@ -63,7 +69,7 @@ struct VPNMenuView: View {
|
||||
}
|
||||
|
||||
Divider()
|
||||
Label(vpnManager.moduleSummary, systemImage: "puzzlepiece.extension")
|
||||
Label(vpnManager.moduleSummary, systemImage: vpnManager.moduleStatusSystemImage)
|
||||
.disabled(true)
|
||||
Button("Обновить статус модулей") {
|
||||
vpnManager.refreshStatus()
|
||||
@@ -174,4 +180,3 @@ struct VPNMenuView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user