-
Notifications
You must be signed in to change notification settings - Fork 37
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
Directly use fsinfo state #434
base: main
Are you sure you want to change the base?
Conversation
modalTitle = cockpit.format( | ||
forceDelete ? _("Force delete link $0?") : _("Delete link $0?"), selectedItem.name | ||
forceDelete ? _("Force delete link $0?") : _("Delete link $0?"), selected[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
modalTitle = cockpit.format( | ||
forceDelete ? _("Force delete directory $0?") : _("Delete directory $0?"), selectedItem.name | ||
forceDelete ? _("Force delete directory $0?") : _("Delete directory $0?"), selected[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
); | ||
} else { | ||
modalTitle = cockpit.format(forceDelete ? _("Force delete $0") : _("Delete $0?"), selectedItem.name); | ||
modalTitle = cockpit.format(forceDelete ? _("Force delete $0") : _("Delete $0?"), selected[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
} else if (fileInfo?.type === "lnk") { | ||
title = cockpit.format(_("Rename link $0"), selected); | ||
} else if (fileInfo?.type === "dir") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 added lines are not executed by any test.
} else { | ||
title = _("Rename $0", selected.name); | ||
title = _("Rename $0", selected); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
menuItems.push( | ||
{ | ||
id: "copy-item", | ||
title: _("Copy"), | ||
onClick: () => setClipboard([currentPath + selected[0].name]), | ||
onClick: () => setClipboard([currentPath + selected[0]]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
? [ | ||
{ | ||
id: "paste-into-directory", | ||
title: _("Paste into directory"), | ||
onClick: () => spawnPaste(clipboard, [currentPath + selected[0].name]), | ||
onClick: () => spawnPaste(clipboard, [currentPath + selected[0]]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
@@ -549,7 +562,7 @@ export const fileActions = (path, selected, setSelected, clipboard, setClipboard | |||
{ | |||
id: "copy-item", | |||
title: _("Copy"), | |||
onClick: () => setClipboard(selected.map(s => path.join("/") + "/" + s.name)), | |||
onClick: () => setClipboard(selected.map(s => path.join("/") + "/" + s)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
const onDoubleClickNavigate = useCallback((filename) => { | ||
const newPath = [...path, filename].join("/"); | ||
const file = files[filename]; | ||
if (files && (file.type === "dir" || file.to === "dir")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
function getFileType(file) { | ||
if (file.type === "dir") { | ||
return "directory-item"; | ||
} else if (file.type === "lnk" && file?.to === "dir") { | ||
// TODO: info.target(name)?.type | ||
} else if (file.type === "lnk" && cwdInfo?.targets[filename]?.type === "dir") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
Some research upfront would be nice: