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
f6644221
Commit
f6644221
authored
Nov 24, 2021
by
gxkai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.5.0_dev' into 2.5.0
parents
d4465a73
645ea255
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
tab-proxy.js
apps/remix-ide/src/app/panels/tab-proxy.js
+19
-1
index.ts
libs/remix-ui/workspace/src/lib/actions/index.ts
+0
-1
No files found.
apps/remix-ide/src/app/panels/tab-proxy.js
View file @
f6644221
...
@@ -167,6 +167,10 @@ export class TabProxy extends Plugin {
...
@@ -167,6 +167,10 @@ export class TabProxy extends Plugin {
}
}
}
}
clearTab
()
{
this
.
tabsApi
.
activateTab
(
''
)
}
switchNextTab
()
{
switchNextTab
()
{
const
active
=
this
.
tabsApi
.
active
()
const
active
=
this
.
tabsApi
.
active
()
if
(
active
&&
this
.
_handlers
[
active
])
{
if
(
active
&&
this
.
_handlers
[
active
])
{
...
@@ -270,8 +274,19 @@ export class TabProxy extends Plugin {
...
@@ -270,8 +274,19 @@ export class TabProxy extends Plugin {
}
}
removeTab
(
name
)
{
removeTab
(
name
)
{
const
i
=
this
.
loadedTabs
.
findIndex
(
tab
=>
tab
.
name
===
name
)
if
(
name
===
this
.
tabsApi
.
active
())
{
if
(
i
>
0
)
{
this
.
switchPreviousTab
()
}
else
if
(
i
===
0
&&
this
.
loadedTabs
.
length
>
1
)
{
this
.
switchNextTab
()
}
else
{
this
.
clearTab
()
}
delete
this
.
_handlers
[
name
]
delete
this
.
_handlers
[
name
]
}
else
{
this
.
switchToActiveTab
()
this
.
switchToActiveTab
()
}
this
.
loadedTabs
=
this
.
loadedTabs
.
filter
(
tab
=>
tab
.
name
!==
name
)
this
.
loadedTabs
=
this
.
loadedTabs
.
filter
(
tab
=>
tab
.
name
!==
name
)
this
.
renderComponent
()
this
.
renderComponent
()
this
.
updateImgStyles
()
this
.
updateImgStyles
()
...
@@ -294,6 +309,10 @@ export class TabProxy extends Plugin {
...
@@ -294,6 +309,10 @@ export class TabProxy extends Plugin {
if
(
this
.
loadedTabs
[
index
])
{
if
(
this
.
loadedTabs
[
index
])
{
const
name
=
this
.
loadedTabs
[
index
].
name
const
name
=
this
.
loadedTabs
[
index
].
name
if
(
this
.
_handlers
[
name
])
this
.
_handlers
[
name
].
close
()
if
(
this
.
_handlers
[
name
])
this
.
_handlers
[
name
].
close
()
if
(
index
-
1
>=
0
)
{
onSelect
(
index
-
1
)
return
}
this
.
event
.
emit
(
'tabCountChanged'
,
this
.
loadedTabs
.
length
)
this
.
event
.
emit
(
'tabCountChanged'
,
this
.
loadedTabs
.
length
)
}
}
}
}
...
@@ -302,7 +321,6 @@ export class TabProxy extends Plugin {
...
@@ -302,7 +321,6 @@ export class TabProxy extends Plugin {
const
onZoomOut
=
()
=>
this
.
editor
.
editorFontSize
(
-
1
)
const
onZoomOut
=
()
=>
this
.
editor
.
editorFontSize
(
-
1
)
const
onReady
=
(
api
)
=>
{
this
.
tabsApi
=
api
}
const
onReady
=
(
api
)
=>
{
this
.
tabsApi
=
api
}
ReactDOM
.
render
(
ReactDOM
.
render
(
<
TabsUI
tabs
=
{
this
.
loadedTabs
}
onSelect
=
{
onSelect
}
onClose
=
{
onClose
}
onZoomIn
=
{
onZoomIn
}
onZoomOut
=
{
onZoomOut
}
onReady
=
{
onReady
}
/
>
<
TabsUI
tabs
=
{
this
.
loadedTabs
}
onSelect
=
{
onSelect
}
onClose
=
{
onClose
}
onZoomIn
=
{
onZoomIn
}
onZoomOut
=
{
onZoomOut
}
onReady
=
{
onReady
}
/
>
,
this
.
el
)
,
this
.
el
)
...
...
libs/remix-ui/workspace/src/lib/actions/index.ts
View file @
f6644221
...
@@ -294,7 +294,6 @@ export const createNewFolder = async (path: string, rootDir: string) => {
...
@@ -294,7 +294,6 @@ export const createNewFolder = async (path: string, rootDir: string) => {
export
const
deletePath
=
async
(
path
:
string
[])
=>
{
export
const
deletePath
=
async
(
path
:
string
[])
=>
{
const
fileManager
=
plugin
.
fileManager
const
fileManager
=
plugin
.
fileManager
for
(
const
p
of
path
)
{
for
(
const
p
of
path
)
{
try
{
try
{
await
fileManager
.
remove
(
p
)
await
fileManager
.
remove
(
p
)
...
...
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