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

Commit6147967

Browse files
committed
fixup
1 parenta10e955 commit6147967

File tree

3 files changed

+8
-20
lines changed

3 files changed

+8
-20
lines changed

‎Coder-Desktop/Coder-Desktop/VPN/MenuState.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ struct Agent: Identifiable, Equatable, Comparable, Hashable {
1010
letwsName:String
1111
letwsID:UUID
1212

13-
// Agents are sorted by name
13+
// Agents are sorted bystauts, and then byname
1414
staticfunc<(lhs:Agent, rhs:Agent)->Bool{
15-
lhs.wsName.localizedCompare(rhs.wsName)==.orderedAscending
15+
if lhs.status!= rhs.status{
16+
return lhs.status< rhs.status
17+
}
18+
return lhs.wsName.localizedCompare(rhs.wsName)==.orderedAscending
1619
}
1720

1821
letprimaryHost:String

‎Coder-Desktop/Coder-Desktop/Views/VPN/VPNMenuItem.swift

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,7 @@ struct MenuItemIconButton: View {
233233
letaction:@MainActor()->Void
234234

235235
varbody:someView{
236-
Button{
237-
action()
238-
} label:{
236+
Button(action: action){
239237
Image(systemName: systemName)
240238
.padding(3)
241239
.contentShape(Rectangle())
@@ -259,16 +257,3 @@ struct AnimatedChevron: View {
259257
.animation(.easeInOut(duration:Theme.Animation.collapsibleDuration), value: isExpanded)
260258
}
261259
}
262-
263-
#if DEBUG
264-
#Preview{
265-
letappState=AppState(persistent:false)
266-
appState.login(baseAccessURL:URL(string:"http://127.0.0.1:8080")!, sessionToken:"")
267-
// appState.clearSession()
268-
269-
returnVPNMenu<PreviewVPN,PreviewFileSync>().frame(width:256)
270-
.environmentObject(PreviewVPN())
271-
.environmentObject(appState)
272-
.environmentObject(PreviewFileSync())
273-
}
274-
#endif

‎Coder-Desktop/Coder-DesktopTests/AgentsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct AgentsTests {
6262
letforEach=try view.inspect().find(ViewType.ForEach.self)
6363
#expect(forEach.count==Theme.defaultVisibleAgents)
6464
// Agents are sorted by status, and then by name in alphabetical order
65-
#expect(throws:Never.self){try view.inspect().find(link:"a1.coder")}
65+
#expect(throws:Never.self){try view.inspect().find(text:"a1.coder")}
6666
}
6767

6868
@Test
@@ -115,7 +115,7 @@ struct AgentsTests {
115115
tryawait sut.inspection.inspect{ viewin
116116
letforEach=try view.find(ViewType.ForEach.self)
117117
#expect(forEach.count==Theme.defaultVisibleAgents)
118-
#expect(throws:Never.self){try view.find(link:"offline.coder")}
118+
#expect(throws:Never.self){try view.find(text:"offline.coder")}
119119
}
120120
}
121121
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp