feat: batch favorites endpoint + frontend dedup fixes
Backend: - Add POST /api/favorites/batch endpoint (single multi-row INSERT) - Add BatchFavoritesResult/BatchFavoritesStats DTOs - Add batch methods to ports, service, PG repository - Transaction-based insert with ON CONFLICT DO NOTHING, chunking at 5000 Frontend: - Rewrite batchFavorites() to single API call (40 requests → 1) - Add _replaceCacheFromResponse() to avoid extra GET round-trip - Centralize formatFileSize, isTextViewable, formatDateTime, formatDateShort - Remove duplicate icon mapping from app.js - Fix inconsistent quota defaults (10GB everywhere)
This commit is contained in:
+1
-3
@@ -158,9 +158,7 @@ const recent = {
|
||||
: (window.i18n ? window.i18n.t('files.file_types.document') : 'Document'));
|
||||
|
||||
const fileSize = isFolder ? '--' : (item.size_formatted || (window.formatFileSize ? window.formatFileSize(item.item_size || 0) : '0 B'));
|
||||
const accessedDate = new Date(item.accessed_at);
|
||||
const formattedDate = accessedDate.toLocaleDateString() + ' ' +
|
||||
accessedDate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
||||
const formattedDate = window.formatDateTime(item.accessed_at);
|
||||
|
||||
// Click handler
|
||||
const onClick = () => {
|
||||
|
||||
Reference in New Issue
Block a user