Update dgit flag for empty workspace and expose rename workspace api

pull/5370/head
ioedeveloper 3 years ago
parent 1c271ea53e
commit e5659800cc
  1. 4
      apps/remix-ide/src/app/files/dgitProvider.js
  2. 2
      apps/remix-ide/src/app/panels/file-panel.js

@ -227,7 +227,7 @@ class DGitProvider extends Plugin {
const permission = await this.askUserPermission('clone', 'Import multiple files into your workspaces.')
if (!permission) return false
if (this.calculateLocalStorage() > 10000) throw new Error('The local storage of the browser is full.')
await this.call('filePanel', 'createWorkspace', `workspace_${Date.now()}`, false)
await this.call('filePanel', 'createWorkspace', `workspace_${Date.now()}`, true)
const cmd = {
url: input.url,
@ -459,7 +459,7 @@ class DGitProvider extends Plugin {
if (!permission) return false
if (this.calculateLocalStorage() > 10000) throw new Error('The local storage of the browser is full.')
const cid = cmd.cid
await this.call('filePanel', 'createWorkspace', `workspace_${Date.now()}`, false)
await this.call('filePanel', 'createWorkspace', `workspace_${Date.now()}`, true)
const workspace = await this.call('filePanel', 'getCurrentWorkspace')
let result
if (cmd.local) {

@ -29,7 +29,7 @@ const globalRegistry = require('../../global/registry')
const profile = {
name: 'filePanel',
displayName: 'File explorers',
methods: ['createNewFile', 'uploadFile', 'getCurrentWorkspace', 'getWorkspaces', 'createWorkspace', 'setWorkspace', 'registerContextMenuItem'],
methods: ['createNewFile', 'uploadFile', 'getCurrentWorkspace', 'getWorkspaces', 'createWorkspace', 'setWorkspace', 'registerContextMenuItem', 'renameWorkspace'],
events: ['setWorkspace', 'renameWorkspace', 'deleteWorkspace', 'createWorkspace'],
icon: 'assets/img/fileManager.webp',
description: ' - ',

Loading…
Cancel
Save