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

Commit5177bd0

Browse files
committed
fixup
1 parent64ffe17 commit5177bd0

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

‎Coder-Desktop/Coder-Desktop/Preview Content/PreviewVPN.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ final class PreviewVPN: Coder_Desktop.VPNService {
3333
self.shouldFail= shouldFail
3434
}
3535

36-
@Publishedvarprogress:VPNProgress=.init(stage:.none, downloadProgress:nil)
36+
@Publishedvarprogress:VPNProgress=.init(stage:.initial, downloadProgress:nil)
3737

3838
varstartTask:Task<Void,Never>?
3939
func start()async{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct VPNProgressView: View {
4141
returnnil
4242
}
4343
switch progress.stage{
44-
case.none:
44+
case.initial:
4545
return0.10
4646
case.downloading:
4747
guardlet downloadProgress= progress.downloadProgresselse{

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,14 @@ final class CoderVPNService: NSObject, VPNService {
5656
varlogger=Logger(subsystem:Bundle.main.bundleIdentifier!, category:"vpn")
5757
lazyvarxpc:VPNXPCInterface=.init(vpn:self)
5858

59-
@PublishedvartunnelState:VPNServiceState=.disabled
59+
@PublishedvartunnelState:VPNServiceState=.disabled{
60+
didSet{
61+
if tunnelState==.connecting{
62+
progress=.init(stage:.initial, downloadProgress:nil)
63+
}
64+
}
65+
}
66+
6067
@PublishedvarsysExtnState:SystemExtensionState=.uninstalled
6168
@PublishedvarneState:NetworkExtensionState=.unconfigured
6269
varstate:VPNServiceState{
@@ -73,7 +80,7 @@ final class CoderVPNService: NSObject, VPNService {
7380
return tunnelState
7481
}
7582

76-
@Publishedvarprogress:VPNProgress=.init(stage:.none, downloadProgress:nil)
83+
@Publishedvarprogress:VPNProgress=.init(stage:.initial, downloadProgress:nil)
7784

7885
@PublishedvarmenuState:VPNMenuState=.init()
7986

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MockVPNService: VPNService, ObservableObject {
1010
@Publishedvarstate:Coder_Desktop.VPNServiceState=.disabled
1111
@PublishedvarbaseAccessURL:URL=.init(string:"https://dev.coder.com")!
1212
@PublishedvarmenuState:VPNMenuState=.init()
13-
@Publishedvarprogress:VPNProgress=.init(stage:.none, downloadProgress:nil)
13+
@Publishedvarprogress:VPNProgress=.init(stage:.initial, downloadProgress:nil)
1414
varonStart:(()async->Void)?
1515
varonStop:(()async->Void)?
1616

‎Coder-Desktop/VPN/PacketTunnelProvider.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ class PacketTunnelProvider: NEPacketTunnelProvider, @unchecked Sendable {
9292
logger.info("vpn started")
9393
self.manager= manager
9494
completionHandler(nil)
95-
// Clear progress message
96-
pushProgress(stage:.none, downloadProgress:nil)
9795
} catch{
9896
logger.error("error starting manager:\(error.description, privacy:.public)")
9997
completionHandler(

‎Coder-Desktop/VPNLib/XPC.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Foundation
1515
}
1616

1717
@objcpublicenumProgressStage:Int,Sendable{
18-
casenone
18+
caseinitial
1919
case downloading
2020
case validating
2121
case removingQuarantine
@@ -25,7 +25,7 @@ import Foundation
2525

2626
publicvardescription:String?{
2727
switchself{
28-
case.none:
28+
case.initial:
2929
nil
3030
case.downloading:
3131
"Downloading library..."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp