improve non-editable style message

This commit is contained in:
Corban-Lee Jones 2024-10-03 15:48:52 +01:00
parent 1d8be63834
commit 41771f40e0

View File

@ -138,12 +138,16 @@ getTableFiltersComponent(styleTableId).find(".table-del-btn").on("click", async
const rows = getSelectedTableRows(styleTableId);
const isMany = rows.length > 1;
if (rows.some(row => row.auto_created)) {
for (const row of rows) {
if (!row.auto_created) {
continue;
}
await okModal(
`Cannot Delete Style${isMany ? "s" : ""}`,
"One or more styles were created by the system, and cannot be altered.",
"Cannot Delete Style",
`<b>${row.name}</b> can't be deleted, as it was created by the system, and thus is immutable.`,
"warning",
"bi-cpu",
"bi-arrow-return-right",
null,
);
return