Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duplicate item button #105

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Add duplicate item button #105

wants to merge 2 commits into from

Conversation

MahmoudHamdy02
Copy link
Collaborator

@MahmoudHamdy02 MahmoudHamdy02 commented Sep 1, 2023

Closes #99
Errors need to be shown somewhere in the page

@MahmoudHamdy02 MahmoudHamdy02 force-pushed the duplicate-item branch 2 times, most recently from a82b71f to 35b12bb Compare September 1, 2023 11:50
@@ -210,6 +214,7 @@ export const Application = () => {
{ title: _("Edit properties"), onClick: _editProperties },
{ title: cockpit.format(_("Rename $0"), selectedContext?.type), onClick: _renameItem },
{ type: "divider" },
{ title: cockpit.format(_("Duplicate $0"), selectedContext?.type), onClick: _duplicateItem },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the 'Copy to...' label that the nautilus is using and allow the user to select the target directory.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this should use the FileAutoComplete component (like in creating link)? Because it shows all files, while we want directories only

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I think the FileAutocomplete component would need extension to support showing only specific type (file vs directory)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but for now it should be fine to introduce this with a plain text input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add 'duplicate item' button
2 participants