From af2e0269009ecf14fff9f63f90f2167fe5327571 Mon Sep 17 00:00:00 2001 From: Aleix Soler Date: Sun, 20 Jul 2025 21:05:51 +0200 Subject: [PATCH] feat: reorder arrows for custom statuses --- .../SettingsUI.tsx/CustomStatusItem.tsx | 34 +++++++++++++++++ .../SettingsUI.tsx/CustomStatusSettings.tsx | 26 +++++++++++++ styles/components/settings.css | 38 +++++++++++++++++++ 3 files changed, 98 insertions(+) diff --git a/components/SettingsUI.tsx/CustomStatusItem.tsx b/components/SettingsUI.tsx/CustomStatusItem.tsx index 83eb70d..585f854 100644 --- a/components/SettingsUI.tsx/CustomStatusItem.tsx +++ b/components/SettingsUI.tsx/CustomStatusItem.tsx @@ -13,6 +13,10 @@ export type Props = { value: string, ) => void; onCustomStatusRemove: (index: number) => void; + onMoveUp?: (index: number) => void; + onMoveDown?: (index: number) => void; + canMoveUp?: boolean; + canMoveDown?: boolean; }; export const CustomStatusItem: React.FC = ({ @@ -20,6 +24,10 @@ export const CustomStatusItem: React.FC = ({ index, onCustomStatusChange, onCustomStatusRemove, + onMoveUp, + onMoveDown, + canMoveUp = false, + canMoveDown = false, }) => { const isValid = status.name.trim().length > 0; const displayIcon = status.icon.trim() || "📝"; @@ -92,6 +100,32 @@ export const CustomStatusItem: React.FC = ({ /> + {/* Reorder buttons */} + {(onMoveUp || onMoveDown) && ( +
+
+ + +
+
+ )} + {/* Remove button */}