- Added coverage reporting for Vitest with configuration in vitest.config.mjs - Updated package.json to include new scripts for JS coverage, linting, and formatting - Modified run_quality_gate.py to allow skipping ESLint and Prettier checks - Introduced .prettierrc for consistent code formatting - Created .prettierignore to exclude specific files and directories from formatting
15 lines
625 B
JavaScript
15 lines
625 B
JavaScript
import { APP_CONFIG } from "../app/config.js";
|
|
import { comfyConfirm } from "../app/dialogs.js";
|
|
import { t } from "../app/i18n.js";
|
|
|
|
export async function confirmDeletion(count, label) {
|
|
if (!APP_CONFIG.DELETE_CONFIRMATION) return true;
|
|
const message =
|
|
count > 1
|
|
? t("dialog.deleteSelectedFiles", "Delete {count} selected files?", { count })
|
|
: t("dialog.deleteSingleFile", 'Delete "{label}"?', {
|
|
label: String(label || t("label.thisFile", "this file")),
|
|
});
|
|
return comfyConfirm(message, t("dialog.confirmDeleteTitle", "Majoor: Confirm delete"));
|
|
}
|