- Added DuplicatesService for background duplicate analysis and similarity detection. - Introduced endpoints for analyzing duplicates, checking status, and merging tags. - Created utility functions for file hashing and perceptual hashing. - Implemented watcher settings for runtime tuning of debounce and deduplication. - Added database maintenance tools for resetting and deleting the database. - Enhanced error handling with sanitization for client responses. - Added tests for duplicates service and error handling. - Updated ESLint configuration for better code quality checks. - Introduced filename validation and logging utilities.
12 lines
452 B
JavaScript
12 lines
452 B
JavaScript
import { APP_CONFIG } from "../app/config.js";
|
|
import { comfyConfirm } from "../app/dialogs.js";
|
|
|
|
export async function confirmDeletion(count, label) {
|
|
if (!APP_CONFIG.DELETE_CONFIRMATION) return true;
|
|
const target = count > 1 ? `${count} files` : `"${label || "this file"}"`;
|
|
const message = count > 1
|
|
? `Delete ${count} selected files?`
|
|
: `Delete ${target}?`;
|
|
return comfyConfirm(message, "Majoor: Confirm delete");
|
|
}
|