@bobfrankston/rmfmail 1.1.200 → 1.1.201
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/app.bundle.js +28 -9
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +7 -9
- package/client/app.js.map +1 -1
- package/client/app.ts +7 -9
- package/client/components/message-list.js +47 -0
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +46 -0
- package/package.json +3 -3
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-48876 → node_modules.npmglobalize-stash-50612}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -2595,10 +2595,29 @@ __export(message_list_exports, {
|
|
|
2595
2595
|
reloadCurrentFolder: () => reloadCurrentFolder,
|
|
2596
2596
|
removeMessagesAndReconcile: () => removeMessagesAndReconcile,
|
|
2597
2597
|
scrollFocusedIntoView: () => scrollFocusedIntoView,
|
|
2598
|
+
setLiveFilter: () => setLiveFilter,
|
|
2598
2599
|
setRowFlagged: () => setRowFlagged,
|
|
2599
2600
|
setRowSeen: () => setRowSeen,
|
|
2600
2601
|
showThreadPopup: () => showThreadPopup
|
|
2601
2602
|
});
|
|
2603
|
+
function setLiveFilter(query) {
|
|
2604
|
+
liveFilterText = (query || "").trim().toLowerCase();
|
|
2605
|
+
const body = document.getElementById("ml-body");
|
|
2606
|
+
if (body)
|
|
2607
|
+
applyLiveFilter(body);
|
|
2608
|
+
}
|
|
2609
|
+
function applyLiveFilter(body) {
|
|
2610
|
+
if (!liveFilterText) {
|
|
2611
|
+
for (const row of body.querySelectorAll(".ml-row.filter-hidden")) {
|
|
2612
|
+
row.classList.remove("filter-hidden");
|
|
2613
|
+
}
|
|
2614
|
+
return;
|
|
2615
|
+
}
|
|
2616
|
+
for (const row of body.querySelectorAll(".ml-row")) {
|
|
2617
|
+
const text = row.textContent?.toLowerCase() || "";
|
|
2618
|
+
row.classList.toggle("filter-hidden", !text.includes(liveFilterText));
|
|
2619
|
+
}
|
|
2620
|
+
}
|
|
2602
2621
|
function cacheKey(mode, a, f, flagged, q) {
|
|
2603
2622
|
if (mode === "folder")
|
|
2604
2623
|
return `folder:${a}:${f}:${flagged ? "flag" : ""}`;
|
|
@@ -3034,6 +3053,8 @@ function removeMessagesAndReconcile(uids) {
|
|
|
3034
3053
|
function reloadCurrentFolder() {
|
|
3035
3054
|
if (searchMode)
|
|
3036
3055
|
return;
|
|
3056
|
+
if (liveFilterText)
|
|
3057
|
+
return;
|
|
3037
3058
|
if (unifiedMode) {
|
|
3038
3059
|
loadUnifiedInbox(false);
|
|
3039
3060
|
} else if (currentAccountId2 && currentFolderId) {
|
|
@@ -3042,6 +3063,7 @@ function reloadCurrentFolder() {
|
|
|
3042
3063
|
}
|
|
3043
3064
|
function clearSearchMode() {
|
|
3044
3065
|
searchMode = false;
|
|
3066
|
+
liveFilterText = "";
|
|
3045
3067
|
currentSearchQuery = "";
|
|
3046
3068
|
if (wasUnifiedBeforeSearch)
|
|
3047
3069
|
unifiedMode = true;
|
|
@@ -3114,6 +3136,7 @@ async function loadSearchResults(query, scope = "all", accountId = "", folderId
|
|
|
3114
3136
|
if (!searchMode)
|
|
3115
3137
|
wasUnifiedBeforeSearch = unifiedMode;
|
|
3116
3138
|
searchMode = true;
|
|
3139
|
+
liveFilterText = "";
|
|
3117
3140
|
unifiedMode = false;
|
|
3118
3141
|
currentSearchQuery = query;
|
|
3119
3142
|
currentPage = 1;
|
|
@@ -3307,6 +3330,8 @@ function renderMessages(body, accountId, items) {
|
|
|
3307
3330
|
focusedRow = null;
|
|
3308
3331
|
}
|
|
3309
3332
|
}
|
|
3333
|
+
if (liveFilterText)
|
|
3334
|
+
applyLiveFilter(body);
|
|
3310
3335
|
}
|
|
3311
3336
|
function selectFirst(body) {
|
|
3312
3337
|
if (window.innerWidth <= 768)
|
|
@@ -3478,7 +3503,7 @@ function escapeHtml2(s) {
|
|
|
3478
3503
|
div.textContent = s;
|
|
3479
3504
|
return div.innerHTML;
|
|
3480
3505
|
}
|
|
3481
|
-
var onMessageSelect, currentAccountId2, currentFolderId, currentSpecialUse, lastClickedRow, currentPage, totalMessages, loading, unifiedMode, searchMode, currentSearchQuery, wasUnifiedBeforeSearch, showToInsteadOfFrom, touchWasScroll, currentSort, currentSortDir, loadGen, listCache, CACHE_KEY_UNIFIED, positionMemory, POSITION_STORAGE_KEY, focusedRow, rowByKey, prioritySenders, priorityDomains, timeFmt, dateFmt, dateFmtSameYear, MessageRow;
|
|
3506
|
+
var onMessageSelect, currentAccountId2, currentFolderId, currentSpecialUse, lastClickedRow, currentPage, totalMessages, loading, unifiedMode, searchMode, liveFilterText, currentSearchQuery, wasUnifiedBeforeSearch, showToInsteadOfFrom, touchWasScroll, currentSort, currentSortDir, loadGen, listCache, CACHE_KEY_UNIFIED, positionMemory, POSITION_STORAGE_KEY, focusedRow, rowByKey, prioritySenders, priorityDomains, timeFmt, dateFmt, dateFmtSameYear, MessageRow;
|
|
3482
3507
|
var init_message_list = __esm({
|
|
3483
3508
|
"client/components/message-list.js"() {
|
|
3484
3509
|
"use strict";
|
|
@@ -3493,6 +3518,7 @@ var init_message_list = __esm({
|
|
|
3493
3518
|
loading = false;
|
|
3494
3519
|
unifiedMode = false;
|
|
3495
3520
|
searchMode = false;
|
|
3521
|
+
liveFilterText = "";
|
|
3496
3522
|
currentSearchQuery = "";
|
|
3497
3523
|
wasUnifiedBeforeSearch = false;
|
|
3498
3524
|
showToInsteadOfFrom = false;
|
|
@@ -8390,14 +8416,7 @@ function doSearch(immediate = false) {
|
|
|
8390
8416
|
}
|
|
8391
8417
|
cancelServerSearch();
|
|
8392
8418
|
if (localScope === "current" && !serverOn && !immediate) {
|
|
8393
|
-
|
|
8394
|
-
if (body) {
|
|
8395
|
-
const lower = query.toLowerCase();
|
|
8396
|
-
for (const row of body.querySelectorAll(".ml-row")) {
|
|
8397
|
-
const text = row.textContent?.toLowerCase() || "";
|
|
8398
|
-
row.classList.toggle("filter-hidden", !text.includes(lower));
|
|
8399
|
-
}
|
|
8400
|
-
}
|
|
8419
|
+
setLiveFilter(query);
|
|
8401
8420
|
return;
|
|
8402
8421
|
}
|
|
8403
8422
|
const localScopeEff = localScope === "current" ? "current" : "all";
|