Add "Reveal in file manager" action to the file viewer - #342
Open
aalquwayfili wants to merge 1 commit into
Open
aalquwayfili wants to merge 1 commit into
aalquwayfili wants to merge 1 commit into
Conversation
Binary and unrecognized files can only be downloaded from the viewer, which on most systems saves a scary extensionless file instead of showing where it lives. Add a reveal action next to "Open in default editor" that opens the OS file manager with the file selected (Finder on macOS, Explorer on Windows) or the containing folder on Linux. Mirrors open_in_default_app / open_project_file with the same path confinement, and is blocked for remote sessions like the open route. Closes alphaXiv#147
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #147.
The file viewer can only download a binary or unrecognized file, and on most systems that saves an extensionless file the browser flags as suspicious, so there's no easy way to just find it on disk. This adds a "Reveal in file manager" button next to "Open in default editor":
open -R(Finder, file selected)explorer /select,(Explorer, file selected)xdg-openon the containing folder (no portable "select" call)Backend mirrors
open_in_default_app/open_project_filewith the same path confinement, and is added toremote_route_forbiddenlike the open route. Frontend mirrors the existing open-in-editor button; new string added to all three locales.Checks run locally: cargo fmt/build/test, i18n + style lint, UI typecheck, dev-slot + UI unit tests, and
pnpm buildto regenerate ui/dist.