Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitabc053b

Browse files
committed
fixup
1 parent2f5f408 commitabc053b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎Coder Desktop/Coder Desktop/VPNMenuState.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ struct Agent: Identifiable, Equatable, Comparable {
1818
return lhs.wsName.localizedCompare(rhs.wsName)==.orderedAscending
1919
}
2020

21-
// Choose the shortest hostname, and remove trailing dot if present
22-
varprimaryHost:String?{ fqdns.min(by:{ $0.count< $1.count})
23-
.map{ $0.hasSuffix(".")?String($0.dropLast()): $0}
24-
}
21+
varprimaryHost:String?{ fqdns.min(by:{ $0.count< $1.count})}
2522
}
2623

2724
enumAgentStatus:Int,Equatable,Comparable{
@@ -72,7 +69,8 @@ struct VPNMenuState {
7269
name: agent.name,
7370
// If last handshake was not within last five minutes, the agent is unhealthy
7471
status: agent.lastHandshake.date>Date.now.addingTimeInterval(-300)?.okay:.warn,
75-
fqdns: agent.fqdn,
72+
// Remove trailing dot if present
73+
fqdns: agent.fqdn.map{ $0.hasSuffix(".")?String($0.dropLast()): $0},
7674
wsName: wsName,
7775
wsID: wsID
7876
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp