|
1 | 1 | import { localize } from "vscode-nls-i18n"; |
2 | | -import { ExtensionContext, workspace, ConfigurationTarget, window, ProgressLocation } from "vscode"; |
| 2 | +import { ExtensionContext, workspace, ConfigurationTarget, window, ProgressLocation, MessageItem } from "vscode"; |
3 | 3 |
|
4 | 4 | import { container } from "../../container"; |
5 | 5 | import { Context } from "../../context"; |
6 | 6 | import { tree } from "../treeDataProvider"; |
7 | 7 | import { getCredentailByInput } from "./auth"; |
8 | 8 | import { AbstractClient } from "tencentcloud-sdk-nodejs/tencentcloud/common/abstract_client"; |
9 | 9 | import { Credential } from "tencentcloud-sdk-nodejs/tencentcloud/common/interface"; |
10 | | -import { LoginProvider } from "../../../views/login/loginExplorer"; |
11 | | -import { terraformShellManager } from "../../../client/terminal/terraformShellManager"; |
12 | 10 | import { getCamClient, getStsClient } from "@/connectivity/client"; |
13 | | -import { StreamingStatistics } from "tencentcloud-sdk-nodejs/tencentcloud/services/dlc/v20210125/dlc_models"; |
| 11 | +import * as loginMgt from "../../../views/login/loginMgt"; |
14 | 12 |
|
15 | 13 | export namespace user { |
16 | 14 | interface UserInfo { |
@@ -114,19 +112,21 @@ export namespace user { |
114 | 112 | } |
115 | 113 |
|
116 | 114 | export async function loginOut() { |
117 | | - const yes = localize("TcTerraform.common.yes"); |
| 115 | + const yesBtn: MessageItem = { title: localize("TcTerraform.common.yes") }; |
118 | 116 | const action = await window.showWarningMessage( |
119 | 117 | localize("TcTerraform.view.logout"), |
120 | 118 | { |
121 | 119 | modal: true, |
122 | | - detail: localize("TcTerraform.view.logout.confirm"), |
| 120 | + detail: localize("TcTerraform.view.logout.confirm") |
123 | 121 | }, |
| 122 | + yesBtn |
124 | 123 | ); |
125 | | - if (action !== yes) { |
| 124 | + if (action !== yesBtn) { |
126 | 125 | return; |
127 | 126 | } |
128 | 127 |
|
129 | 128 | await clearInfo(); |
| 129 | + loginMgt.clearStatusBar(); |
130 | 130 |
|
131 | 131 | tree.refreshTreeData(); |
132 | 132 | } |
|
0 commit comments