Skip to content

Commit a4edd1f

Browse files
committed
Fix 'Connecting to IAM' UI bug
1 parent dbbb4d6 commit a4edd1f

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"folders": [
33
{
4-
"path": ".",
4+
"path": "."
55
},
66
{
7-
"path": "packages/toolkit",
7+
"path": "packages/toolkit"
88
},
99
{
10-
"path": "packages/core",
10+
"path": "packages/core"
1111
},
1212
{
13-
"path": "packages/amazonq",
13+
"path": "packages/amazonq"
1414
},
1515
{
16-
"path": "../language-server-runtimes",
16+
"path": "../language-servers"
1717
},
1818
{
19-
"path": "../language-servers",
20-
},
19+
"path": "../language-server-runtimes"
20+
}
2121
],
2222
"settings": {
2323
"typescript.tsdk": "node_modules/typescript/lib",

packages/core/src/login/webview/vue/backend.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { getLogger } from '../../../shared/logger/logger'
3434
import { isValidUrl } from '../../../shared/utilities/uriUtils'
3535
import { RegionProfile } from '../../../codewhisperer/models/model'
3636
import { ProfileSwitchIntent } from '../../../codewhisperer/region/regionProfileManager'
37+
import { showMessage } from '../../../shared/utilities/messages'
3738

3839
export abstract class CommonAuthWebview extends VueWebview {
3940
private readonly className = 'CommonAuthWebview'
@@ -186,7 +187,7 @@ export abstract class CommonAuthWebview extends VueWebview {
186187
abstract fetchConnections(): Promise<AwsConnection[] | undefined>
187188

188189
async errorNotification(e: AuthError) {
189-
void vscode.window.showErrorMessage(`${e.text}`)
190+
showMessage('error', e.text)
190191
}
191192

192193
abstract quitLoginScreen(): Promise<void>

packages/core/src/login/webview/vue/login.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230

231231
<template v-if="stage === 'AUTHENTICATING'">
232232
<div class="auth-container-section">
233-
<div v-if="(app === 'TOOLKIT' && profileName.length > 0) || (app === 'AMAZONQ' && accessKey.length > 0)" class="header bottomMargin">
233+
<div v-if="selectedLoginOption === LoginOption.IAM_CREDENTIAL" class="header bottomMargin">
234234
Connecting to IAM...
235235
</div>
236236
<div v-else class="header bottomMargin">Authenticating in browser...</div>
@@ -428,6 +428,10 @@ export default defineComponent({
428428
}
429429
},
430430
handleDocumentClick(event: any) {
431+
// Only reset selection when in START stage to avoid clearing during authentication
432+
if (this.stage !== 'START') {
433+
return
434+
}
431435
const isClickInsideSelectableItems = event.target.closest('.selectable-item')
432436
if (!isClickInsideSelectableItems) {
433437
this.selectedLoginOption = 0

0 commit comments

Comments
 (0)