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")} title={t("labels.delete")}
aria-label={t("labels.delete")} aria-label={t("labels.delete")}
onClick={() => updateData(null)} 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")} aria-label={t("labels.duplicateSelection")}
onClick={() => updateData(null)} onClick={() => updateData(null)}
visible={isSomeElementSelected(getNonDeletedElements(elements), appState)} disabled={
!isSomeElementSelected(getNonDeletedElements(elements), appState)
}
/> />
), ),
}); });

View File

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