pull/5370/head
filip mertens 12 months ago
parent d7d97ffaa6
commit abafe68dd3
  1. 13
      apps/remix-ide/src/remixAppManager.js
  2. 1
      apps/remixdesktop/package.json
  3. 9
      apps/remixdesktop/src/plugins/fsPlugin.ts
  4. 14
      apps/remixdesktop/yarn.lock
  5. 0
      list.json

@ -327,6 +327,19 @@ export class RemixAppManager extends PluginManager {
sticky: true,
group: 7
})
if (Registry.getInstance().get('platform').api.isDesktop()) {
await this.call('filePanel', 'registerContextMenuItem', {
id: 'fs',
name: 'revealInExplorer',
label: 'Reveal in file explorer',
type: ['folder', 'file'],
extension: [],
path: [],
pattern: [],
sticky: true,
group: 8
})
}
}
}

@ -41,6 +41,7 @@
"@remixproject/engine": "0.3.41",
"@remixproject/engine-electron": "0.3.41",
"@remixproject/plugin": "0.3.41",
"@remixproject/plugin-api": "^0.3.38",
"@remixproject/plugin-electron": "0.3.41",
"@vscode/ripgrep": "^1.15.6",
"add": "^2.0.6",

@ -2,7 +2,7 @@ import { ElectronBasePlugin, ElectronBasePluginClient } from "@remixproject/plug
import fs from 'fs/promises'
import { Profile } from "@remixproject/plugin-utils";
import chokidar from 'chokidar'
import { dialog } from "electron";
import { dialog, shell } from "electron";
import { createWindow, isPackaged } from "../main";
import { writeConfig } from "../utils/config";
import { Path } from 'path-scurry'
@ -11,6 +11,7 @@ import byline from 'byline';
import path from "path";
import { spawn } from "child_process";
import { customAction } from "@remixproject/plugin-api";
const profile: Profile = {
displayName: 'fs',
@ -85,7 +86,7 @@ const clientProfile: Profile = {
name: 'fs',
displayName: 'fs',
description: 'fs',
methods: ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'lstat', 'exists', 'currentPath', 'watch', 'closeWatch', 'setWorkingDir', 'openFolder', 'openFolderInSameWindow', 'getRecentFolders', 'removeRecentFolder', 'openWindow', 'selectFolder']
methods: ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'lstat', 'exists', 'currentPath', 'watch', 'closeWatch', 'setWorkingDir', 'openFolder', 'openFolderInSameWindow', 'getRecentFolders', 'removeRecentFolder', 'openWindow', 'selectFolder', 'revealInExplorer', 'openInVSCode']
}
class FSPluginClient extends ElectronBasePluginClient {
@ -328,6 +329,10 @@ class FSPluginClient extends ElectronBasePluginClient {
await this.call('fileManager', 'closeAllFiles')
}
async revealInExplorer(action: customAction): Promise<void> {
shell.showItemInFolder(this.fixPath(action.path[0]))
}
fixPath(path: string): string {
if (this.workingDir === '') throw new Error('workingDir is not set')
if (path) {

@ -690,6 +690,13 @@
dependencies:
"@remixproject/plugin-utils" "0.3.41"
"@remixproject/plugin-api@^0.3.38":
version "0.3.38"
resolved "https://registry.yarnpkg.com/@remixproject/plugin-api/-/plugin-api-0.3.38.tgz#7dcff37483451b654fc51290157992fff3fbd8b7"
integrity sha512-GLXAnV7TMYV2KlXTml+W0H6s0m5EkVb5w610Jh9k4PLFVrocl9xDEG4VlZ8BF/uv+yjXRi4dn++8zWMRe5375Q==
dependencies:
"@remixproject/plugin-utils" "0.3.38"
"@remixproject/plugin-electron@0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@remixproject/plugin-electron/-/plugin-electron-0.3.41.tgz#6f736dfa5146bdf41fe0c452ab0b78e7f914fda1"
@ -700,6 +707,13 @@
"@remixproject/plugin-api" "0.3.41"
"@remixproject/plugin-utils" "0.3.41"
"@remixproject/plugin-utils@0.3.38":
version "0.3.38"
resolved "https://registry.yarnpkg.com/@remixproject/plugin-utils/-/plugin-utils-0.3.38.tgz#402adbef700a9392fbeae7d536ba020b7cfbdfaa"
integrity sha512-DpbB+BFfWvZ/pKWlXY0Ms3mqp/ajWxBI+TUiJor2AkLtCSBS1+Uk7BWG++jNSqgjdvVKxxWa4kJygFwUPtUYXA==
dependencies:
tslib "2.0.1"
"@remixproject/plugin-utils@0.3.41":
version "0.3.41"
resolved "https://registry.yarnpkg.com/@remixproject/plugin-utils/-/plugin-utils-0.3.41.tgz#6de4d016084cf54fbf710ed717c9c1efc0a990de"

Loading…
Cancel
Save