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
bfd497fe
Unverified
Commit
bfd497fe
authored
May 29, 2019
by
yann300
Committed by
GitHub
May 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2028 from ethereum/toaster_l
makes tooltip work with DOM element as an inpput
parents
68ea318e
e4206165
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
9 deletions
+31
-9
package.json
package.json
+1
-1
fileManager.js
src/app/files/fileManager.js
+7
-1
terminal-styles.js
src/app/panels/styles/terminal-styles.js
+3
-0
terminal.js
src/app/panels/terminal.js
+1
-1
tooltip-styles.js
src/app/ui/styles/tooltip-styles.js
+1
-0
tooltip.js
src/app/ui/tooltip.js
+18
-6
No files found.
package.json
View file @
bfd497fe
...
...
@@ -156,7 +156,7 @@
"remix-ide"
:
"./bin/remix-ide"
},
"scripts"
:
{
"setupremix"
:
"npm run linkremixdebug && npm run linkremixlib && npm run linkremixsolidity && npm run linkremix
simulato
r && npm run linkremixtests"
,
"setupremix"
:
"npm run linkremixdebug && npm run linkremixlib && npm run linkremixsolidity && npm run linkremix
analyze
r && npm run linkremixtests"
,
"pullremix"
:
"git clone https://github.com/ethereum/remix"
,
"linkremixlib"
:
"cd node_modules && rm -rf remix-lib && ln -s ../../remix/remix-lib remix-lib && cd .."
,
"linkremixsolidity"
:
"cd node_modules && rm -rf remix-solidity && ln -s ../../remix/remix-solidity remix-solidity && cd .."
,
...
...
src/app/files/fileManager.js
View file @
bfd497fe
...
...
@@ -149,7 +149,13 @@ class FileManager extends FileSystemApi {
}}
>
Save
As
Copy
<
/button
>
<
/div>
`
}
await toaster(yo`
<
div
><
i
class
=
"fas fa-exclamation-triangle text-info mr-1"
><
/i><span class="text-primary">${this.currentRequest.from}</
span
>
is
modyfing
<
span
class
=
"text-primary"
>
$
{
path
}
<
/span></
div
>
`, actions, { time: 4000 })
await toaster(yo`
<
div
>
<
i
class
=
"fas fa-exclamation-triangle text-danger mr-1"
><
/i
>
<
span
>
$
{
this
.
currentRequest
.
from
}
<
span
class
=
"text-danger"
>
is
modyfing
<
/span>${path
}
<
/span
>
<
/div>`, actions, { time: 4000 }
)
if
(
reject
)
throw
new
Error
(
`set file operation on
${
path
}
aborted by user.`
)
if
(
savedAsAnotherFile
)
return
}
...
...
src/app/panels/styles/terminal-styles.js
View file @
bfd497fe
...
...
@@ -128,6 +128,9 @@ var css = csjs`
border-left : 1px solid var(--secondary)
height : 65%;
}
.listenOnNetworkLabel {
white-space : nowrap;
}
.pendingTx {
border-radius : 50%;
margin-right : 30px;
...
...
src/app/panels/terminal.js
View file @
bfd497fe
...
...
@@ -152,7 +152,7 @@ class Terminal extends BaseApi {
title="If checked Remix will listen on all transactions mined in the current environment and not only transactions created by you"
>
<label
class="form-check-label"
class="
${
css
.
listenOnNetworkLabel
}
form-check-label"
title="If checked Remix will listen on all transactions mined in the current environment and not only transactions created by you"
for="listenNetworkCheck"
>
...
...
src/app/ui/styles/tooltip-styles.js
View file @
bfd497fe
...
...
@@ -15,6 +15,7 @@ var css = csjs`
font-size: 14px;
text-align: center;
bottom: 0;
flex-direction: row;
}
@-webkit-keyframes animatebottom {
0% {bottom: -300px}
...
...
src/app/ui/tooltip.js
View file @
bfd497fe
/* global Element */
var
yo
=
require
(
'yo-yo'
)
var
css
=
require
(
'./styles/tooltip-styles'
)
var
modal
=
require
(
'./modal-dialog-custom'
)
...
...
@@ -24,7 +25,10 @@ class Toaster {
}
render
(
tooltipText
,
action
,
opts
)
{
opts
=
defaultOptions
(
opts
)
let
canShorten
=
true
if
(
tooltipText
instanceof
Element
)
{
canShorten
=
false
}
else
{
if
(
typeof
tooltipText
===
'object'
)
{
if
(
tooltipText
.
message
)
{
tooltipText
=
tooltipText
.
message
...
...
@@ -35,21 +39,29 @@ class Toaster {
}
}
}
}
return
new
Promise
((
resolve
,
reject
)
=>
{
const
shortTooltipText
=
tooltipText
.
length
>
201
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
const
shortTooltipText
=
(
canShorten
&&
tooltipText
.
length
>
201
)
?
tooltipText
.
substring
(
0
,
200
)
+
'...'
:
tooltipText
let
button
=
tooltipText
.
length
>
201
?
yo
`
<button class="btn btn-secondary btn-sm
" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
s
how
full
message
<
/button
>
<button class="btn btn-secondary btn-sm
mx-3" style="white-space: nowrap;" onclick=
${()
=>
{
modal
.
alert
(
tooltipText
)
}}
>
S
how
full
message
<
/button
>
` : ``
this.tooltip = yo`
<
div
class
=
"${css.tooltip} alert alert-info"
onmouseenter
=
$
{()
=>
{
over
()
}}
onmouseleave
=
$
{()
=>
{
out
()
}}
>
<
span
>
<
div
class
=
"${css.tooltip} alert alert-info p-2"
onmouseenter
=
$
{()
=>
{
over
()
}}
onmouseleave
=
$
{()
=>
{
out
()
}}
>
<
span
class
=
"px-2"
>
$
{
shortTooltipText
}
${
button
}
</span>
${
action
}
</span>
<span style="align-self: baseline;">
<button class="fas fa-times btn-info mx-1 p-0" onclick=
${()
=>
{
this
.
hide
()
over
()
resolve
()
}}
><
/button
>
<
/span
>
<
/div>
`
let
timeOut
=
()
=>
{
return
setTimeout
(()
=>
{
...
...
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