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

feat: make on-upgrade steps more obvious#172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 2 commits intomainfromethan/more-obvious-upgrades
May 29, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletionsCoder-Desktop/Coder-Desktop/Views/VPN/VPNMenu.swift
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -81,30 +81,7 @@ struct VPNMenu<VPN: VPNService, FS: FileSyncDaemon>: View {
}.buttonStyle(.plain)
TrayDivider()
}
// This shows when
// 1. The user is logged in
// 2. The network extension is installed
// 3. The VPN is unconfigured
// It's accompanied by a message in the VPNState view
// that the user needs to reconfigure.
if state.hasSession, vpn.state==.failed(.networkExtensionError(.unconfigured)){
Button{
state.reconfigure()
} label:{
ButtonRowView{
Text("Reconfigure VPN")
}
}.buttonStyle(.plain)
}
if vpn.state==.failed(.systemExtensionError(.needsUserApproval)){
Button{
openSystemExtensionSettings()
} label:{
ButtonRowView{Text("Approve in System Settings")}
}.buttonStyle(.plain)
}else{
AuthButton<VPN>()
}
AuthButton<VPN>()
Button{
openSettings()
appActivate()
Expand Down
38 changes: 32 additions & 6 deletionsCoder-Desktop/Coder-Desktop/Views/VPN/VPNState.swift
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,17 +10,43 @@ struct VPNState<VPN: VPNService>: View {
Group{
switch(vpn.state, state.hasSession){
case(.failed(.systemExtensionError(.needsUserApproval)), _):
Text("Awaiting System Extension approval")
.font(.body)
.foregroundStyle(.secondary)
VStack{
Text("Awaiting System Extension approval")
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
.fixedSize(horizontal:false, vertical:true)
.padding(.horizontal,Theme.Size.trayInset)
.padding(.vertical,Theme.Size.trayPadding)
.frame(maxWidth:.infinity)
Button{
openSystemExtensionSettings()
} label:{
Text("Approve in System Settings")
}
}
case(_,false):
Text("Sign in to use Coder Desktop")
.font(.body)
.foregroundColor(.secondary)
case(.failed(.networkExtensionError(.unconfigured)), _):
Text("The system VPN requires reconfiguration.")
.font(.body)
.foregroundStyle(.secondary)
VStack{
Text("The system VPN requires reconfiguration")
.foregroundColor(.secondary)
.multilineTextAlignment(.center)
.fixedSize(horizontal:false, vertical:true)
.padding(.horizontal,Theme.Size.trayInset)
.padding(.vertical,Theme.Size.trayPadding)
.frame(maxWidth:.infinity)
Button{
state.reconfigure()
} label:{
Text("Reconfigure VPN")
}
}.onAppear{
// Show the prompt onAppear, so the user doesn't have to
// open the menu bar an extra time
state.reconfigure()
}
case(.disabled, _):
Text("Enable Coder Connect to see workspaces")
.font(.body)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp