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
eb5e07ec
Commit
eb5e07ec
authored
Feb 27, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add config explorer
parent
03fafd23
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
0 deletions
+14
-0
app.js
src/app.js
+4
-0
fileManager.js
src/app/files/fileManager.js
+2
-0
file-panel.js
src/app/panels/file-panel.js
+7
-0
config.js
src/config.js
+1
-0
No files found.
src/app.js
View file @
eb5e07ec
...
...
@@ -17,6 +17,7 @@ var GistHandler = require('./lib/gist-handler')
var
helper
=
require
(
'./lib/helper'
)
var
Storage
=
remixLib
.
Storage
var
Browserfiles
=
require
(
'./app/files/browser-files'
)
var
BrowserfilesTree
=
require
(
'./app/files/browser-files-tree'
)
var
chromeCloudStorageSync
=
require
(
'./app/files/chromeCloudStorageSync'
)
var
SharedFolder
=
require
(
'./app/files/shared-folder'
)
var
Config
=
require
(
'./config'
)
...
...
@@ -111,11 +112,14 @@ class App {
var
self
=
this
self
.
_api
=
{}
var
fileStorage
=
new
Storage
(
'sol:'
)
var
configStorage
=
new
Storage
(
'config:'
)
self
.
_api
.
config
=
new
Config
(
fileStorage
)
executionContext
.
init
(
self
.
_api
.
config
)
executionContext
.
listenOnLastBlock
()
self
.
_api
.
filesProviders
=
{}
self
.
_api
.
filesProviders
[
'browser'
]
=
new
Browserfiles
(
fileStorage
)
self
.
_api
.
filesProviders
[
'config'
]
=
new
BrowserfilesTree
(
'config'
,
configStorage
)
self
.
_api
.
filesProviders
[
'config'
].
init
()
var
remixd
=
new
Remixd
()
remixd
.
event
.
register
(
'system'
,
(
message
)
=>
{
if
(
message
.
error
)
toolTip
(
message
.
error
)
...
...
src/app/files/fileManager.js
View file @
eb5e07ec
...
...
@@ -24,8 +24,10 @@ class FileManager {
this
.
opt
=
opt
this
.
opt
.
filesProviders
[
'browser'
].
event
.
register
(
'fileRenamed'
,
(
oldName
,
newName
,
isFolder
)
=>
{
this
.
fileRenamedEvent
(
oldName
,
newName
,
isFolder
)
})
this
.
opt
.
filesProviders
[
'localhost'
].
event
.
register
(
'fileRenamed'
,
(
oldName
,
newName
,
isFolder
)
=>
{
this
.
fileRenamedEvent
(
oldName
,
newName
,
isFolder
)
})
this
.
opt
.
filesProviders
[
'config'
].
event
.
register
(
'fileRenamed'
,
(
oldName
,
newName
,
isFolder
)
=>
{
this
.
fileRenamedEvent
(
oldName
,
newName
,
isFolder
)
})
this
.
opt
.
filesProviders
[
'browser'
].
event
.
register
(
'fileRemoved'
,
(
path
)
=>
{
this
.
fileRemovedEvent
(
path
)
})
this
.
opt
.
filesProviders
[
'localhost'
].
event
.
register
(
'fileRemoved'
,
(
path
)
=>
{
this
.
fileRemovedEvent
(
path
)
})
this
.
opt
.
filesProviders
[
'config'
].
event
.
register
(
'fileRemoved'
,
(
path
)
=>
{
this
.
fileRemovedEvent
(
path
)
})
// tabs
var
$filesEl
=
$
(
'#files'
)
...
...
src/app/panels/file-panel.js
View file @
eb5e07ec
...
...
@@ -45,6 +45,7 @@ function filepanel (appAPI, filesProvider) {
var
swarmExplorer
=
new
FileExplorer
(
appAPI
,
filesProvider
[
'swarm'
])
var
githubExplorer
=
new
FileExplorer
(
appAPI
,
filesProvider
[
'github'
])
var
gistExplorer
=
new
FileExplorer
(
appAPI
,
filesProvider
[
'gist'
])
var
configExplorer
=
new
FileExplorer
(
appAPI
,
filesProvider
[
'config'
])
var
dragbar
=
yo
`<div onmousedown=
${
mousedown
}
class=
${
css
.
dragbar
}
></div>`
...
...
@@ -91,6 +92,7 @@ function filepanel (appAPI, filesProvider) {
</div>
<div class=
${
css
.
treeviews
}
>
<div class=
${
css
.
treeview
}
>
${
fileExplorer
.
init
()}
</div>
<div class="configexplorer
${
css
.
treeview
}
">
${
configExplorer
.
init
()}
</div>
<div class="filesystemexplorer
${
css
.
treeview
}
">
${
fileSystemExplorer
.
init
()}
</div>
<div class="swarmexplorer
${
css
.
treeview
}
">
${
swarmExplorer
.
init
()}
</div>
<div class="githubexplorer
${
css
.
treeview
}
">
${
githubExplorer
.
init
()}
</div>
...
...
@@ -106,6 +108,7 @@ function filepanel (appAPI, filesProvider) {
self
.
event
=
event
var
element
=
template
()
fileExplorer
.
ensureRoot
()
configExplorer
.
ensureRoot
()
var
websocketconn
=
element
.
querySelector
(
'.websocketconn'
)
filesProvider
[
'localhost'
].
remixd
.
event
.
register
(
'connecting'
,
(
event
)
=>
{
websocketconn
.
style
.
color
=
styles
.
colors
.
yellow
...
...
@@ -134,6 +137,10 @@ function filepanel (appAPI, filesProvider) {
appAPI
.
switchFile
(
path
)
})
configExplorer
.
events
.
register
(
'focus'
,
function
(
path
)
{
appAPI
.
switchFile
(
path
)
})
fileSystemExplorer
.
events
.
register
(
'focus'
,
function
(
path
)
{
appAPI
.
switchFile
(
path
)
})
...
...
src/config.js
View file @
eb5e07ec
...
...
@@ -35,6 +35,7 @@ function Config (storage) {
this
.
ensureStorageUpdated
=
function
(
key
)
{
if
(
key
===
'currentFile'
)
{
if
(
this
.
items
[
key
]
&&
this
.
items
[
key
]
!==
''
&&
this
.
items
[
key
].
indexOf
(
'config/'
)
!==
0
&&
this
.
items
[
key
].
indexOf
(
'browser/'
)
!==
0
&&
this
.
items
[
key
].
indexOf
(
'localhost/'
)
!==
0
&&
this
.
items
[
key
].
indexOf
(
'swarm/'
)
!==
0
&&
...
...
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