mirror of
https://github.com/Av0idD4rk/firegex.git
synced 2026-10-24 11:29:24 +00:00
Three separate defects made the rule list impossible to reorder:
- The Card's own `style` was placed after `{...provided.draggableProps}`,
clobbering the `position`/`transform` dnd sets while dragging. The drag
did start, but nothing moved on screen. Styles are now merged with dnd's
winning, and the dragged card is highlighted.
- `Draggable index` used the position in the full `state` array and the
rules of the other table were filtered out afterwards, leaving gaps.
dnd requires contiguous indexes from 0 inside a Droppable, so a single
rule in the other table broke the visible tab entirely. Visible rules
are now re-indexed and mapped back to their `state` position on drop.
- `destination?.index || 0` reordered to the top instead of doing nothing
when a rule was dropped outside the list.
|
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .env.demo | ||
| bun.lock | ||
| index.html | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
Firegex Frontend
The frontend of firegex is written using vite. The routing of the pages is managed by react-router 6 and the graphics is mainly managed by the framework Mantine and icons provided by React Icons. The style of the page is written with sass.
The page is auto-updated by a global timeout and also thanks to socket.io that raise an event triggering all parts of the app that requires fetch updated data from the backend, the update of these data.
