Page management: no Delete button on the core pages the server won't delete
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f1a0b06ac2
commit
ab8dcdd608
2 changed files with 3 additions and 1 deletions
|
|
@ -469,6 +469,8 @@ export const pages = {
|
||||||
singular: "page",
|
singular: "page",
|
||||||
idLabel: "URL ID",
|
idLabel: "URL ID",
|
||||||
slugFrom: "title",
|
slugFrom: "title",
|
||||||
|
// The server refuses to delete these (CORE_PAGES); no Delete button.
|
||||||
|
undeletable: CORE_PAGE_IDS,
|
||||||
// Every page's address, title, intro and switches, then its own
|
// Every page's address, title, intro and switches, then its own
|
||||||
// sections, the front page's included (its hero and bands).
|
// sections, the front page's included (its hero and bands).
|
||||||
list: {
|
list: {
|
||||||
|
|
|
||||||
|
|
@ -638,7 +638,7 @@ export default function EntityEdit() {
|
||||||
Discard draft
|
Discard draft
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
{!isNew && !singleton && canDelete && (
|
{!isNew && !singleton && canDelete && !manifest.undeletable?.includes(id) && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={remove}
|
onClick={remove}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue