fix
This commit is contained in:
parent
5f8647d402
commit
a96fe640bd
@ -72,6 +72,8 @@ extension SettingsAccountView {
|
||||
|
||||
// 基于账号密码的登陆
|
||||
struct AccountCreditView: View {
|
||||
@Environment(UserContext.self) var userContext: UserContext
|
||||
|
||||
let username: String
|
||||
|
||||
var body: some View {
|
||||
@ -91,8 +93,9 @@ extension SettingsAccountView {
|
||||
}
|
||||
|
||||
Button {
|
||||
Task {
|
||||
Task { @MainActor in
|
||||
try await VPNManager.shared.disableVpn()
|
||||
self.userContext.isLogined = false
|
||||
}
|
||||
} label: {
|
||||
Text("退出登陆")
|
||||
@ -105,6 +108,7 @@ extension SettingsAccountView {
|
||||
|
||||
// 基于Token的登陆
|
||||
struct TokenCreditView: View {
|
||||
@Environment(UserContext.self) var userContext: UserContext
|
||||
let token: String
|
||||
|
||||
var body: some View {
|
||||
@ -118,8 +122,9 @@ extension SettingsAccountView {
|
||||
Spacer()
|
||||
|
||||
Button {
|
||||
Task {
|
||||
Task { @MainActor in
|
||||
try await VPNManager.shared.disableVpn()
|
||||
self.userContext.isLogined = false
|
||||
}
|
||||
} label: {
|
||||
Text("退出登陆")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user