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
10e3483b
Unverified
Commit
10e3483b
authored
Jul 17, 2019
by
Liana Husikyan
Committed by
GitHub
Jul 17, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2195 from ethereum/swapPanelHeight
Close tab issue
parents
354aee6f
be59996a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
fileManager.js
src/app/files/fileManager.js
+1
-5
main-view.js
src/app/panels/main-view.js
+3
-0
tab-proxy.js
src/app/panels/tab-proxy.js
+10
-0
No files found.
src/app/files/fileManager.js
View file @
10e3483b
...
...
@@ -102,10 +102,7 @@ class FileManager extends Plugin {
closeFile
(
name
)
{
delete
this
.
openedFiles
[
name
]
if
(
Object
.
keys
(
this
.
openedFiles
).
length
)
{
this
.
switchFile
(
Object
.
keys
(
this
.
openedFiles
)[
0
])
}
else
{
this
.
editor
.
displayEmptyReadOnlySession
()
if
(
!
Object
.
keys
(
this
.
openedFiles
).
length
)
{
this
.
_deps
.
config
.
set
(
'currentFile'
,
''
)
this
.
events
.
emit
(
'noFileSelected'
)
}
...
...
@@ -274,7 +271,6 @@ class FileManager extends Plugin {
if
(
fileList
.
length
)
{
_switchFile
(
browserProvider
.
type
+
'/'
+
fileList
[
0
])
}
else
{
this
.
editor
.
displayEmptyReadOnlySession
()
this
.
events
.
emit
(
'noFileSelected'
)
}
})
...
...
src/app/panels/main-view.js
View file @
10e3483b
...
...
@@ -82,6 +82,9 @@ export class MainView {
self
.
_components
.
contextView
.
show
()
self
.
_view
.
mainPanel
.
style
.
display
=
'none'
})
self
.
tabProxy
.
event
.
on
(
'tabCountChanged'
,
(
count
)
=>
{
if
(
!
count
)
this
.
editor
.
displayEmptyReadOnlySession
()
})
self
.
data
=
{
_layout
:
{
top
:
{
...
...
src/app/panels/tab-proxy.js
View file @
10e3483b
...
...
@@ -110,6 +110,13 @@ export class TabProxy {
}
}
switchToActiveTab
()
{
const
active
=
this
.
_view
.
filetabs
.
active
if
(
active
&&
this
.
_handlers
[
active
])
{
this
.
switchTab
(
active
)
}
}
showTab
(
name
)
{
this
.
_view
.
filetabs
.
activateTab
(
name
)
}
...
...
@@ -133,6 +140,7 @@ export class TabProxy {
removeTab
(
name
)
{
this
.
_view
.
filetabs
.
removeTab
(
name
)
delete
this
.
_handlers
[
name
]
this
.
switchToActiveTab
()
}
addHandler
(
type
,
fn
)
{
...
...
@@ -143,9 +151,11 @@ export class TabProxy {
this
.
_view
.
filetabs
=
yo
`<remix-tabs></remix-tabs>`
this
.
_view
.
filetabs
.
addEventListener
(
'tabClosed'
,
(
event
)
=>
{
if
(
this
.
_handlers
[
event
.
detail
])
this
.
_handlers
[
event
.
detail
].
close
()
this
.
event
.
emit
(
'tabCountChanged'
,
this
.
_view
.
filetabs
.
tabs
.
length
)
})
this
.
_view
.
filetabs
.
addEventListener
(
'tabActivated'
,
(
event
)
=>
{
if
(
this
.
_handlers
[
event
.
detail
])
this
.
_handlers
[
event
.
detail
].
switchTo
()
this
.
event
.
emit
(
'tabCountChanged'
,
this
.
_view
.
filetabs
.
tabs
.
length
)
})
this
.
_view
.
filetabs
.
canAdd
=
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