Улучши удаление и строку статуса VPN

This commit is contained in:
2026-05-19 14:13:33 +03:00
parent 4187cb6544
commit 417138b3b1
6 changed files with 224 additions and 40 deletions

View File

@@ -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 {
}
}
}