Feat/add dolphin file system extension - #412
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| const destinationExists = await doesFileExist(destination); | ||
| if (destinationExists) { | ||
| if (asset.executable) { | ||
| await fs.chmod(destination, 0o755); |
There was a problem hiding this comment.
The permissions granted to this script are strictly those necessary for the extension's features to function properly without compromising the security of the user's device.
|
|
||
| await fs.cp(source, destination); | ||
| if (asset.executable) { | ||
| await fs.chmod(destination, 0o755); |
| X-KDE-ServiceTypes=KonqPopupMenu/Plugin | ||
| Actions=InternxtCopyLink; | ||
| X-KDE-Submenu=Internxt Drive | ||
| X-KDE-Priority=TopLevel |
There was a problem hiding this comment.
For Dolphin, new options must be configured using a new .desktop file that directly modifies the system settings.
| print("") | ||
| sys.exit(0) | ||
|
|
||
| relative_path = file_path[len(root_folder):] |
There was a problem hiding this comment.
The functionality to generate the share link is still present in the app's code and can be accessed through the hydration API. This made it easy for us to create this script, which calls the corresponding endpoint and saves the link to the clipboard.
Since the extension's settings are managed directly through the system settings, it was necessary for the actions to be executed through this script.
| @@ -1 +1 @@ | |||
| export const LATEST_EXTENSION_VERSION = 3; | |||
| export const LATEST_EXTENSION_VERSION = 4; | |||
There was a problem hiding this comment.
The change to the extension's version number is intended to force its reinstallation.
There was a problem hiding this comment.
Then add a clarifying comment in the code explaining what you deem its necesary
| }, | ||
| "deb": { | ||
| "depends": [ | ||
| "recommends": [ |
There was a problem hiding this comment.
The installation of this add-on has been changed to “recommended” because in distributions such as Kubuntu that use KDE, this library is not available by default and prevents the application from being installed.
…hin-file-system-extension
…or file system extension (#421)
| fileManager: [nautilus, nemo, dolphin] | ||
|
|
||
| container: | ||
| image: ubuntu:24.04 |
There was a problem hiding this comment.
we could use either the newest lts or the oldest active, what do you think? (22.04)
| const execAsync = promisify(exec); | ||
|
|
||
| export type FileManagerType = 'nautilus' | 'nemo' | null; | ||
| export type FileManagerType = 'nautilus' | 'nemo' | 'dolphin' | null; |
There was a problem hiding this comment.
isnt SupportedFileManager basically this?
| { type: 'nautilus', desktopEntry: 'nautilus.desktop', hasBinary: hasNautilusBinary }, | ||
| ]; | ||
|
|
||
| export async function detectAvailableFileManager(): Promise<FileManagerType> { |
There was a problem hiding this comment.
You are making FileManagerType to have null just because this function is returning null and then
type FileManagerCandidate = { type: Exclude<FileManagerType, null>;
Why not rather make this function return FileManagerType | null?
| export async function isDolphinAvailable(): Promise<boolean> { | ||
| return (await detectAvailableFileManager()) === 'dolphin'; | ||
| } | ||
|
|
There was a problem hiding this comment.
What is this used for? I see it has no usage
There was a problem hiding this comment.
I had added them to generate alerts like the one generated by Nautilus, but now that I think about it, the alert should say that there is no extension available.
| return (await detectAvailableFileManager()) === 'dolphin'; | ||
| } | ||
|
|
||
| async function getDefaultDirectoryDesktopEntry(): Promise<string> { |
There was a problem hiding this comment.
why not make this method directly pass the type of desktop rather than a string??
| const nautilusExtensionFileName = 'internxt-virtual-drive.py'; | ||
| const nemoExtensionFileName = 'internxt-virtual-drive.py'; | ||
| const dolphinMenuFileName = 'internxt-virtual-drive.desktop'; | ||
| const dolphinHelperFileName = 'internxt-dolphin-actions.sh'; |
There was a problem hiding this comment.
This should be ina consttants files
| if (destinationExists) { | ||
| if (asset.executable) { | ||
| await fs.chmod(destination, 0o755); | ||
| } |
There was a problem hiding this comment.
Check the sonar issues because both sonar and gh are screaming
There was a problem hiding this comment.
The permissions granted to this script are strictly those necessary for the extension's features to function properly without compromising the security of the user's device.
| await fs.cp(source, destination); | ||
| if (asset.executable) { | ||
| await fs.chmod(destination, 0o755); | ||
| } |
| @@ -1 +1 @@ | |||
| export const LATEST_EXTENSION_VERSION = 3; | |||
| export const LATEST_EXTENSION_VERSION = 4; | |||
There was a problem hiding this comment.
Then add a clarifying comment in the code explaining what you deem its necesary
…d clarity and functionality
|




Summary
This PR adds Dolphin file manager integration to Internxt Drive on Linux.
What Changed
Notes
Validation
npm run package.