feat(trash): move trash API to normalized version (with cursor, orderBy) + normalize Trash section to existing components

normalize also component to format badges (expiry, role, etc)
This commit is contained in:
Edouard Vanbelle
2026-05-30 00:15:07 +02:00
parent 6dab878919
commit ea83891a61
34 changed files with 2043 additions and 418 deletions
+3 -9
View File
@@ -10,17 +10,11 @@
* live in shareModal.css.
*/
import { formatExpiryDate } from '../core/formatters.js';
import { i18n } from '../core/i18n.js';
/**
* Format a YYYY-MM-DD string for display ("Dec 31, 2026").
* @param {string} dateStr
* @returns {string}
*/
export function formatExpiryDate(dateStr) {
const d = new Date(`${dateStr}T00:00:00`);
return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });
}
// Re-export so existing import sites keep working after the move to core/formatters.js.
export { formatExpiryDate };
/**
* Build an interactive expiry chip.