pull/4791/head
filip mertens 6 months ago
parent fea8d9c5f6
commit 8695d259bf
  1. 8
      apps/remix-ide-e2e/src/tests/vyper_api.test.ts
  2. 8
      apps/remix-ide/src/app/files/dgitProvider.ts
  3. 12
      apps/vyper/src/app/utils/remix-client.tsx
  4. 4
      apps/vyper/src/main.tsx
  5. 1
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx
  6. 46
      libs/remix-ui/git/src/components/branchHeader.tsx
  7. 21
      libs/remix-ui/git/src/components/gitui.tsx
  8. 50
      libs/remix-ui/git/src/components/panels/branches.tsx
  9. 9
      libs/remix-ui/git/src/components/panels/branches/localbranchdetails.tsx
  10. 11
      libs/remix-ui/git/src/components/panels/branches/remotebranchedetails.tsx
  11. 27
      libs/remix-ui/git/src/lib/gitactions.ts
  12. 3
      libs/remix-ui/git/src/lib/listeners.ts
  13. 1
      libs/remix-ui/git/src/state/actions.ts
  14. 1
      libs/remix-ui/git/src/state/context.tsx
  15. 7
      libs/remix-ui/git/src/state/gitpayload.ts
  16. 6
      libs/remix-ui/git/src/state/gitreducer.tsx
  17. 11
      libs/remix-ui/git/src/types/index.ts
  18. 1
      libs/remix-ui/workspace/src/lib/actions/index.ts

