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
17bee538
Commit
17bee538
authored
May 09, 2019
by
Grandschtroumpf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add swap and main panel
parent
8c4de202
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
0 deletions
+108
-0
main-panel.js
src/app/components/main-panel.js
+24
-0
swap-panel.js
src/app/components/swap-panel.js
+84
-0
No files found.
src/app/components/main-panel.js
0 → 100644
View file @
17bee538
import
{
AbstractPanel
}
from
'./panel'
const
yo
=
require
(
'yo-yo'
)
const
csjs
=
require
(
'csjs-inject'
)
const
css
=
csjs
`
.pluginsContainer {
height: 100%;
display: flex;
overflow-y: hidden;
}
`
export
class
MainPanel
extends
AbstractPanel
{
constructor
(
appStore
,
options
)
{
super
(
'mainPanel'
,
appStore
,
options
)
}
render
()
{
return
yo
`
<div class=
${
css
.
pluginsContainer
}
>
${
this
.
view
}
</div>`
}
}
src/app/components/swap-panel.js
0 → 100644
View file @
17bee538
import
{
AbstractPanel
}
from
'./panel'
const
csjs
=
require
(
'csjs-inject'
)
const
yo
=
require
(
'yo-yo'
)
const
css
=
csjs
`
.panel {
height: 100%;
overflow-y: hidden;
}
.swapitTitle {
text-transform: uppercase;
}
.swapitHeader {
height: 35px;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
.swapitHeader h6 {
margin: 0;
}
.icons i {
height: 80%;
cursor: pointer;
}
.pluginsContainer {
height: calc(100% - 35px);
overflow: auto;
}
`
const
options
=
{
default
:
true
,
displayHeader
:
true
}
export
class
SwapPanel
extends
AbstractPanel
{
constructor
(
appStore
)
{
super
(
'swapPanel'
,
appStore
,
options
)
this
.
header
=
this
.
renderHeader
()
this
.
store
=
appStore
}
/**
* Display content and update the header
* @param {String} name The name of the plugin to display
*/
showContent
(
name
)
{
super
.
showContent
(
name
)
yo
.
update
(
this
.
header
,
this
.
renderHeader
())
}
/** The header of the swap panel */
renderHeader
()
{
let
name
=
' - '
let
hasSettings
=
false
if
(
this
.
active
)
{
const
{
profile
}
=
this
.
store
.
getOne
(
this
.
active
)
name
=
profile
.
displayName
?
profile
.
displayName
:
profile
.
name
hasSettings
=
profile
.
settings
||
false
}
return
yo
`
<header class="
${
css
.
swapitHeader
}
">
<h6 class="
${
css
.
swapitTitle
}
">
${
name
}
</h6>
<div class="
${
css
.
icons
}
">
${
hasSettings
?
yo
`<i class="fas fa-cog"></i>`
:
yo
`<i></i>`
}
</div>
</header>`
}
render
()
{
return
yo
`
<section class="
${
css
.
panel
}
">
${
this
.
header
}
<div class="
${
css
.
pluginsContainer
}
">
${
this
.
view
}
</div>
</section>`
}
}
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