fix(sign-on): resize the window per tab instead of scrolling
- commit
- 72abcb10bfedb434979807b522210da1b1c3217d
- author
- Kit · · 2026-09-27 13:19 UTC
- parent
- fea78dd
- signature
- SSH Unverified
SHA256:H91DFuEG4jpk5edzLA4aUKkpv4zv9Q339ipRmkph6TkThe key is unknown
2 files · +10 -3
M src/lib/components/desktop/sign-on-window.svelte +3 -3
| @@ -176,7 +176,7 @@ | |||
| 176 | 176 | <XpWindow | |
| 177 | 177 | id={WINDOW_ID} | |
| 178 | 178 | width={300} | |
| 179 | - | height={activeTab === 'signin' ? 400 : 520} | |
| 179 | + | height={activeTab === 'signin' ? 380 : 600} | |
| 180 | 180 | resizableWindow={false} | |
| 181 | 181 | > | |
| 182 | 182 | <div class="signon"> | |
| @@ -269,7 +269,7 @@ | |||
| 269 | 269 | onfocus={() => (showStrength = true)} | |
| 270 | 270 | /> | |
| 271 | 271 | {#if showStrength} | |
| 272 | - | <PasswordStrengthIndicator password={suPassword} showDetails={true} /> | |
| 272 | + | <PasswordStrengthIndicator password={suPassword} showDetails={false} /> | |
| 273 | 273 | {/if} | |
| 274 | 274 | </div> | |
| 275 | 275 | <div class="field-row-stacked"> | |
| @@ -306,7 +306,7 @@ | |||
| 306 | 306 | gap: 8px; | |
| 307 | 307 | font-size: 11px; | |
| 308 | 308 | height: 100%; | |
| 309 | - | overflow-y: auto; | |
| 309 | + | overflow: hidden; | |
| 310 | 310 | } | |
| 311 | 311 | ||
| 312 | 312 | .banner { | |
| @@ -176,7 +176,7 @@ | |||||
| 176 | <XpWindow | 176 | <XpWindow | ||
| 177 | id={WINDOW_ID} | 177 | id={WINDOW_ID} | ||
| 178 | width={300} | 178 | width={300} | ||
| 179 | - | height={activeTab === 'signin' ? 400 : 520} | 179 | + | height={activeTab === 'signin' ? 380 : 600} |
| 180 | resizableWindow={false} | 180 | resizableWindow={false} | ||
| 181 | > | 181 | > | ||
| 182 | <div class="signon"> | 182 | <div class="signon"> | ||
| @@ -269,7 +269,7 @@ | |||||
| 269 | onfocus={() => (showStrength = true)} | 269 | onfocus={() => (showStrength = true)} | ||
| 270 | /> | 270 | /> | ||
| 271 | {#if showStrength} | 271 | {#if showStrength} | ||
| 272 | - | <PasswordStrengthIndicator password={suPassword} showDetails={true} /> | 272 | + | <PasswordStrengthIndicator password={suPassword} showDetails={false} /> |
| 273 | {/if} | 273 | {/if} | ||
| 274 | </div> | 274 | </div> | ||
| 275 | <div class="field-row-stacked"> | 275 | <div class="field-row-stacked"> | ||
| @@ -306,7 +306,7 @@ | |||||
| 306 | gap: 8px; | 306 | gap: 8px; | ||
| 307 | font-size: 11px; | 307 | font-size: 11px; | ||
| 308 | height: 100%; | 308 | height: 100%; | ||
| 309 | - | overflow-y: auto; | 309 | + | overflow: hidden; |
| 310 | } | 310 | } | ||
| 311 | 311 | ||||
| 312 | .banner { | 312 | .banner { | ||
M src/lib/components/desktop/xp-window.svelte +7 -0
| @@ -70,6 +70,13 @@ | |||
| 70 | 70 | return () => window.removeEventListener('resize', onResize); | |
| 71 | 71 | }); | |
| 72 | 72 | ||
| 73 | + | // Follow explicit size changes from the parent (e.g. a dialog switching tabs) | |
| 74 | + | $effect(() => { | |
| 75 | + | if (isMaximized) return; | |
| 76 | + | w = width; | |
| 77 | + | h = height; | |
| 78 | + | }); | |
| 79 | + | ||
| 73 | 80 | function close() { | |
| 74 | 81 | onClose?.(); | |
| 75 | 82 | desktop.close(id); | |
| @@ -70,6 +70,13 @@ | |||||
| 70 | return () => window.removeEventListener('resize', onResize); | 70 | return () => window.removeEventListener('resize', onResize); | ||
| 71 | }); | 71 | }); | ||
| 72 | 72 | ||||
| 73 | + | // Follow explicit size changes from the parent (e.g. a dialog switching tabs) | |||
| 74 | + | $effect(() => { | |||
| 75 | + | if (isMaximized) return; | |||
| 76 | + | w = width; | |||
| 77 | + | h = height; | |||
| 78 | + | }); | |||
| 79 | + | ||||
| 73 | function close() { | 80 | function close() { | ||
| 74 | onClose?.(); | 81 | onClose?.(); | ||
| 75 | desktop.close(id); | 82 | desktop.close(id); | ||