refactor: small ux improvements

- rename dissolve > ungroup
- prevent ondrag when clicking
- add untitled as block title fallback
- move block action to context menu
This commit is contained in:
Carlos Valente
2025-05-23 13:06:48 +02:00
committed by arc-alex
parent 2546159a94
commit 17deeddb87
9 changed files with 47 additions and 53 deletions
@@ -11,7 +11,7 @@ import {
deleteAllEntries,
deleteEvent,
editEvent,
dissolveBlock,
ungroupEntries,
groupEntries,
reorderEntry,
swapEvents,
@@ -139,9 +139,9 @@ export async function rundownCloneEntry(req: Request, res: Response<Rundown | Er
}
}
export async function rundownDissolveBlock(req: Request, res: Response<Rundown | ErrorResponse>) {
export async function rundownUngroupEntries(req: Request, res: Response<Rundown | ErrorResponse>) {
try {
const newRundown = await dissolveBlock(req.params.entryId);
const newRundown = await ungroupEntries(req.params.entryId);
res.status(200).send(newRundown);
} catch (error) {
const message = getErrorMessage(error);
@@ -7,7 +7,7 @@ import {
rundownBatchPut,
rundownCloneEntry,
rundownDelete,
rundownDissolveBlock,
rundownUngroupEntries,
rundownGetAll,
rundownGetById,
rundownGetCurrent,
@@ -41,7 +41,7 @@ router.patch('/reorder/', rundownReorderValidator, rundownReorder);
router.patch('/swap', rundownSwapValidator, rundownSwap);
router.patch('/applydelay/:entryId', paramsMustHaveEntryId, rundownApplyDelay);
router.post('/clone/:entryId', paramsMustHaveEntryId, rundownCloneEntry);
router.post('/dissolve/:entryId', paramsMustHaveEntryId, rundownDissolveBlock);
router.post('/ungroup/:entryId', paramsMustHaveEntryId, rundownUngroupEntries);
router.post('/group', rundownArrayOfIds, rundownAddToBlock);
router.delete('/', rundownArrayOfIds, deletesEventById);