|
47 | 47 | currRight = RIGHTMODES.Decrypt |
48 | 48 | } |
49 | 49 |
|
| 50 | + function backToList() { |
| 51 | + // On mobile the list and reader are stacked single-screen flows; |
| 52 | + // resetting both selection and hashMode collapses currRight back to |
| 53 | + // Nothing via the effect above, which hides the reader panel. |
| 54 | + currSelected.set(-1) |
| 55 | + hashMode = false |
| 56 | + currRight = RIGHTMODES.Nothing |
| 57 | + } |
| 58 | +
|
50 | 59 | function fromUrlSafeBase64(urlSafe) { |
51 | 60 | let base64 = urlSafe.replace(/-/g, '+').replace(/_/g, '/') |
52 | 61 | const pad = base64.length % 4 |
|
129 | 138 | <span>{$_('fallback.extensionPrompt')}</span> |
130 | 139 | <a href={resolve('/addons/')}>{$_('fallback.extensionLink')}</a> |
131 | 140 | </div> |
132 | | - <div class="fallback-container"> |
| 141 | + <div |
| 142 | + class="fallback-container" |
| 143 | + class:mobile-reading={currRight !== RIGHTMODES.Nothing} |
| 144 | + > |
133 | 145 | <div class="left-panel"> |
134 | 146 | {#if !hashMode} |
135 | 147 | <label class="upload-area"> |
|
138 | 150 | width="28px" |
139 | 151 | aria-hidden="true" |
140 | 152 | /> |
141 | | - <span>{$_('fallback.drop')}</span> |
| 153 | + <span class="upload-text upload-text-desktop" |
| 154 | + >{$_('fallback.drop')}</span |
| 155 | + > |
| 156 | + <span class="upload-text upload-text-mobile" |
| 157 | + >{$_('fallback.upload')}</span |
| 158 | + > |
142 | 159 | <input |
143 | 160 | type="file" |
144 | 161 | onchange={onFile} |
145 | | - aria-label={$_('fallback.drop')} |
| 162 | + aria-label={$_('fallback.upload')} |
146 | 163 | /> |
147 | 164 | </label> |
148 | 165 | {/if} |
|
180 | 197 | </div> |
181 | 198 |
|
182 | 199 | <div class="right-panel"> |
| 200 | + {#if currRight !== RIGHTMODES.Nothing} |
| 201 | + <button class="mobile-back" type="button" onclick={backToList}> |
| 202 | + <Icon icon="mdi:arrow-left" width="20px" /> |
| 203 | + <span>{$_('fallback.back')}</span> |
| 204 | + </button> |
| 205 | + {/if} |
183 | 206 | {#if currRight === RIGHTMODES.MailView} |
184 | 207 | <EmailView /> |
185 | 208 | {:else if currRight === RIGHTMODES.Nothing} |
|
242 | 265 |
|
243 | 266 | a { |
244 | 267 | color: var(--pg-primary); |
245 | | - font-weight: var(--pg-font-weight-semibold); |
| 268 | + font-weight: var(--pg-font-weight-medium); |
246 | 269 | text-decoration: none; |
247 | 270 |
|
248 | 271 | &:hover { |
|
294 | 317 | } |
295 | 318 | } |
296 | 319 |
|
| 320 | + .upload-text-mobile { |
| 321 | + display: none; |
| 322 | + } |
| 323 | +
|
| 324 | + .mobile-back { |
| 325 | + display: none; |
| 326 | + } |
| 327 | +
|
297 | 328 | .search-bar { |
298 | 329 | display: flex; |
299 | 330 | align-items: center; |
|
377 | 408 |
|
378 | 409 | h2 { |
379 | 410 | font-size: var(--pg-font-size-lg); |
380 | | - font-weight: var(--pg-font-weight-semibold); |
| 411 | + font-weight: var(--pg-font-weight-medium); |
381 | 412 | margin: 0 0 0.75rem; |
382 | 413 | } |
383 | 414 |
|
|
411 | 442 |
|
412 | 443 | @media only screen and (max-width: 768px) { |
413 | 444 | .fallback-page { |
414 | | - height: auto; |
415 | | - min-height: calc(100vh - 52px); |
| 445 | + height: calc(100vh - 52px); |
| 446 | + min-height: 0; |
| 447 | + padding: 0; |
| 448 | + } |
| 449 | +
|
| 450 | + .extension-banner { |
| 451 | + display: none; |
| 452 | + } |
| 453 | +
|
| 454 | + .upload-area { |
| 455 | + flex: 0 0 auto; |
| 456 | + flex-direction: row; |
| 457 | + padding: 0.75rem 1rem; |
| 458 | + margin: 0.75rem 1rem; |
| 459 | + border-style: solid; |
| 460 | + border-color: var(--pg-primary); |
| 461 | + background: var(--pg-primary); |
| 462 | + color: white; |
| 463 | + order: 3; |
| 464 | +
|
| 465 | + &:hover { |
| 466 | + color: white; |
| 467 | + opacity: 0.9; |
| 468 | + } |
| 469 | + } |
| 470 | +
|
| 471 | + .upload-text-desktop { |
| 472 | + display: none; |
| 473 | + } |
| 474 | +
|
| 475 | + .upload-text-mobile { |
| 476 | + display: inline; |
| 477 | + } |
| 478 | +
|
| 479 | + .search-bar { |
| 480 | + order: 1; |
| 481 | + padding-top: 0.75rem; |
| 482 | + flex: 0 0 auto; |
| 483 | + } |
| 484 | +
|
| 485 | + .email-list-area { |
| 486 | + order: 2; |
| 487 | + flex: 1 1 0; |
| 488 | + min-height: 0; |
416 | 489 | } |
417 | 490 |
|
418 | 491 | .fallback-container { |
419 | 492 | flex-direction: column; |
420 | | - height: auto; |
| 493 | + height: 100%; |
| 494 | + gap: 0; |
| 495 | + flex: 1; |
| 496 | + min-height: 0; |
421 | 497 | } |
422 | 498 |
|
423 | 499 | .left-panel { |
424 | | - flex: none; |
425 | | - max-height: 40vh; |
| 500 | + flex: 1 1 0; |
| 501 | + min-height: 0; |
| 502 | + max-height: none; |
| 503 | + border: none; |
| 504 | + border-radius: 0; |
426 | 505 | } |
427 | 506 |
|
428 | 507 | .right-panel { |
429 | | - min-height: 50vh; |
| 508 | + min-height: 0; |
| 509 | + border: none; |
| 510 | + border-radius: 0; |
| 511 | + flex: 1 1 0; |
| 512 | + } |
| 513 | +
|
| 514 | + // Single-screen flow: list view OR reader view, never both. |
| 515 | + .fallback-container.mobile-reading .left-panel { |
| 516 | + display: none; |
| 517 | + } |
| 518 | +
|
| 519 | + .fallback-container:not(.mobile-reading) .right-panel { |
| 520 | + display: none; |
| 521 | + } |
| 522 | +
|
| 523 | + .mobile-back { |
| 524 | + all: unset; |
| 525 | + cursor: pointer; |
| 526 | + display: flex; |
| 527 | + align-items: center; |
| 528 | + gap: 0.4rem; |
| 529 | + padding: 0.75rem 1rem; |
| 530 | + font-size: var(--pg-font-size-sm); |
| 531 | + font-weight: var(--pg-font-weight-medium); |
| 532 | + color: var(--pg-primary); |
| 533 | + border-bottom: 1px solid var(--pg-input-normal); |
| 534 | + flex-shrink: 0; |
430 | 535 | } |
431 | 536 | } |
432 | 537 | </style> |
0 commit comments