Compare commits

..

No commits in common. "d159ac484ab2df9bd1fc87c5cd273ff23d9cc544" and "169817f7070b96ad0fbf59c0fcb4e780b4f17859" have entirely different histories.

2 changed files with 7 additions and 17 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "multi-hoster-uploader", "name": "multi-hoster-uploader",
"version": "3.3.51", "version": "3.3.50",
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously", "description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -63,12 +63,10 @@ const queueSortState = { key: 'filename', direction: 'asc' };
// History state // History state
let historyRowsData = []; let historyRowsData = [];
let historySortState = { key: 'date', direction: 'desc' }; let historySortState = { key: 'date', direction: 'desc' };
let _historySortClicked = false;
// Session-specific files for the "Files" panel (resets each session) // Session-specific files for the "Files" panel (resets each session)
let sessionFilesData = []; let sessionFilesData = [];
const recentSortState = { key: 'date', direction: 'desc' }; const recentSortState = { key: 'date', direction: 'desc' };
let _recentSortClicked = false;
const selectedRecentIds = new Set(); const selectedRecentIds = new Set();
// Maintained incrementally — avoids O(n) filter() scans every 250ms in the status bar. // Maintained incrementally — avoids O(n) filter() scans every 250ms in the status bar.
let _sessionDoneCount = 0; let _sessionDoneCount = 0;
@ -4152,14 +4150,8 @@ function renderHistoryTable(container) {
const th = e.target.closest('th.sortable'); const th = e.target.closest('th.sortable');
if (th && container.contains(th)) { if (th && container.contains(th)) {
const key = th.dataset.historySort; const key = th.dataset.historySort;
const defaultDir = key === 'date' ? 'desc' : 'asc'; if (historySortState.key === key) historySortState.direction = historySortState.direction === 'asc' ? 'desc' : 'asc';
if (!_historySortClicked || historySortState.key !== key) { else { historySortState.key = key; historySortState.direction = key === 'date' ? 'desc' : 'asc'; }
_historySortClicked = true;
historySortState.key = key;
historySortState.direction = defaultDir;
} else {
historySortState.direction = historySortState.direction === 'asc' ? 'desc' : 'asc';
}
renderHistoryTable(container); renderHistoryTable(container);
return; return;
} }
@ -4215,13 +4207,11 @@ function setupListeners() {
const th = e.target.closest('th[data-recent-sort]'); const th = e.target.closest('th[data-recent-sort]');
if (!th) return; if (!th) return;
const key = th.dataset.recentSort; const key = th.dataset.recentSort;
const defaultDir = key === 'date' ? 'desc' : 'asc'; if (recentSortState.key === key) {
if (!_recentSortClicked || recentSortState.key !== key) {
_recentSortClicked = true;
recentSortState.key = key;
recentSortState.direction = defaultDir;
} else {
recentSortState.direction = recentSortState.direction === 'desc' ? 'asc' : 'desc'; recentSortState.direction = recentSortState.direction === 'desc' ? 'asc' : 'desc';
} else {
recentSortState.key = key;
recentSortState.direction = key === 'date' ? 'desc' : 'asc';
} }
renderRecentUploadsPanel(); renderRecentUploadsPanel();
}); });