From 5a474218cc162a980df6147473282884917fd6b1 Mon Sep 17 00:00:00 2001 From: rickythefox Date: Wed, 22 Feb 2023 21:55:29 +0100 Subject: [PATCH] Only show max 3 allowed ips in status menu --- Sources/WireGuardApp/UI/macOS/StatusMenu.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WireGuardApp/UI/macOS/StatusMenu.swift b/Sources/WireGuardApp/UI/macOS/StatusMenu.swift index 45d22838b..bc8577726 100644 --- a/Sources/WireGuardApp/UI/macOS/StatusMenu.swift +++ b/Sources/WireGuardApp/UI/macOS/StatusMenu.swift @@ -107,7 +107,7 @@ class StatusMenu: NSMenu { networksMenuItem.title = "" networksMenuItem.isHidden = true } else { - let allowedIPs = tunnel.tunnelConfiguration?.peers.flatMap { $0.allowedIPs }.map { $0.stringRepresentation }.joined(separator: ", ") ?? "" + let allowedIPs = tunnel.tunnelConfiguration?.peers.flatMap { $0.allowedIPs }.map { $0.stringRepresentation }.prefix(3).joined(separator: ", ") ?? "" if !allowedIPs.isEmpty { networksMenuItem.title = tr(format: "macMenuNetworks (%@)", allowedIPs) } else {