Skip to content

Commit 486dd03

Browse files
authored
fix(auth): make view container responsive (aws#5700)
make auth container responsive # Before - The content scales down to 0.6x when the width in less than 260px https://github.com/user-attachments/assets/d38db517-4734-435f-8100-b6a65d502c75 # After ## Login Screen https://github.com/user-attachments/assets/17b579e1-003f-42aa-967e-7565e66624f0 ## Re-Auth Screen https://github.com/user-attachments/assets/2cd8754d-6707-4cd4-a250-7b28a0cd7de5 License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 7fdb8f9 commit 486dd03

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,3 @@
99
/* Alignment */
1010
--auth-container-top: 15%;
1111
}
12-
13-
@media (max-width: 260px) {
14-
body {
15-
scale: 0.6;
16-
}
17-
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,8 @@ export default defineComponent({
592592
margin: auto;
593593
position: absolute;
594594
top: var(--auth-container-top);
595-
width: 260px;
595+
max-width: 260px;
596+
width: 90vw;
596597
}
597598
598599
.header {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,14 @@ export default defineComponent({
169169
justify-content: space-between;
170170
/** The overall height of the container, then spacing is automatic between child elements */
171171
height: 7rem;
172+
text-align: center;
172173
}
173174
174175
#content-container > * {
175176
display: flex;
176177
flex-direction: column;
177178
align-items: center;
179+
text-align: center;
178180
}
179181
180182
#icon-container {
@@ -203,6 +205,7 @@ button#reauthenticate {
203205
padding: 0.3rem;
204206
width: 80%;
205207
user-select: none;
208+
max-width: 260px;
206209
}
207210
208211
button#signout {

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,10 @@ body.vscode-high-contrast:not(body.vscode-high-contrast-light) .icon .svg-path {
188188
body.vscode-high-contrast-light .icon .svg-path {
189189
fill: black;
190190
}
191+
192+
.item-container-base .text .p {
193+
white-space: nowrap;
194+
overflow: hidden;
195+
text-overflow: ellipsis;
196+
}
191197
</style>

0 commit comments

Comments
 (0)