nx-webmail: fix login viewport overflow and initial sync behavior
Some checks failed
Publish nx-webmail Image (Gitea) / publish (push) Has been cancelled

This commit is contained in:
2026-02-23 14:15:52 +01:00
parent ceed81eb15
commit 1626984faf
6 changed files with 20 additions and 21 deletions

View File

@@ -503,7 +503,8 @@ export default function Webmail() {
direction: requestDirection,
updatedAt: Date.now()
};
const visibleState = shouldResetWindow
const shouldPageWindow = shouldResetWindow && !fetchAll;
const visibleState = shouldPageWindow
? buildFirstPageView(nextEmails, safeTotal, requestDirection)
: { emails: nextEmails, paging };
@@ -573,7 +574,7 @@ export default function Webmail() {
keepSelection: true,
silent: Boolean(cachedDefaultEmails) || skipInitialFetchIfCached,
fetchAll: true,
resetToFirstPage: true
resetToFirstPage: false
});
saveSession(credOverride, defaultFolder);
upsertAccount(credOverride, defaultFolder);

View File

@@ -1383,10 +1383,12 @@ body.webmail-active {
}
.webmail-login-page {
min-height: calc(100vh - 24px);
width: 100%;
margin: 12px;
border-radius: 22px;
box-sizing: border-box;
min-height: calc(100dvh - 16px);
width: calc(100% - 16px);
max-width: calc(100vw - 16px);
margin: 8px auto;
border-radius: 14px;
overflow: hidden;
display: flex;
align-items: center;
@@ -1402,6 +1404,7 @@ body.webmail-active {
}
.webmail-login-panel {
box-sizing: border-box;
width: min(100%, 520px);
color: #f8fafc;
}
@@ -1432,6 +1435,7 @@ body.webmail-active {
}
.webmail-login-form-wrap {
box-sizing: border-box;
width: min(100%, 460px);
}
@@ -1477,9 +1481,11 @@ body.webmail-active {
@media (max-width: 900px) {
.webmail-login-page {
align-items: flex-start;
min-height: calc(100vh - 16px);
min-height: calc(100dvh - 8px);
margin: 8px;
border-radius: 16px;
width: calc(100% - 16px);
max-width: calc(100vw - 16px);
border-radius: 10px;
padding: 24px 18px;
background-position: 58% center;
}