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
529420e7
Commit
529420e7
authored
Mar 15, 2019
by
LianaHus
Committed by
yann300
Mar 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
fe5421d8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
33 deletions
+57
-33
file-explorer.js
src/app/files/file-explorer.js
+2
-4
file-panel.js
src/app/panels/file-panel.js
+20
-3
landing-page.js
src/app/ui/landing-page/landing-page.js
+35
-26
No files found.
src/app/files/file-explorer.js
View file @
529420e7
...
...
@@ -63,8 +63,6 @@ function fileExplorer (localRegistry, files, menuItems) {
fileManager
:
self
.
_components
.
registry
.
get
(
'filemanager'
).
api
}
self
.
_components
.
registry
.
put
(
`fileexplorer
${
files
.
type
}
`
,
this
)
// warn if file changed outside of Remix
function
remixdDialog
()
{
return
yo
`<div>This file has been changed outside of Remix IDE.</div>`
...
...
@@ -316,11 +314,11 @@ fileExplorer.prototype.init = function () {
return
this
.
container
}
fileExplorer
.
prototype
.
publishToGist
=
function
(
fileProviderName
)
{
fileExplorer
.
prototype
.
publishToGist
=
function
()
{
modalDialogCustom
.
confirm
(
null
,
'Are you sure you want to publish all your files anonymously as a public gist on github.com?'
,
()
=>
{
this
.
toGist
(
fileProviderName
)
}
()
=>
{
this
.
toGist
()
}
)
}
...
...
src/app/panels/file-panel.js
View file @
529420e7
...
...
@@ -8,6 +8,8 @@ var css = require('./styles/file-panel-styles')
import
{
ApiFactory
}
from
'remix-plugin'
var
canUpload
=
window
.
File
||
window
.
FileReader
||
window
.
FileList
||
window
.
Blob
/*
Overview of APIs:
* fileManager: @args fileProviders (browser, shared-folder, swarm, github, etc ...) & config & editor
...
...
@@ -38,16 +40,19 @@ module.exports = class Filepanel extends ApiFactory {
config
:
self
.
_components
.
registry
.
get
(
'config'
).
api
,
pluginManager
:
self
.
_components
.
registry
.
get
(
'pluginmanager'
).
api
}
var
fileExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'browser'
])
var
fileExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'browser'
],
[
'createNewFile'
,
'publishToGist'
,
'copyFiles'
,
canUpload
?
'uploadFile'
:
''
]
)
var
fileSystemExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'localhost'
])
var
swarmExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'swarm'
])
var
githubExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'github'
])
var
gistExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'gist'
])
var
gistExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'gist'
]
,
[
'updateGist'
]
)
var
configExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'config'
])
var
httpExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'http'
])
var
httpsExplorer
=
new
FileExplorer
(
self
.
_components
.
registry
,
self
.
_deps
.
fileProviders
[
'https'
])
self
.
remixdHandle
=
new
RemixdHandle
(
fileSystemExplorer
,
self
.
_deps
.
fileProviders
[
'localhost'
])
self
.
remixdHandle
=
new
RemixdHandle
(
fileSystemExplorer
,
self
.
_deps
.
fileProviders
[
'localhost'
],
self
.
_deps
.
fileProviders
[
'localhost'
].
isReadOnly
?
[
'createNewFile'
]
:
[])
// ----------------- editor panel ----------------------
self
.
_compilerMetadata
=
new
CompilerMetadata
(
...
...
@@ -134,5 +139,17 @@ module.exports = class Filepanel extends ApiFactory {
self
.
render
=
function
render
()
{
return
element
}
}
get
profile
()
{
return
{
name
:
'fileExplorers'
,
displayName
:
'file explorers'
,
methods
:
[],
events
:
[],
icon
:
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNjk2IDM4NHE0MCAwIDY4IDI4dDI4IDY4djEyMTZxMCA0MC0yOCA2OHQtNjggMjhoLTk2MHEtNDAgMC02OC0yOHQtMjgtNjh2LTI4OGgtNTQ0cS00MCAwLTY4LTI4dC0yOC02OHYtNjcycTAtNDAgMjAtODh0NDgtNzZsNDA4LTQwOHEyOC0yOCA3Ni00OHQ4OC0yMGg0MTZxNDAgMCA2OCAyOHQyOCA2OHYzMjhxNjgtNDAgMTI4LTQwaDQxNnptLTU0NCAyMTNsLTI5OSAyOTloMjk5di0yOTl6bS02NDAtMzg0bC0yOTkgMjk5aDI5OXYtMjk5em0xOTYgNjQ3bDMxNi0zMTZ2LTQxNmgtMzg0djQxNnEwIDQwLTI4IDY4dC02OCAyOGgtNDE2djY0MGg1MTJ2LTI1NnEwLTQwIDIwLTg4dDQ4LTc2em05NTYgODA0di0xMTUyaC0zODR2NDE2cTAgNDAtMjggNjh0LTY4IDI4aC00MTZ2NjQwaDg5NnoiLz48L3N2Zz4='
,
description
:
' - '
,
kind
:
'fileexplorer'
}
}
}
src/app/ui/landing-page/landing-page.js
View file @
529420e7
...
...
@@ -48,31 +48,33 @@ export class LandingPage extends ApiFactory {
constructor
(
appManager
,
appStore
)
{
super
()
/*
var actions1 = [
{label: 'new file', type: `callback`, payload: () => { alert(`-new file created-`) }},
{label: 'import from GitHub', type: `callback`, payload: () => { alert(`-imported from GitHub-`) }},
{label: 'import from gist', type: `callback`, payload: () => { alert(`-imported from gist-`) }}
]
var actions2 = [
{label: '...', type: `callback`, payload: () => { alert(`-...-`) }}
]
this
.
sections
=
[]
/* var actions1 = [
{ label: 'New file',
type: 'callback',
payload: () => {
let fileManager = globalRegistry.get('fileexplorerbrowser').api
fileManager.creatNewFile()
}
},
{label: 'Import from GitHub', type: `callback`, payload: () => { this.alert(`-imported from GitHub-`) }},
{label: 'Import from gist', type: `callback`, payload: () => { this.alert(`-imported from gist-`) }}
] */
var
actions3
=
[
{
label
:
'Remix documentation'
,
type
:
`link`
,
payload
:
`https://remix.readthedocs.io/en/latest/#`
},
{
label
:
'GitHub repository'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-ide`
},
{label: '
acces local file system (remixd)
', type: `link`, payload: `https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html`},
{
label
:
'
Access local file system with remixd
'
,
type
:
`link`
,
payload
:
`https://remix.readthedocs.io/en/latest/tutorial_remixd_filesystem.html`
},
{
label
:
'npm module for remixd'
,
type
:
`link`
,
payload
:
`https://www.npmjs.com/package/remixd`
},
{label: '
m
edium posts', type: `link`, payload: `https://medium.com/remix-ide`},
{label: '
t
utorials', type: `link`, payload: `https://github.com/ethereum/remix-workshops`}
{
label
:
'
M
edium posts'
,
type
:
`link`
,
payload
:
`https://medium.com/remix-ide`
},
{
label
:
'
T
utorials'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-workshops`
}
]
var
actions4
=
[
{
label
:
'Remix plugins & modules'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin/blob/master/readme.md`
},
{label: '
r
epository on GitHub', type: `link`, payload: `https://github.com/ethereum/remix-plugin`},
{label: '
e
xamples', type: `link`, payload: `https://github.com/ethereum/remix-plugin/tree/master/examples`},
{label: '
build
plugin for Remix', type: `link`, payload: `https://medium.com/remix-ide/build-a-plugin-for-remix-90d43b209c5a`}
{
label
:
'
R
epository on GitHub'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin`
},
{
label
:
'
E
xamples'
,
type
:
`link`
,
payload
:
`https://github.com/ethereum/remix-plugin/tree/master/examples`
},
{
label
:
'
Build a
plugin for Remix'
,
type
:
`link`
,
payload
:
`https://medium.com/remix-ide/build-a-plugin-for-remix-90d43b209c5a`
}
]
var
actions5
=
[
...
...
@@ -81,13 +83,12 @@ export class LandingPage extends ApiFactory {
{
label
:
'Reddit'
,
type
:
`link`
,
payload
:
`https://www.reddit.com/r/ethdev/search?q=remix&restrict_sr=1`
}
]
var section1 = new Section('Start', actions1)
var section2 = new Section('Recent', actions2)
var section3 = new Section('Learn', actions3)
var section4 = new Section('Plugins', actions4)
var section5 = new Section('Help', actions5)
*/
const
sectionsWorkspaces
=
[]
// var sectionStart = new Section('Start', actions1)
var
sectionLearn
=
new
Section
(
'Learn'
,
actions3
)
var
sectionPlugins
=
new
Section
(
'Plugins'
,
actions4
)
var
sectionHelp
=
new
Section
(
'Help'
,
actions5
)
var
sectionsWorkspaces
=
[]
sectionsWorkspaces
.
push
({
label
:
'Close All Modules'
,
type
:
'callback'
,
...
...
@@ -97,10 +98,18 @@ export class LandingPage extends ApiFactory {
.
forEach
((
profile
)
=>
{
appManager
.
deactivateOne
(
profile
.
name
)
})
}})
defaultWorkspaces
(
appManager
).
forEach
((
workspace
)
=>
{
sectionsWorkspaces
.
push
({
label
:
workspace
.
title
,
type
:
'callback'
,
payload
:
()
=>
{
workspace
.
activate
()
}})
sectionsWorkspaces
.
push
({
label
:
workspace
.
title
,
type
:
'callback'
,
payload
:
()
=>
{
workspace
.
activate
()
}
})
const
sectionWorkspace
=
new
Section
(
'Workspaces'
,
sectionsWorkspaces
)
this
.
sections
=
sectionWorkspace
})
var
sectionWorkspace
=
new
Section
(
'Workspaces'
,
sectionsWorkspaces
)
this
.
sections
.
push
(
sectionWorkspace
)
this
.
sections
.
push
(
sectionLearn
)
this
.
sections
.
push
(
sectionPlugins
)
this
.
sections
.
push
(
sectionHelp
)
}
get
profile
()
{
...
...
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