pull/4791/head
bunsenstraat 6 months ago
parent cbc2da066c
commit 4341ce7094
  1. 6
      apps/remix-ide/src/app/files/dgitProvider.ts
  2. 2
      libs/remix-ui/git/src/components/navigation/branchedetails.tsx
  3. 4
      libs/remix-ui/workspace/src/lib/actions/workspace.ts
  4. 6
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  5. 2
      libs/remix-ui/workspace/src/lib/types/index.ts

@ -795,10 +795,10 @@ class DGitProvider extends Plugin {
async fetch(input: fetchInputType) {
const cmd = {
ref: input.ref.name,
remoteRef: input.remoteRef.name,
ref: input.ref && input.ref.name,
remoteRef: input.remoteRef && input.remoteRef.name,
author: await this.getCommandUser(input),
remote: input.remote.name,
remote: input.remote && input.remote.name,
depth: input.depth || 5,
singleBranch: input.singleBranch,
relative: input.relative,

@ -66,7 +66,7 @@ export const BrancheDetailsNavigation = (props: BrancheDetailsNavigationProps) =
<div className={`ml-1 ${context.currentBranch.name === branch.name ? 'text-success' : ''}`}>{branch.name} {branch.remote ? `on ${branch.remote.name}` : ''}</div>
</div>
{context.currentBranch.name === branch.name ?
{context.currentBranch && context.currentBranch.name === branch.name ?
<GitUIButton className="btn btn-sm p-0 mr-1" onClick={() => { }}>
<FontAwesomeIcon className='pointer text-success' icon={faToggleOff} ></FontAwesomeIcon>
</GitUIButton>

@ -203,7 +203,7 @@ export const createWorkspace = async (
}, 5000)
} else if (!isEmpty && !(isGitRepo && createCommit)) await loadWorkspacePreset(workspaceTemplateName, opts)
cb && cb(null, workspaceName)
if (isGitRepo) {
if (isGitRepo && false) {
await checkGit()
const isActive = await plugin.call('manager', 'isActive', 'dgit')
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit')
@ -512,7 +512,7 @@ export const switchToWorkspace = async (name: string) => {
await plugin.fileProviders.workspace.setWorkspace(name)
await plugin.setWorkspace({ name, isLocalhost: false })
const isGitRepo = await plugin.fileManager.isGitRepo()
if (isGitRepo) {
if (isGitRepo && false) {
const isActive = await plugin.call('manager', 'isActive', 'dgit')
if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit')
}

@ -1221,7 +1221,7 @@ export function Workspace() {
className="btn btn-light btn-block w-100 d-inline-block border border-dark form-control h-100 p-0 pl-2 pr-2 text-dark"
icon={null}
>
{global.fs.browser.isRequestingCloning ? <i className="fad fa-spinner fa-spin"></i> : currentBranch || '-none-'}
{global.fs.browser.isRequestingCloning ? <i className="fad fa-spinner fa-spin"></i> : (currentBranch && currentBranch.name) || '-none-'}
</Dropdown.Toggle>
<Dropdown.Menu as={CustomMenu} className="custom-dropdown-items branches-dropdown">
@ -1262,7 +1262,7 @@ export function Workspace() {
title={intl.formatMessage({ id: `filePanel.switchToBranch${branch.remote ? 'Title1' : 'Title2'}` })}
>
<div data-id={`workspaceGit-${branch.remote ? `${branch.remote.name}/${branch.name}` : branch.name}`}>
{currentBranch === branch.name && !branch.remote ? (
{currentBranch && currentBranch.name === branch.name && !branch.remote ? (
<span>
&#10003; <i className="far fa-code-branch"></i>
<span className="pl-1">{branch.name}</span>
@ -1282,7 +1282,7 @@ export function Workspace() {
<div className="pl-1 pr-1" data-id="workspaceGitCreateNewBranch">
<i className="fas fa-code-branch pr-2"></i>
<span>
<FormattedMessage id="filePanel.createBranch" />: {branchFilter} from '{currentBranch}'
<FormattedMessage id="filePanel.createBranch" />: {branchFilter} from '{currentBranch && currentBranch.name}'
</span>
</div>
</Dropdown.Item>

@ -53,7 +53,7 @@ export type WorkspaceMetadata = {
isGitRepo: boolean
hasGitSubmodules?: boolean
branches?: branch[]
currentBranch?: string
currentBranch?: branch
isGist: string
}

Loading…
Cancel
Save