Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
d3ac2b1b
Commit
d3ac2b1b
authored
May 17, 2021
by
aniket-engg
Committed by
Aniket
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to previous workspace from localhost
parent
0acf34ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
remix-ui-workspace.tsx
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
+3
-0
No files found.
libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
View file @
d3ac2b1b
...
...
@@ -91,6 +91,7 @@ export const Workspace = (props: WorkspaceProps) => {
const
localhostDisconnect
=
()
=>
{
if
(
state
.
currentWorkspace
===
LOCALHOST
)
setWorkspace
(
props
.
workspaces
.
length
>
0
?
props
.
workspaces
[
0
]
:
NO_WORKSPACE
)
else
setWorkspace
(
state
.
currentWorkspace
)
// Useful to switch to last selcted workspace when remixd is disconnected
}
props
.
localhost
.
event
.
unregister
(
'disconnected'
,
localhostDisconnect
)
props
.
localhost
.
event
.
register
(
'disconnected'
,
localhostDisconnect
)
...
...
@@ -272,6 +273,7 @@ export const Workspace = (props: WorkspaceProps) => {
const
remixdExplorer
=
{
hide
:
async
()
=>
{
// If 'connect to localhost' is clicked from home tab, mode is not 'localhost'
if
(
props
.
fileManager
.
mode
===
'localhost'
)
{
await
setWorkspace
(
NO_WORKSPACE
)
props
.
fileManager
.
setMode
(
'browser'
)
...
...
@@ -279,6 +281,7 @@ export const Workspace = (props: WorkspaceProps) => {
return
{
...
prevState
,
hideRemixdExplorer
:
true
,
loadingLocalhost
:
false
}
})
}
else
{
// Hide spinner in file explorer
setState
(
prevState
=>
{
return
{
...
prevState
,
loadingLocalhost
:
false
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment