move selection and deletion back to right

This commit is contained in:
Ryan Di
2025-09-22 15:32:11 +10:00
parent 3ca55e9a45
commit 31775ce3ed
3 changed files with 21 additions and 9 deletions

View File

@@ -323,7 +323,9 @@ export const actionDeleteSelected = register({
title={t("labels.delete")}
aria-label={t("labels.delete")}
onClick={() => updateData(null)}
visible={isSomeElementSelected(getNonDeletedElements(elements), appState)}
disabled={
!isSomeElementSelected(getNonDeletedElements(elements), appState)
}
/>
),
});

View File

@@ -115,7 +115,9 @@ export const actionDuplicateSelection = register({
)}`}
aria-label={t("labels.duplicateSelection")}
onClick={() => updateData(null)}
visible={isSomeElementSelected(getNonDeletedElements(elements), appState)}
disabled={
!isSomeElementSelected(getNonDeletedElements(elements), appState)
}
/>
),
});

View File

@@ -919,10 +919,9 @@ export const MobileShapeActions = ({
style={{
flexDirection: "row",
boxShadow: "none",
backgroundColor: "transparent",
padding: 0,
margin: "0 0.25rem",
zIndex: 2,
backgroundColor: "transparent",
height: WIDTH * 1.75,
alignItems: "center",
gap: GAP,
@@ -987,9 +986,6 @@ export const MobileShapeActions = ({
</>
)}
{showDuplicate && renderAction("duplicateSelection")}
{showDelete && renderAction("deleteSelectedElements")}
{/* Combined Other Actions */}
<CombinedExtraActions
appState={appState}
@@ -1007,8 +1003,20 @@ export const MobileShapeActions = ({
gap: GAP,
}}
>
{renderAction("undo")}
{showRedo && renderAction("redo")}
<div className="compact-action-item">{renderAction("undo")}</div>
{showRedo && (
<div className="compact-action-item">{renderAction("redo")}</div>
)}
{showDuplicate && (
<div className="compact-action-item">
{renderAction("duplicateSelection")}
</div>
)}
{showDelete && (
<div className="compact-action-item">
{renderAction("deleteSelectedElements")}
</div>
)}
</div>
</Island>
);