Skip to content

Commit 844b5a7

Browse files
jdunkerleyfarmaazon
authored andcommitted
Enables Rename for all types in cloud (#12821)
- Removed the type filter for the rename option in the menu - Altered the DatalinkNameColumn to follow the editing flag.
1 parent f984875 commit 844b5a7

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

app/gui/src/dashboard/components/dashboard/DatalinkNameColumn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function DatalinkNameColumn(props: DatalinkNameColumnProps) {
4949
>
5050
<img src={DatalinkIcon} className="m-name-column-icon size-4" />
5151
<EditableSpan
52-
editable={false}
52+
editable={rowState.isEditingName}
5353
onSubmit={doRename}
5454
onCancel={() => {
5555
setIsEditing(false)

app/gui/src/dashboard/layouts/AssetContextMenu.tsx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -300,21 +300,15 @@ export default function AssetContextMenu(props: AssetContextMenuProps) {
300300
}}
301301
/>
302302
)}
303-
{canExecute &&
304-
!isRunningProject &&
305-
!isOtherUserUsingProject &&
306-
(!isCloud ||
307-
asset.type === backendModule.AssetType.project ||
308-
asset.type === backendModule.AssetType.directory ||
309-
asset.type === backendModule.AssetType.secret) && (
310-
<ContextMenuEntry
311-
hidden={hidden}
312-
action="rename"
313-
doAction={() => {
314-
setRowState(object.merger({ isEditingName: true }))
315-
}}
316-
/>
317-
)}
303+
{canExecute && !isRunningProject && !isOtherUserUsingProject && (
304+
<ContextMenuEntry
305+
hidden={hidden}
306+
action="rename"
307+
doAction={() => {
308+
setRowState(object.merger({ isEditingName: true }))
309+
}}
310+
/>
311+
)}
318312
{(asset.type === backendModule.AssetType.secret ||
319313
asset.type === backendModule.AssetType.datalink) &&
320314
canEditThisAsset && (

0 commit comments

Comments
 (0)