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
f7f3c0c7
Unverified
Commit
f7f3c0c7
authored
Jun 04, 2020
by
yann300
Committed by
GitHub
Jun 04, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2855 from ethereum/embed_view
collapse terminal and side panel
parents
9e506e99
1e2f3a4c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
app.js
src/app.js
+4
-1
main-view.js
src/app/panels/main-view.js
+10
-1
theme-module.js
src/app/tabs/theme-module.js
+5
-2
framingService.js
src/framingService.js
+5
-0
No files found.
src/app.js
View file @
f7f3c0c7
...
@@ -412,7 +412,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -412,7 +412,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// get the file from gist
// get the file from gist
const
gistHandler
=
new
GistHandler
()
const
gistHandler
=
new
GistHandler
()
const
queryParams
=
new
QueryParams
()
const
queryParams
=
new
QueryParams
()
const
loadedFromGist
=
gistHandler
.
loadFromGist
(
queryParams
.
get
(),
fileManager
)
const
params
=
queryParams
.
get
()
const
loadedFromGist
=
gistHandler
.
loadFromGist
(
params
,
fileManager
)
if
(
!
loadedFromGist
)
{
if
(
!
loadedFromGist
)
{
// insert example contracts if there are no files to show
// insert example contracts if there are no files to show
self
.
_components
.
filesProviders
[
'browser'
].
resolveDirectory
(
'/'
,
(
error
,
filesList
)
=>
{
self
.
_components
.
filesProviders
[
'browser'
].
resolveDirectory
(
'/'
,
(
error
,
filesList
)
=>
{
...
@@ -428,4 +429,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -428,4 +429,6 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
if
(
isElectron
())
{
if
(
isElectron
())
{
appManager
.
activatePlugin
(
'remixd'
)
appManager
.
activatePlugin
(
'remixd'
)
}
}
if
(
params
.
embed
)
framingService
.
embed
()
}
}
src/app/panels/main-view.js
View file @
f7f3c0c7
...
@@ -80,7 +80,7 @@ export class MainView {
...
@@ -80,7 +80,7 @@ export class MainView {
self
.
data
=
{
self
.
data
=
{
_layout
:
{
_layout
:
{
top
:
{
top
:
{
offset
:
self
.
_
deps
.
config
.
get
(
'terminal-top-offset'
)
||
150
,
offset
:
self
.
_
terminalTopOffset
()
,
show
:
true
show
:
true
}
}
}
}
...
@@ -97,6 +97,9 @@ export class MainView {
...
@@ -97,6 +97,9 @@ export class MainView {
})
})
}
}
}
}
_terminalTopOffset
()
{
return
this
.
_deps
.
config
.
get
(
'terminal-top-offset'
)
||
150
}
_adjustLayout
(
direction
,
delta
)
{
_adjustLayout
(
direction
,
delta
)
{
var
limitUp
=
0
var
limitUp
=
0
var
limitDown
=
32
var
limitDown
=
32
...
@@ -126,6 +129,12 @@ export class MainView {
...
@@ -126,6 +129,12 @@ export class MainView {
self
.
_components
.
terminal
.
scroll2bottom
()
self
.
_components
.
terminal
.
scroll2bottom
()
}
}
}
}
minimizeTerminal
()
{
this
.
_adjustLayout
(
'top'
)
}
showTerminal
(
offset
)
{
this
.
_adjustLayout
(
'top'
,
offset
||
this
.
_terminalTopOffset
())
}
getTerminal
()
{
getTerminal
()
{
return
this
.
_components
.
terminal
return
this
.
_components
.
terminal
}
}
...
...
src/app/tabs/theme-module.js
View file @
f7f3c0c7
import
{
Plugin
}
from
'@remixproject/engine'
import
{
Plugin
}
from
'@remixproject/engine'
import
{
EventEmitter
}
from
'events'
import
{
EventEmitter
}
from
'events'
import
QueryParams
from
'../../lib/query-params'
import
*
as
packageJson
from
'../../../package.json'
import
*
as
packageJson
from
'../../../package.json'
import
yo
from
'yo-yo'
import
yo
from
'yo-yo'
...
@@ -38,7 +39,9 @@ export class ThemeModule extends Plugin {
...
@@ -38,7 +39,9 @@ export class ThemeModule extends Plugin {
config
:
registry
.
get
(
'config'
).
api
config
:
registry
.
get
(
'config'
).
api
}
}
this
.
themes
=
themes
.
reduce
((
acc
,
theme
)
=>
({
...
acc
,
[
theme
.
name
]:
theme
}),
{})
this
.
themes
=
themes
.
reduce
((
acc
,
theme
)
=>
({
...
acc
,
[
theme
.
name
]:
theme
}),
{})
this
.
active
=
this
.
_deps
.
config
.
get
(
'settings/theme'
)
?
this
.
_deps
.
config
.
get
(
'settings/theme'
)
:
'Dark'
const
theme
=
(
new
QueryParams
()).
get
().
theme
this
.
active
=
theme
||
this
.
_deps
.
config
.
get
(
'settings/theme'
)
||
'Dark'
this
.
forced
=
theme
!==
undefined
}
}
/** Return the active theme */
/** Return the active theme */
...
@@ -76,7 +79,7 @@ export class ThemeModule extends Plugin {
...
@@ -76,7 +79,7 @@ export class ThemeModule extends Plugin {
}
}
const
next
=
themeName
||
this
.
active
// Name
const
next
=
themeName
||
this
.
active
// Name
const
nextTheme
=
this
.
themes
[
next
]
// Theme
const
nextTheme
=
this
.
themes
[
next
]
// Theme
this
.
_deps
.
config
.
set
(
'settings/theme'
,
next
)
if
(
!
this
.
forced
)
this
.
_deps
.
config
.
set
(
'settings/theme'
,
next
)
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
nextTheme
.
url
)
document
.
getElementById
(
'theme-link'
).
setAttribute
(
'href'
,
nextTheme
.
url
)
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
nextTheme
.
quality
)
document
.
documentElement
.
style
.
setProperty
(
'--theme'
,
nextTheme
.
quality
)
if
(
themeName
)
this
.
active
=
themeName
if
(
themeName
)
this
.
active
=
themeName
...
...
src/framingService.js
View file @
f7f3c0c7
...
@@ -34,4 +34,9 @@ export class FramingService {
...
@@ -34,4 +34,9 @@ export class FramingService {
}
}
})
})
}
}
embed
()
{
this
.
mainView
.
minimizeTerminal
()
this
.
resizeFeature
.
hidePanel
()
}
}
}
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