@ -40,7 +40,7 @@ module.exports = {
.openFile('src') .openFile('src')
.openFile('src/snekmate') .openFile('src/snekmate')
.openFile('src/snekmate/tokens') .openFile('src/snekmate/tokens')
.openFile('src/snekmate/tokens/erc721.vy') .openFile('src/snekmate/tokens/ERC721.vy')
}, },
// 'Add vyper file to run tests #group1': function (browser: NightwatchBrowser) { // 'Add vyper file to run tests #group1': function (browser: NightwatchBrowser) {
// browser.addFile('TestBallot.sol', sources[0]['TestBallot.sol']) // browser.addFile('TestBallot.sol', sources[0]['TestBallot.sol'])
@ -149,7 +149,7 @@ module.exports = {
}) })
}, },
'Compile Ownable contract from snekmate #group1': !function (browser: NightwatchBrowser) { 'Compile Ownable contract from snekmate #group1': function (browser: NightwatchBrowser) {
let contractAddress let contractAddress
browser browser
.frameParent() .frameParent()
@ -158,8 +158,8 @@ module.exports = {
.openFile('src') .openFile('src')
.openFile('src/snekmate') .openFile('src/snekmate')
.openFile('src/snekmate/auth') .openFile('src/snekmate/auth')
.openFile('src/snekmate/auth/ownable.vy') .openFile('src/snekmate/auth/Ownable.vy')
.rightClick('*[data-id="treeViewLitreeViewItemsrc/snekmate/auth/ownable.vy"]') .rightClick('*[data-id="treeViewLitreeViewItemsrc/snekmate/auth/Ownable.vy"]')
.waitForElementVisible('*[data-id="contextMenuItemvyper"]') .waitForElementVisible('*[data-id="contextMenuItemvyper"]')
.click('*[data-id="contextMenuItemvyper"]') .click('*[data-id="contextMenuItemvyper"]')
.clickLaunchIcon('vyper') .clickLaunchIcon('vyper')

@ -446,6 +446,7 @@ class DGitProvider extends Plugin {
} }
return branches return branches
} catch (e) { } catch (e) {
console.log(e)
return [] return []
} }
} }
@ -803,7 +804,7 @@ class DGitProvider extends Plugin {
relative: input.relative, relative: input.relative,
input input
} }
console.log('fetch input', cmd)
let result let result
if ((Registry.getInstance().get('platform').api.isDesktop())) { if ((Registry.getInstance().get('platform').api.isDesktop())) {
result = await this.call('isogit', 'fetch', cmd) result = await this.call('isogit', 'fetch', cmd)
@ -816,7 +817,7 @@ class DGitProvider extends Plugin {
...await this.addIsomorphicGitConfigFS(), ...await this.addIsomorphicGitConfigFS(),
...cmd2 ...cmd2
}) })
console.log('fetch result', cmd2, result)
} }
setTimeout(async () => { setTimeout(async () => {
@ -1066,7 +1067,6 @@ class DGitProvider extends Plugin {
readCommitResults.push(readCommitResult) readCommitResults.push(readCommitResult)
} }
console.log(readCommitResults)
// Check for the Link header to determine pagination // Check for the Link header to determine pagination
const linkHeader = response.headers.link; const linkHeader = response.headers.link;
@ -1077,7 +1077,7 @@ class DGitProvider extends Plugin {
hasNextPage = linkHeader.includes('rel="next"'); hasNextPage = linkHeader.includes('rel="next"');
} }
console.log("Has next page:", hasNextPage);
pages.push({ pages.push({
page: input.page, page: input.page,
perPage: input.length, perPage: input.length,

@ -86,7 +86,17 @@ export class RemixClient extends PluginClient<any, CustomRemixApi> {
await this.call( await this.call(
'dgitApi', 'dgitApi',
'clone', 'clone',
{url: 'https://github.com/pcaversaccio/snekmate', token: null, branch: 'main', singleBranch: true, workspaceName: 'snekmate'}, {url: 'https://github.com/pcaversaccio/snekmate', token: null, branch: 'main', singleBranch: false, workspaceName: 'snekmate'},
)
await this.call(
'dgitApi',
'checkout',
{
ref:'v0.0.5',
force: true,
refresh: true,
}
) )
this.call( this.call(

@ -6,8 +6,8 @@ import App from './app/app'
const container = document.getElementById('root'); const container = document.getElementById('root');
if (container) { if (container) {
createRoot(container).render(<React.StrictMode> createRoot(container).render(
<App /> <App />
</React.StrictMode>); );
} }

@ -332,7 +332,6 @@ export const EditorUI = (props: EditorUIProps) => {
}) })
useEffect(() => { useEffect(() => {
console.log(props.isDiff, props.currentFile)
if (!(editorRef.current || diffEditorRef.current ) || !props.currentFile) return if (!(editorRef.current || diffEditorRef.current ) || !props.currentFile) return
currentFileRef.current = props.currentFile currentFileRef.current = props.currentFile
props.plugin.call('fileManager', 'getUrlFromPath', currentFileRef.current).then((url) => (currentUrlRef.current = url.file)) props.plugin.call('fileManager', 'getUrlFromPath', currentFileRef.current).then((url) => (currentUrlRef.current = url.file))

@ -1,17 +1,39 @@
import React, { useEffect, useReducer, useState } from 'react' import React, { useEffect, useState } from 'react'
import { gitActionsContext } from '../state/context' import { gitActionsContext, pluginActionsContext } from '../state/context'
import { ReadCommitResult } from "isomorphic-git"
import { gitPluginContext } from './gitui' import { gitPluginContext } from './gitui'
export const BranchHeader = () => { export const BranchHeader = () => {
const context = React.useContext(gitPluginContext) const context = React.useContext(gitPluginContext)
const actions = React.useContext(gitActionsContext) const actions = React.useContext(gitActionsContext)
const pluginActions = React.useContext(pluginActionsContext)
const [changed, setChanged] = useState(false) const [changed, setChanged] = useState(false)
const [isDetached, setIsDetached] = useState(false)
const [latestCommit, setLatestCommit] = useState<ReadCommitResult>(null)
useEffect(() => { useEffect(() => {
if (context.currentBranch) { if (context.currentBranch) {
actions.getBranchDifferences(context.currentBranch, null, context) actions.getBranchDifferences(context.currentBranch, null, context)
} }
}, [context.currentBranch, context.commits, context.branches, context.remotes]) if (!context.currentBranch || (context.currentBranch && context.currentBranch.name === '')) {
if (context.currentHead === '') {
setIsDetached(false)
} else {
setIsDetached(true)
}
} else {
setIsDetached(false)
}
setLatestCommit(null)
if (context.currentHead !== '') {
if (context.commits && context.commits.length > 0) {
const commit = context.commits.find(commit => commit.oid === context.currentHead)
if (commit) {
setLatestCommit(commit)
}
}
}
}, [context.currentBranch, context.commits, context.branches, context.remotes, context.currentHead])
useEffect(() => { useEffect(() => {
if (context.fileStatusResult) { if (context.fileStatusResult) {
@ -21,11 +43,27 @@ export const BranchHeader = () => {
} }
}, [context.fileStatusResult, context.modified, context.allchangesnotstaged, context.untracked, context.deleted]) }, [context.fileStatusResult, context.modified, context.allchangesnotstaged, context.untracked, context.deleted])
const showDetachedWarningText = async () => {
await pluginActions.showAlert({
message: `You are in 'detached HEAD' state. This means you are not on a branch because you checkout a tag or a specific commit. If you want to commit changes, you will need to create a new branch.`,
title: 'Warning'
})
}
return (<> return (<>
<div className='text-sm w-100'> <div className='text-sm w-100'>
<div className='text-secondary long-and-truncated'> <div className='text-secondary long-and-truncated'>
<i className="fa fa-code-branch mr-1 pl-2"></i> <i className="fa fa-code-branch mr-1 pl-2"></i>
{changed?'*':''}{context.currentBranch && context.currentBranch.name}</div> {changed ? '*' : ''}{context.currentBranch && context.currentBranch.name}
</div>
{latestCommit ?
<div className='text-secondary long-and-truncated'>
{latestCommit.commit && latestCommit.commit.message ? latestCommit.commit.message : ''}
</div> : null}
{isDetached ?
<div className='text-warning long-and-truncated'>
You are in a detached state<i onClick={showDetachedWarningText} className="btn fa fa-info-circle mr-1 pl-2"></i>
</div> : null}
</div> </div>
<hr></hr> <hr></hr>
</>) </>)

@ -1,5 +1,5 @@
import React, { useEffect, useReducer, useState } from 'react' import React, { useEffect, useReducer, useState } from 'react'
import { add, addall, checkout, checkoutfile, clone, commit, createBranch, remoteBranches, repositories, rm, getCommitChanges, diff, resolveRef, getBranchCommits, setUpstreamRemote, loadGitHubUserFromToken, getBranches, getRemotes, remoteCommits, saveGitHubCredentials, getGitHubCredentialsFromLocalStorage, fetch, pull, push, setDefaultRemote, addRemote, removeRemote, sendToGitLog, clearGitLog, getBranchDifferences, getFileStatusMatrix, init } from '../lib/gitactions' import { add, addall, checkout, checkoutfile, clone, commit, createBranch, remoteBranches, repositories, rm, getCommitChanges, diff, resolveRef, getBranchCommits, setUpstreamRemote, loadGitHubUserFromToken, getBranches, getRemotes, remoteCommits, saveGitHubCredentials, getGitHubCredentialsFromLocalStorage, fetch, pull, push, setDefaultRemote, addRemote, removeRemote, sendToGitLog, clearGitLog, getBranchDifferences, getFileStatusMatrix, init, showAlert } from '../lib/gitactions'
import { loadFiles, setCallBacks } from '../lib/listeners' import { loadFiles, setCallBacks } from '../lib/listeners'
import { openDiff, openFile, saveToken, setModifiedDecorator, setPlugin, setUntrackedDecorator, statusChanged } from '../lib/pluginActions' import { openDiff, openFile, saveToken, setModifiedDecorator, setPlugin, setUntrackedDecorator, statusChanged } from '../lib/pluginActions'
import { gitActionsContext, pluginActionsContext } from '../state/context' import { gitActionsContext, pluginActionsContext } from '../state/context'
@ -52,14 +52,14 @@ export const GitUI = (props: IGitUi) => {
useEffect(() => { useEffect(() => {
plugin.emit('statusChanged', { plugin.emit('statusChanged', {
key:'loading', key: 'loading',
type: 'info', type: 'info',
title: 'Loading Git Plugin' title: 'Loading Git Plugin'
}) })
setTimeout(() => { setTimeout(() => {
setAppLoaded(true) setAppLoaded(true)
}, 2000) }, 2000)
},[]) }, [])
useEffect(() => { useEffect(() => {
if (!appLoaded) return if (!appLoaded) return
@ -108,9 +108,14 @@ export const GitUI = (props: IGitUi) => {
updatestate() updatestate()
}) })
setNeedsInit(!(gitState.currentBranch && gitState.currentBranch.name !== '')) let needsInit = false
if (!(gitState.currentBranch && gitState.currentBranch.name !== '') && gitState.currentHead === '') {
needsInit = true
}
setNeedsInit(needsInit)
}, [gitState.gitHubUser, gitState.currentBranch, gitState.remotes, gitState.gitHubAccessToken]) }, [gitState.gitHubUser, gitState.currentBranch, gitState.remotes, gitState.gitHubAccessToken, gitState.currentHead])
const gitActionsProviderValue = { const gitActionsProviderValue = {
commit, commit,
@ -151,7 +156,8 @@ export const GitUI = (props: IGitUi) => {
openDiff, openDiff,
saveToken, saveToken,
saveGitHubCredentials, saveGitHubCredentials,
getGitHubCredentialsFromLocalStorage getGitHubCredentialsFromLocalStorage,
showAlert
} }
return ( return (
@ -159,8 +165,9 @@ export const GitUI = (props: IGitUi) => {
<gitPluginContext.Provider value={gitState}> <gitPluginContext.Provider value={gitState}>
<loaderContext.Provider value={loaderState}> <loaderContext.Provider value={loaderState}>
<gitActionsContext.Provider value={gitActionsProviderValue}> <gitActionsContext.Provider value={gitActionsProviderValue}>
<BranchHeader />
<pluginActionsContext.Provider value={pluginActionsProviderValue}> <pluginActionsContext.Provider value={pluginActionsProviderValue}>
<BranchHeader />
{setup && !needsInit ? <Setup></Setup> : null} {setup && !needsInit ? <Setup></Setup> : null}
{needsInit ? <Init></Init> : null} {needsInit ? <Init></Init> : null}
{!setup && !needsInit ? {!setup && !needsInit ?

@ -16,14 +16,6 @@ export const Branches = () => {
setNewBranch({ value: e.currentTarget.value }); setNewBranch({ value: e.currentTarget.value });
}; };
const checkout = async (oid: string, remote: remote) => {
try {
actions.checkout({ ref: oid, remote: remote.name });
} catch (e) {
// do nothing
}
};
return ( return (
<> <>
<div className="pt-1"> <div className="pt-1">
@ -35,25 +27,31 @@ export const Branches = () => {
); );
})} })}
<hr /> <hr />
<label>create branch</label>
<div className="form-group">
<input </div> : null}
placeholder="branch name" {context.currentBranch
onChange={handleChange} && context.currentBranch.name !== ''
className="form-control w-md-25 w-100" && (!context.branches || context.branches.length === 0) ?
type="text" <div className="text-muted">Current branch is `{context.currentBranch.name}` but you have no commits.<hr /></div>
id="newbranchname" : null}
/> <label>create branch</label>
</div> <div className="form-group">
<GitUIButton
onClick={async () => actions.createBranch(newBranch.value)} <input
className="btn w-md-25 w-100 btn-primary" placeholder="branch name"
id="createbranch-btn" onChange={handleChange}
> className="form-control w-md-25 w-100"
create new branch type="text"
</GitUIButton> id="newbranchname"
</div> : <div className="text-muted">No branches</div>} />
</div>
<GitUIButton
onClick={async () => actions.createBranch(newBranch.value)}
className="btn w-md-25 w-100 btn-primary"
id="createbranch-btn"
>
create new branch
</GitUIButton>
</div> </div>
</> </>
); );

@ -35,7 +35,8 @@ export const LocalBranchDetails = (props: BrancheDetailsProps) => {
const checkout = (branch: branch) => { const checkout = (branch: branch) => {
actions.checkout({ actions.checkout({
ref: branch.name, ref: branch.name,
remote: branch.remote && branch.remote.name || null remote: branch.remote && branch.remote.name || null,
refresh: true
}); });
} }
@ -45,11 +46,11 @@ export const LocalBranchDetails = (props: BrancheDetailsProps) => {
const checkoutCommit = async (oid: string) => { const checkoutCommit = async (oid: string) => {
try { try {
//await ModalRef.current?.show();
actions.checkout({ ref: oid }) actions.checkout({ ref: oid })
//Utils.log("yes"); ;
} catch (e) { } catch (e) {
//Utils.log("no"); //
} }
}; };

@ -46,9 +46,18 @@ export const RemoteBranchDetails = (props: BrancheDetailsProps) => {
}, [context.remoteBranchCommits]) }, [context.remoteBranchCommits])
const checkout = async (branch: branch) => { const checkout = async (branch: branch) => {
await actions.fetch({
remote: branch.remote,
ref: branch,
depth: 20,
singleBranch: true,
relative: false,
quiet: true
})
await actions.checkout({ await actions.checkout({
ref: branch.name, ref: branch.name,
remote: branch.remote && branch.remote.name || null remote: branch.remote && branch.remote.name || null,
refresh: true
}); });
await actions.getBranches() await actions.getBranches()
} }

@ -1,6 +1,6 @@
import { ReadBlobResult, ReadCommitResult } from "isomorphic-git"; import { ReadBlobResult, ReadCommitResult } from "isomorphic-git";
import React from "react"; import React from "react";
import { fileStatus, fileStatusMerge, setRemoteBranchCommits, resetRemoteBranchCommits, setBranches, setCanCommit, setCommitChanges, setCommits, setCurrentBranch, setGitHubUser, setLoading, setRemoteBranches, setRemotes, setRepos, setUpstream, setLocalBranchCommits, setBranchDifferences, setRemoteAsDefault, setScopes, setLog, clearLog, setUserEmails } from "../state/gitpayload"; import { fileStatus, fileStatusMerge, setRemoteBranchCommits, resetRemoteBranchCommits, setBranches, setCanCommit, setCommitChanges, setCommits, setCurrentBranch, setGitHubUser, setLoading, setRemoteBranches, setRemotes, setRepos, setUpstream, setLocalBranchCommits, setBranchDifferences, setRemoteAsDefault, setScopes, setLog, clearLog, setUserEmails, setCurrenHead } from "../state/gitpayload";
import { GitHubUser, branch, commitChange, gitActionDispatch, statusMatrixType, gitState, branchDifference, remote, gitLog, fileStatusResult, customGitApi, IGitApi, cloneInputType, fetchInputType, pullInputType, pushInputType, checkoutInput, rmInput, addInput, repository, userEmails } from '../types'; import { GitHubUser, branch, commitChange, gitActionDispatch, statusMatrixType, gitState, branchDifference, remote, gitLog, fileStatusResult, customGitApi, IGitApi, cloneInputType, fetchInputType, pullInputType, pushInputType, checkoutInput, rmInput, addInput, repository, userEmails } from '../types';
import { removeSlash } from "../utils"; import { removeSlash } from "../utils";
import { disableCallBacks, enableCallBacks } from "./listeners"; import { disableCallBacks, enableCallBacks } from "./listeners";
@ -107,13 +107,22 @@ export const gitlog = async () => {
export const showCurrentBranch = async () => { export const showCurrentBranch = async () => {
try { try {
const branch = await currentBranch(); const branch = await currentBranch();
dispatch(setCanCommit((branch && branch.name !== ""))); dispatch(setCanCommit((branch && branch.name !== "")));
dispatch(setCurrentBranch(branch)); dispatch(setCurrentBranch(branch));
} catch (e) {
console.log(e)
dispatch(setCanCommit(false));
dispatch(setCurrentBranch({ name: "", remote: { name: "", url: "" } }));
}
try {
const currentHead = await getCommitFromRef('HEAD');
dispatch(setCurrenHead(currentHead));
} catch (e) { } catch (e) {
// show empty branch console.log(e)
dispatch(setCurrenHead(''));
} }
} }
export const currentBranch = async () => { export const currentBranch = async () => {
@ -133,8 +142,7 @@ export const currentBranch = async () => {
export const createBranch = async (name: string = "") => { export const createBranch = async (name: string = "") => {
dispatch(setLoading(true)) dispatch(setLoading(true))
if (name) { if (name) {
await plugin.call('dgitApi', 'branch', { ref: name }); await plugin.call('dgitApi', 'branch', { ref: name, force: true, checkout: true });
await plugin.call('dgitApi', 'checkout', { ref: name });
} }
dispatch(setLoading(false)) dispatch(setLoading(false))
} }
@ -272,8 +280,8 @@ export const checkout = async (cmd: checkoutInput) => {
await plugin.call('fileManager', 'closeAllFiles') await plugin.call('fileManager', 'closeAllFiles')
try { try {
await plugin.call('dgitApi', 'checkout', cmd) await plugin.call('dgitApi', 'checkout', cmd)
gitlog();
} catch (e) { } catch (e) {
console.log(e)
plugin.call('notification', 'toast', `${e}`) plugin.call('notification', 'toast', `${e}`)
} }
await enableCallBacks(); await enableCallBacks();
@ -536,6 +544,13 @@ export const getGitHubCredentialsFromLocalStorage = async () => {
} }
} }
export const showAlert = async ({ title, message }: { title: string, message: string }) => {
await plugin.call('notification', 'alert', {
title: title,
message: message
})
}
export const loadGitHubUserFromToken = async () => { export const loadGitHubUserFromToken = async () => {
if (!plugin) return if (!plugin) return
try { try {

@ -120,6 +120,9 @@ export const setCallBacks = (viewPlugin: Plugin, gitDispatcher: React.Dispatch<g
loadFileQueue.enqueue(async () => { loadFileQueue.enqueue(async () => {
gitlog() gitlog()
}, 10) }, 10)
loadFileQueue.enqueue(async () => {
getBranches()
}, 20)
gitDispatch(setLog({ gitDispatch(setLog({
message: 'Committed changes...', message: 'Committed changes...',
type: 'success' type: 'success'

@ -7,6 +7,7 @@ export interface ActionPayloadTypes {
SET_COMMITS: ReadCommitResult[] SET_COMMITS: ReadCommitResult[]
SET_BRANCHES: branch[] SET_BRANCHES: branch[]
SET_CURRENT_BRANCH: branch SET_CURRENT_BRANCH: branch
SET_CURRENT_HEAD: string
SET_CAN_USE_APP: boolean SET_CAN_USE_APP: boolean
SET_REPO_NAME: string SET_REPO_NAME: string
SET_LOADING: boolean SET_LOADING: boolean

@ -52,6 +52,7 @@ export interface pluginActions {
email: string email: string
token: string token: string
}> }>
showAlert({ title, message }:{title: string, message: string}): Promise<void>
} }
export const pluginActionsContext = React.createContext<pluginActions>(null) export const pluginActionsContext = React.createContext<pluginActions>(null)

@ -101,6 +101,13 @@ export const setCurrentBranch = (currentBranch: branch) => {
} }
} }
export const setCurrenHead = (currentHead: string) => {
return {
type: 'SET_CURRENT_HEAD',
payload: currentHead
}
}
export const setCanCommit = (canCommit: boolean) => { export const setCanCommit = (canCommit: boolean) => {
return { return {
type: 'SET_CAN_COMMIT', type: 'SET_CAN_COMMIT',

@ -56,6 +56,12 @@ export const gitReducer = (state: gitState = defaultGitState, action: Actions):
currentBranch: action.payload currentBranch: action.payload
} }
case 'SET_CURRENT_HEAD':
return {
...state,
currentHead: action.payload
}
case 'SET_CAN_USE_APP': case 'SET_CAN_USE_APP':
return { return {
...state, ...state,

@ -82,6 +82,7 @@ export type branchInputType = {
ref: string, ref: string,
checkout?: boolean checkout?: boolean
refresh?: boolean refresh?: boolean
force?: boolean
} }
export type currentBranchInput = { export type currentBranchInput = {
@ -94,6 +95,7 @@ export type checkoutInput = {
force?: boolean, force?: boolean,
remote?: string remote?: string
refresh?: boolean refresh?: boolean
fetch?: boolean
} }
export type addInput = { export type addInput = {
@ -151,6 +153,7 @@ export interface customGitApi extends IRemixApi {
export type gitState = { export type gitState = {
currentBranch: branch currentBranch: branch
currentHead: string
commits: ReadCommitResult[] commits: ReadCommitResult[]
branch: string branch: string
canCommit: boolean canCommit: boolean
@ -264,6 +267,7 @@ export type remoteBranch = {
export const defaultGitState: gitState = { export const defaultGitState: gitState = {
currentBranch: { name: "", remote: { name: "", url: "" } }, currentBranch: { name: "", remote: { name: "", url: "" } },
currentHead: "",
commits: [], commits: [],
branch: "", branch: "",
canCommit: true, canCommit: true,
@ -370,6 +374,11 @@ export interface setCurrentBranchAction {
payload: branch payload: branch
} }
export interface setCurrentHeadAction {
type: string,
payload: string
}
export interface setRemotesAction { export interface setRemotesAction {
type: string, type: string,
payload: remote[] payload: remote[]
@ -424,4 +433,4 @@ export interface clearLogAction {
type: string type: string
} }
export type gitActionDispatch = clearLogAction | setLogAction | setDefaultRemoteAction | setTokenAction | setUpstreamAction | setRemoteBranchCommitsAction | setLocalBranchCommitsAction | setBranchDifferencesAction | setRemotesAction | setCurrentBranchAction | fileStatusAction | setLoadingAction | setCanUseAppAction | setRepoNameAction | setCommitsAction | setBranchesAction | setReposAction | setRemoteBranchesAction export type gitActionDispatch = setCurrentHeadAction | clearLogAction | setLogAction | setDefaultRemoteAction | setTokenAction | setUpstreamAction | setRemoteBranchCommitsAction | setLocalBranchCommitsAction | setBranchDifferencesAction | setRemotesAction | setCurrentBranchAction | fileStatusAction | setLoadingAction | setCanUseAppAction | setRepoNameAction | setCommitsAction | setBranchesAction | setReposAction | setRemoteBranchesAction

@ -60,7 +60,6 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
let filePathToOpen = null let filePathToOpen = null
let workspaces = [] let workspaces = []
plugin.on('editor', 'editorMounted', async () => { plugin.on('editor', 'editorMounted', async () => {
console.log('editor mounted')
editorMounted = true editorMounted = true
if (filePathToOpen){ if (filePathToOpen){
setTimeout(async () => { setTimeout(async () => {

Loading…
Cancel
Save