disable dgit calls

pull/4837/head
filip mertens 10 months ago
parent 1fd4584faa
commit 420822f559
  1. 23
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -202,8 +202,10 @@ export const createWorkspace = async (
cb && cb(null, workspaceName) cb && cb(null, workspaceName)
if (isGitRepo) { if (isGitRepo) {
await checkGit() await checkGit()
const isActive = await plugin.call('manager', 'isActive', 'dgit') if (!plugin.registry.get('platform').api.isDesktop()) {
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') const isActive = await plugin.call('manager', 'isActive', 'dgit')
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit')
}
} }
if (workspaceTemplateName === 'semaphore' || workspaceTemplateName === 'hashchecker' || workspaceTemplateName === 'rln') { if (workspaceTemplateName === 'semaphore' || workspaceTemplateName === 'hashchecker' || workspaceTemplateName === 'rln') {
const isCircomActive = await plugin.call('manager', 'isActive', 'circuit-compiler') const isCircomActive = await plugin.call('manager', 'isActive', 'circuit-compiler')
@ -510,8 +512,10 @@ export const switchToWorkspace = async (name: string) => {
await plugin.setWorkspace({ name, isLocalhost: false }) await plugin.setWorkspace({ name, isLocalhost: false })
const isGitRepo = await plugin.fileManager.isGitRepo() const isGitRepo = await plugin.fileManager.isGitRepo()
if (isGitRepo) { if (isGitRepo) {
const isActive = await plugin.call('manager', 'isActive', 'dgit') if (!plugin.registry.get('platform').api.isDesktop()) {
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') const isActive = await plugin.call('manager', 'isActive', 'dgit')
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit')
}
} }
dispatch(setMode('browser')) dispatch(setMode('browser'))
dispatch(setCurrentWorkspace({ name, isGitRepo })) dispatch(setCurrentWorkspace({ name, isGitRepo }))
@ -670,9 +674,10 @@ export const cloneRepository = async (url: string) => {
dispatch(cloneRepositoryRequest()) dispatch(cloneRepositoryRequest())
promise promise
.then(async () => { .then(async () => {
const isActive = await plugin.call('manager', 'isActive', 'dgit') if (!plugin.registry.get('platform').api.isDesktop()) {
const isActive = await plugin.call('manager', 'isActive', 'dgit')
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit')
}
await fetchWorkspaceDirectory(ROOT_PATH) await fetchWorkspaceDirectory(ROOT_PATH)
const workspacesPath = plugin.fileProviders.workspace.workspacesPath const workspacesPath = plugin.fileProviders.workspace.workspacesPath
const branches = await getGitRepoBranches(workspacesPath + '/' + repoName) const branches = await getGitRepoBranches(workspacesPath + '/' + repoName)
@ -757,8 +762,8 @@ export const getGitRepoCurrentBranch = async (workspaceName: string) => {
} }
export const showAllBranches = async () => { export const showAllBranches = async () => {
if (plugin.registry.get('platform').api.isDesktop()) return
const isActive = await plugin.call('manager', 'isActive', 'dgit') const isActive = await plugin.call('manager', 'isActive', 'dgit')
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit')
plugin.call('menuicons', 'select', 'dgit') plugin.call('menuicons', 'select', 'dgit')
plugin.call('dgit', 'open', 'branches') plugin.call('dgit', 'open', 'branches')

Loading…
Cancel
Save