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
fa42adc5
Unverified
Commit
fa42adc5
authored
Aug 28, 2019
by
yann300
Committed by
GitHub
Aug 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2294 from ethereum/addLoadingForIframePlugin
Add "loading" for iframe plugin
parents
5fda9627
b2a84532
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
panel.js
src/app/components/panel.js
+20
-4
No files found.
src/app/components/panel.js
View file @
fa42adc5
...
...
@@ -20,8 +20,13 @@ const css = csjs`
display : block;
}
.pluginsContainer {
height: 100%;
overflow-y: hidden;
height : 100%;
overflow-y : hidden;
}
.loading {
height : 40px !important;
width : 40px !important;
margin : auto !important;
}
`
...
...
@@ -48,7 +53,18 @@ export class AbstractPanel extends HostPlugin {
view
.
style
.
height
=
'100%'
view
.
style
.
width
=
'100%'
view
.
style
.
border
=
'0'
this
.
contents
[
name
]
=
yo
`<div class="
${
css
.
plugItIn
}
" >
${
view
}
</div>`
const
isIframe
=
view
.
tagName
===
'IFRAME'
view
.
style
.
display
=
isIframe
?
'none'
:
'block'
const
loading
=
isIframe
?
yo
`<div class="spinner-border
${
css
.
loading
}
text-primary" role="status"><div class="sr-only">Loading...</div></div>`
:
''
this
.
contents
[
name
]
=
yo
`<div class="
${
css
.
plugItIn
}
" >
${
view
}${
loading
}
</div>`
if
(
view
.
tagName
===
'IFRAME'
)
{
view
.
addEventListener
(
'load'
,
()
=>
{
this
.
contents
[
name
].
removeChild
(
loading
)
view
.
style
.
display
=
'block'
})
}
this
.
contents
[
name
].
style
.
display
=
'none'
this
.
view
.
appendChild
(
this
.
contents
[
name
])
}
...
...
@@ -82,7 +98,7 @@ export class AbstractPanel extends HostPlugin {
if
(
this
.
active
)
{
this
.
contents
[
this
.
active
].
style
.
display
=
'none'
}
this
.
contents
[
name
].
style
.
display
=
'
block
'
this
.
contents
[
name
].
style
.
display
=
'
flex
'
this
.
active
=
name
}
...
...
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