Skip to content

Commit f4b80ea

Browse files
authored
fix(amazonq): login styling/CSS #4722
Problem Login CSS does not match the design Solution - Support VS Code light mode and dark mode - Fix a bug when icon is not correctly showed. - Fix some strings in the login UX.
1 parent ba91b90 commit f4b80ea

File tree

2 files changed

+121
-58
lines changed

2 files changed

+121
-58
lines changed

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

Lines changed: 89 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
<svg
4949
v-if="app === 'TOOLKIT' && stage !== 'CONNECTED'"
5050
width="100"
51-
height="100"
52-
viewBox="0 0 54 54"
51+
height="80"
52+
viewBox="0 0 54 40"
5353
fill="none"
5454
id="Layer_1"
5555
data-name="Layer 1"
@@ -106,13 +106,23 @@
106106
class="selectable-item"
107107
></SelectableItem>
108108
<SelectableItem
109+
v-if="app === 'AMAZONQ'"
109110
@toggle="toggleItemSelection"
110111
:isSelected="selectedLoginOption === LoginOption.ENTERPRISE_SSO"
111112
:itemId="LoginOption.ENTERPRISE_SSO"
112113
:itemText="'Single sign-on with AWS IAM Identity Center'"
113114
:itemTitle="'Use professional license'"
114115
class="selectable-item"
115116
></SelectableItem>
117+
<SelectableItem
118+
v-if="app === 'TOOLKIT'"
119+
@toggle="toggleItemSelection"
120+
:isSelected="selectedLoginOption === LoginOption.ENTERPRISE_SSO"
121+
:itemId="LoginOption.ENTERPRISE_SSO"
122+
:itemText="'Sign in to AWS with single sign-on'"
123+
:itemTitle="'Workforce'"
124+
class="selectable-item"
125+
></SelectableItem>
116126
<SelectableItem
117127
v-if="app === 'TOOLKIT'"
118128
@toggle="toggleItemSelection"
@@ -147,9 +157,8 @@
147157
Using CodeCatalyst with AWS Builder ID?
148158
<a href="#" @click="handleCodeCatalystSignin()">Skip to sign-in</a>
149159
</div>
150-
<br /><br />
151160
</div>
152-
<div class="p">Start URL</div>
161+
<div class="title">Start URL</div>
153162
<div class="hint">URL for your organization, provided by an admin or help desk</div>
154163
<input
155164
class="urlInput"
@@ -160,15 +169,13 @@
160169
v-model="startUrl"
161170
/>
162171
<h4 class="start-url-error">{{ startUrlError }}</h4>
163-
<br /><br />
164172
<div class="title">Region</div>
165173
<div class="hint">AWS Region that hosts identity directory</div>
166174
<select class="regionSelect" id="regions" name="regions" v-model="selectedRegion">
167175
<option v-for="region in regions" :key="region.id" :value="region.id">
168176
{{ `${region.name} (${region.id})` }}
169177
</option>
170178
</select>
171-
<br /><br />
172179
<button
173180
class="continue-button"
174181
:disabled="startUrl.length == 0 || startUrlError.length > 0"
@@ -199,20 +206,14 @@
199206
</button>
200207
<div class="title">IAM Credentials:</div>
201208
<div class="hint">Credentials will be added to the appropriate ~/.aws/ files</div>
202-
<br /><br />
203-
<div class="p">Profile Name</div>
209+
<div style="margin-bottom: 8px"></div>
210+
<div class="title">Profile Name</div>
204211
<div class="hint">The identifier for these credentials</div>
205212
<input class="iamInput" type="text" id="profileName" name="profileName" v-model="profileName" />
206-
207-
<br /><br />
208-
<div class="p">Access Key</div>
213+
<div class="title">Access Key</div>
209214
<input class="iamInput" type="text" id="accessKey" name="accessKey" v-model="accessKey" />
210-
211-
<br /><br />
212-
<div class="p">Secret Key</div>
215+
<div class="title">Secret Key</div>
213216
<input class="iamInput" type="text" id="secretKey" name="secretKey" v-model="secretKey" />
214-
215-
<br /><br />
216217
<button
217218
class="continue-button"
218219
:disabled="profileName.length <= 0 || accessKey.length <= 0 || secretKey.length <= 0"
@@ -432,65 +433,113 @@ export default defineComponent({
432433
margin-bottom: 10px;
433434
margin-top: 10px;
434435
}
435-
.continue-button {
436-
background-color: #29a7ff;
437-
color: white;
438-
width: 100%;
439-
height: 40px;
440-
}
441-
.back-button {
442-
background: none;
443-
border: none;
444-
cursor: pointer;
445-
color: white;
446-
font-size: 30px;
447-
}
448436
.logoIcon {
449437
display: flex;
450438
flex-direction: row;
451439
justify-content: left;
452440
align-items: flex-start;
453-
padding-top: 150px;
454-
padding-bottom: 10px;
441+
padding-top: 130px;
442+
padding-bottom: 2px;
455443
padding-left: 10px;
456444
height: auto;
457445
}
458446
.hint {
459-
color: #948a8a;
447+
color: #c6c6c6;
460448
margin-bottom: 5px;
461449
margin-top: 5px;
450+
font-size: 8px;
451+
}
452+
.vscode-light .hint {
453+
color: #3d3a3a;
454+
}
455+
.vscode-dark .hint {
456+
color: #c6c6c6;
462457
}
458+
463459
.title {
464-
margin-bottom: 5px;
465-
margin-top: 5px;
466-
font-size: 15px;
460+
margin-bottom: 3px;
461+
margin-top: 3px;
462+
font-size: 12px;
467463
font-weight: bold;
464+
}
465+
.title.vscode-dark {
468466
color: white;
469467
}
468+
.title.vscode-light {
469+
color: black;
470+
}
471+
470472
.h4 {
471-
font-size: 10px;
473+
font-size: 8px;
474+
margin-bottom: 8px;
475+
}
476+
.continue-button {
477+
background-color: var(--vscode-button-background);
478+
color: white;
479+
width: 100%;
480+
height: 30px;
481+
border: none;
482+
border-radius: 4px;
483+
font-weight: bold;
484+
margin-bottom: 3px;
485+
margin-top: 3px;
486+
}
487+
.back-button {
488+
background: none;
489+
border: none;
490+
cursor: pointer;
491+
color: var(--vscode-button-foreground);
492+
padding: 0;
493+
height: 13px;
472494
}
473495
.continue-button:disabled {
474-
background-color: #252526;
496+
background-color: var(--vscode-input-background);
475497
color: #6f6f6f;
476498
}
477499
.urlInput {
478-
background-color: #252526;
500+
background-color: var(--vscode-input-background);
479501
width: 100%;
502+
height: 15px;
503+
color: white;
504+
border: none;
505+
}
506+
.vscode-light .urlInput {
507+
color: black;
508+
}
509+
.vscode-dark .urlInput {
480510
color: white;
481511
}
482512
.iamInput {
483-
background-color: #252526;
513+
background-color: var(--vscode-input-background);
484514
width: 100%;
515+
height: 15px;
516+
color: white;
517+
border: none;
518+
margin-bottom: 5px;
519+
margin-top: 2px;
520+
}
521+
.vscode-light .iamInput {
522+
color: black;
523+
}
524+
.vscode-dark .iamInput {
485525
color: white;
486526
}
487527
.regionSelect {
488-
background-color: #252526;
528+
background-color: var(--vscode-input-background);
489529
width: 100%;
490530
color: white;
531+
margin-bottom: 5px;
532+
margin-top: 2px;
533+
}
534+
.vscode-light .regionSelect {
535+
color: black;
536+
}
537+
.vscode-dark .regionSelect {
538+
color: white;
491539
}
492540
.start-url-error {
493541
color: #ff0000;
542+
font-size: 8px;
494543
}
495544
#logo {
496545
fill: var(--vscode-button-foreground);

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

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,33 @@
22
<div class="item-container" :class="{ selected: isSelected }" @click="toggleSelection">
33
<div class="icon">
44
<svg
5-
v-if="itemTitle == 'Personal'"
6-
width="20"
7-
height="20"
5+
v-if="itemTitle == 'Use For Free'"
6+
width="16"
7+
height="16"
88
viewBox="0 0 16 16"
99
fill="none"
1010
xmlns="http://www.w3.org/2000/svg"
11-
transform="translate(0, 20)"
1211
>
1312
<path
13+
class="svg-path"
1414
fill-rule="evenodd"
1515
clip-rule="evenodd"
1616
d="M8 2C6.68228 2 5.61 3.07228 5.61 4.39C5.61 5.70772 6.68228 6.78 8 6.78C9.31771 6.78 10.39 5.70772 10.39 4.39C10.39 3.07228 9.31772 2 8 2ZM3.61 4.39C3.61 1.96772 5.57771 0 8 0C10.4223 0 12.39 1.96771 12.39 4.39C12.39 5.66447 11.8453 6.81311 10.9762 7.61551C11.1666 7.71116 11.3535 7.81608 11.5368 7.93001C13.5215 9.15787 15 11.3598 15 14V15H1V14C1 11.147 2.63919 8.7213 4.99701 7.59061C4.14356 6.78943 3.61 5.65134 3.61 4.39ZM10.482 9.62922C9.71501 9.15233 8.88729 8.90797 8.00229 8.91L8 8.91C5.59623 8.91 3.5507 10.634 3.09474 13H12.8975C12.601 11.5742 11.6867 10.3744 10.484 9.63047L10.482 9.62922Z"
17-
fill="white"
1817
/>
1918
</svg>
2019
<svg
21-
v-if="itemTitle == 'Workforce'"
22-
width="20"
23-
height="20"
20+
v-if="itemTitle == 'Workforce' || itemTitle == 'Use professional license'"
21+
width="16"
22+
height="16"
2423
viewBox="0 0 16 16"
2524
fill="none"
2625
xmlns="http://www.w3.org/2000/svg"
27-
transform="translate(0, 20)"
2826
>
2927
<path
28+
class="svg-path"
3029
fill-rule="evenodd"
3130
clip-rule="evenodd"
3231
d="M4 3C3.44772 3 3 3.44772 3 4C3 4.55229 3.44772 5 4 5C4.55228 5 5 4.55229 5 4C5 3.44772 4.55228 3 4 3ZM1 4C1 2.34315 2.34315 1 4 1C5.65685 1 7 2.34315 7 4C7 5.65676 5.65701 6.99984 4.00029 7C6.21244 7.00016 8 8.78781 8 11C8 8.78772 9.78771 7 12 7C14.2123 7 16 8.78772 16 11V14C16 14.5523 15.5523 15 15 15H9C8.44771 15 8 14.5523 8 14C8 14.5523 7.55228 15 7 15H1C0.447715 15 0 14.5523 0 14V11C0 8.78772 1.78801 7 4.00029 7C2.34344 7 1 5.65685 1 4ZM12 7C10.3431 7 9 5.65685 9 4C9 2.34315 10.3431 1 12 1C13.6569 1 15 2.34315 15 4C15 5.65685 13.6569 7 12 7ZM11 4C11 3.44772 11.4477 3 12 3C12.5523 3 13 3.44772 13 4C13 4.55229 12.5523 5 12 5C11.4477 5 11 4.55229 11 4ZM10 11C10 9.89228 10.8923 9 12 9C13.1077 9 14 9.89228 14 11V13H10V11ZM2 11C2 9.89228 2.89228 9 4 9C5.10772 9 6 9.89228 6 11V13H2V11Z"
33-
fill="white"
3432
/>
3533
</svg>
3634
<svg
@@ -40,13 +38,12 @@
4038
viewBox="0 0 16 16"
4139
fill="none"
4240
xmlns="http://www.w3.org/2000/svg"
43-
transform="translate(0, 20)"
4441
>
4542
<path
43+
class="svg-path"
4644
fill-rule="evenodd"
4745
clip-rule="evenodd"
4846
d="M10.0042 11C10.0042 11.009 10.002 11.0325 9.99974 11.0548L9.99979 11.0502L10 11L10 10.9993L9.99997 11L9.995 11.1L9.99652 11.0855L9.99974 11.0548C9.978 13.1703 8.62586 15.046 6.62064 15.7331C4.59789 16.4261 2.3583 15.7562 1.0483 14.0663C-0.261694 12.3764 -0.352147 10.0406 0.823246 8.25441C1.89701 6.62271 3.81005 5.77972 5.71121 6.05367L12.3412 0.24769C12.5235 0.0880192 12.7576 0 13 0H15C15.5523 0 16 0.447715 16 1V6C16 6.55228 15.5523 7 15 7H14V8C14 8.55229 13.5523 9 13 9H12V10C12 10.5523 11.5523 11 11 11H10.0042ZM13.376 2L6.65881 7.88231C6.41017 8.10005 6.07001 8.18087 5.75 8.09825C4.50783 7.77752 3.19918 8.28216 2.49395 9.35384C1.78871 10.4255 1.84298 11.827 2.62898 12.841C3.41498 13.8549 4.75873 14.2569 5.97239 13.841C7.18604 13.4252 8.00096 12.2837 8 11.0007L8.00502 10.9C8.03175 10.634 8.03175 10.366 8.00502 10.1C7.94583 9.51115 8.40818 9 9 9H10V8C10 7.44772 10.4477 7 11 7H12V6C12 5.44772 12.4477 5 13 5H14V2H13.376ZM6 10H4V12H6V10Z"
49-
fill="white"
5047
/>
5148
</svg>
5249
</div>
@@ -87,28 +84,45 @@ export default defineComponent({
8784

8885
<style scoped>
8986
.item-container {
90-
border: 2px solid white;
9187
padding: 5px;
9288
display: flex;
9389
}
90+
91+
.item-container {
92+
border: 1px solid #625f5f;
93+
}
94+
9495
.selected {
95-
border: 2px solid #29a7ff;
96+
border: 1px solid #0e639c;
9697
user-select: none;
9798
}
99+
98100
.title {
99-
font-size: 15px;
101+
font-size: 12px;
100102
font-weight: bold;
101-
color: white;
102103
}
103104
104105
.text {
105106
display: flex;
106107
flex-direction: column;
107-
font-size: 15px;
108-
color: white;
108+
font-size: 12px;
109109
}
110110
111+
.text.vscode-dark {
112+
color: white;
113+
}
114+
.text.vscode-light {
115+
color: black;
116+
}
111117
.icon {
112118
padding-right: 10px;
119+
display: flex;
120+
align-items: center;
121+
}
122+
.vscode-dark .icon .svg-path {
123+
fill: white;
124+
}
125+
.vscode-light .icon .svg-path {
126+
fill: black;
113127
}
114128
</style>

0 commit comments

Comments
 (0)