We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent0544c56 commit981f702Copy full SHA for 981f702
src/channel/index.ts
@@ -114,10 +114,13 @@ class Channel implements Channel {
114
if(isEmptyWorkspace){
115
this.send({type:'IS_EMPTY_WORKSPACE'})
116
}else{
117
-openWorkspace()
118
-this.send({type:'REQUEST_WORKSPACE'})
+this.send({type:'NOT_EMPTY_WORKSPACE'})
119
}
120
return
+case'EDITOR_REQUEST_WORKSPACE':
121
+console.log('request workspace')
122
+openWorkspace()
123
+return
124
// load step actions (git commits, commands, open files)
125
case'SETUP_ACTIONS':
126
awaitvscode.commands.executeCommand(COMMANDS.SET_CURRENT_STEP,action.payload)
src/services/workspace/index.ts
@@ -2,7 +2,8 @@ import * as vscode from 'vscode'
2
import*asfsfrom'fs'
3
4
exportconstopenWorkspace=()=>{
5
-vscode.commands.executeCommand('vscode.openFolder')
+constopenInNewWindow=false
6
+vscode.commands.executeCommand('vscode.openFolder',undefined,openInNewWindow)
7
8
9
exportconstcheckWorkspaceEmpty=async(dirname:string)=>{
typings/index.d.ts
@@ -75,7 +75,6 @@ export interface MachineStateSchema {
75
Start:{}
76
CheckEmptyWorkspace:{}
77
NonEmptyWorkspace:{}
78
-RequestEmptyWorkspace:{}
79
SelectTutorial:{}
80
LoadTutorialSummary:{}
81
Summary:{}
web-app/src/Routes.tsx
@@ -15,15 +15,7 @@ const Routes = () => {
15
<Workspace>
16
<Router>
17
{/* Setup */}
18
-<Route
19
-path={[
20
-'Setup.Startup',
21
-'Setup.Authenticate',
22
-'Setup.LoadStoredTutorial',
23
-'Setup.CheckEmptyWorkspace',
24
-'Setup.RequestEmptyWorkspace',
25
-]}
26
->
+<Routepath={['Setup.Startup','Setup.Authenticate','Setup.LoadStoredTutorial','Setup.CheckEmptyWorkspace']}>
27
<LoadingPagetext="Launching..."context={context}/>
28
</Route>
29
<Routepath="Setup.Start">
web-app/src/containers/Check/SelectWorkspace.tsx
@@ -17,8 +17,9 @@ const SelectWorkspace = (props: Props) => {
constonOpenWorkspace=()=>props.send({type:'REQUEST_WORKSPACE'})
return(
<divcss={styles.container}>
-<h3>Select or Create An Empty Workspace</h3>
-<p>CodeRoad runs Git commands in the background and will change your workspace files.</p>
+<h3>Select An Empty VSCode Workspace</h3>
+<p>Start a project in an empty folder.</p>
+<p>Once selected, the extension will close and need to be re-started.</p>
<br/>
<Buttontype="secondary"onClick={onOpenWorkspace}>
Open a Workspace
web-app/src/services/state/actions/editor.ts
@@ -75,8 +75,9 @@ export default (editorSend: any) => ({
type:'EDITOR_CHECK_WORKSPACE',
})
},
-requestEmptyWorkspace(){
-// TODO
-console.log('request empty workspace')
+requestWorkspaceSelect(){
+editorSend({
+type:'EDITOR_REQUEST_WORKSPACE',
+})
82
83
web-app/src/services/state/machine.ts
@@ -78,20 +78,17 @@ export const createMachine = (options: any) => {
CheckEmptyWorkspace:{
onEntry:['checkEmptyWorkspace'],
on:{
-REQUEST_WORKSPACE:'RequestEmptyWorkspace',
IS_EMPTY_WORKSPACE:'SelectTutorial',
+NOT_EMPTY_WORKSPACE:'NonEmptyWorkspace',
84
85
NonEmptyWorkspace:{
86
87
88
-},
89
90
-RequestEmptyWorkspace:{
91
-onEntry:['requestWorkspaceSelection'],
92
-on:{
+REQUEST_WORKSPACE:{
+target:'NonEmptyWorkspace',
+actions:'requestWorkspaceSelect',
+},
93
WORKSPACE_LOADED:'CheckEmptyWorkspace',
94
-CANCEL:'NonEmptyWorkspace',
95
96
97
SelectTutorial:{