Commit 85fd2e7
feat: add confirmation dialog when deleting a page (#5441)
## Description
This pull request introduces a new feature that adds a confirmation
dialog when deleting a page, helping prevent accidental deletions.
Related issue:
[#5418](#5418)
## Changes
1. Updated `page-settings.tsx` to include a new
`DeleteConfirmationDialog` component.
2. The dialog prompts users to confirm or cancel before a page is
deleted.
3. Enhances user safety and improves UX by preventing unintended
deletions.
(See the image below for a preview of the dialog.)
## How to Test
1. Open any project.
2. Add a new page.
3. Attempt to delete the page, the confirmation dialog should appear
instead of immediately deleting.
4. Clicking Delete should remove the page; clicking Cancel should close
the dialog without deleting.
<img width="1283" height="855" alt="image"
src="https://github.com/user-attachments/assets/d63afe08-75f4-4a53-9e17-50aed4f1330a"
/>
---------
Co-authored-by: Oleg Isonen <[email protected]>1 parent 2752bcc commit 85fd2e7
1 file changed
+90
-16
lines changedLines changed: 90 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
1477 | 1481 | | |
1478 | 1482 | | |
1479 | 1483 | | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
1480 | 1487 | | |
1481 | 1488 | | |
1482 | 1489 | | |
| |||
1532 | 1539 | | |
1533 | 1540 | | |
1534 | 1541 | | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1535 | 1546 | | |
1536 | 1547 | | |
1537 | 1548 | | |
| |||
1544 | 1555 | | |
1545 | 1556 | | |
1546 | 1557 | | |
1547 | | - | |
1548 | | - | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | | - | |
1553 | | - | |
1554 | | - | |
1555 | | - | |
1556 | | - | |
1557 | | - | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1558 | 1568 | | |
1559 | | - | |
1560 | | - | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
1561 | 1574 | | |
1562 | | - | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
1563 | 1613 | | |
1564 | 1614 | | |
1565 | 1615 | | |
1566 | | - | |
1567 | | - | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
1568 | 1642 | | |
1569 | 1643 | | |
1570 | 1644 | | |
| |||
0 commit comments