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
b7997fb9
Commit
b7997fb9
authored
Feb 03, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
current folder changed
parent
34f65366
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
5 deletions
+22
-5
app.js
apps/remix-ide/src/app.js
+4
-4
remixDProvider.js
apps/remix-ide/src/app/files/remixDProvider.js
+4
-0
file-explorer.tsx
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
+10
-0
index.ts
libs/remixd/src/index.ts
+3
-1
remixdClient.ts
libs/remixd/src/services/remixdClient.ts
+1
-0
No files found.
apps/remix-ide/src/app.js
View file @
b7997fb9
...
@@ -391,6 +391,10 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -391,6 +391,10 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
filePanel
.
gitHandle
filePanel
.
gitHandle
])
])
if
(
isElectron
())
{
appManager
.
activatePlugin
(
'remixd'
)
}
try
{
try
{
engine
.
register
(
await
appManager
.
registeredPlugins
())
engine
.
register
(
await
appManager
.
registeredPlugins
())
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -455,9 +459,5 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -455,9 +459,5 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
})
})
}
}
if
(
isElectron
())
{
appManager
.
activatePlugin
(
'remixd'
)
}
if
(
params
.
embed
)
framingService
.
embed
()
if
(
params
.
embed
)
framingService
.
embed
()
}
}
apps/remix-ide/src/app/files/remixDProvider.js
View file @
b7997fb9
...
@@ -41,6 +41,10 @@ module.exports = class RemixDProvider {
...
@@ -41,6 +41,10 @@ module.exports = class RemixDProvider {
this
.
_appManager
.
on
(
'remixd'
,
'fileRenamed'
,
(
oldPath
,
newPath
)
=>
{
this
.
_appManager
.
on
(
'remixd'
,
'fileRenamed'
,
(
oldPath
,
newPath
)
=>
{
this
.
event
.
trigger
(
'fileRemoved'
,
[
this
.
addPrefix
(
oldPath
),
this
.
addPrefix
(
newPath
)])
this
.
event
.
trigger
(
'fileRemoved'
,
[
this
.
addPrefix
(
oldPath
),
this
.
addPrefix
(
newPath
)])
})
})
this
.
_appManager
.
on
(
'remixd'
,
'rootFolderChanged'
,
()
=>
{
this
.
event
.
trigger
(
'rootFolderChanged'
,
[])
})
}
}
isConnected
()
{
isConnected
()
{
...
...
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
View file @
b7997fb9
...
@@ -127,6 +127,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -127,6 +127,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
if
(
state
.
fileManager
)
{
if
(
state
.
fileManager
)
{
filesProvider
.
event
.
register
(
'fileExternallyChanged'
,
fileExternallyChanged
)
filesProvider
.
event
.
register
(
'fileExternallyChanged'
,
fileExternallyChanged
)
filesProvider
.
event
.
register
(
'fileRenamedError'
,
fileRenamedError
)
filesProvider
.
event
.
register
(
'fileRenamedError'
,
fileRenamedError
)
filesProvider
.
event
.
register
(
'rootFolderChanged'
,
rootFolderChanged
)
}
}
},
[
state
.
fileManager
])
},
[
state
.
fileManager
])
...
@@ -482,6 +483,15 @@ export const FileExplorer = (props: FileExplorerProps) => {
...
@@ -482,6 +483,15 @@ export const FileExplorer = (props: FileExplorerProps) => {
},
null
)
},
null
)
}
}
// register to event of the file provider
// files.event.register('rootFolderChanged', rootFolderChanged)
const
rootFolderChanged
=
async
()
=>
{
const
files
=
await
fetchDirectoryContent
(
name
)
setState
(
prevState
=>
{
return
{
...
prevState
,
files
}
})
}
const
uploadFile
=
(
target
)
=>
{
const
uploadFile
=
(
target
)
=>
{
// TODO The file explorer is merely a view on the current state of
// TODO The file explorer is merely a view on the current state of
// the files module. Please ask the user here if they want to overwrite
// the files module. Please ask the user here if they want to overwrite
...
...
libs/remixd/src/index.ts
View file @
b7997fb9
'use strict'
'use strict'
import
{
RemixdClient
as
sharedFolder
}
from
'./services/remixdClient'
import
{
RemixdClient
as
sharedFolder
}
from
'./services/remixdClient'
import
{
GitClient
}
from
'./services/gitClient'
import
Websocket
from
'./websocket'
import
Websocket
from
'./websocket'
import
*
as
utils
from
'./utils'
import
*
as
utils
from
'./utils'
...
@@ -7,6 +8,7 @@ module.exports = {
...
@@ -7,6 +8,7 @@ module.exports = {
Websocket
,
Websocket
,
utils
,
utils
,
services
:
{
services
:
{
sharedFolder
sharedFolder
,
GitClient
}
}
}
}
libs/remixd/src/services/remixdClient.ts
View file @
b7997fb9
...
@@ -20,6 +20,7 @@ export class RemixdClient extends PluginClient {
...
@@ -20,6 +20,7 @@ export class RemixdClient extends PluginClient {
sharedFolder
(
currentSharedFolder
:
string
,
readOnly
:
boolean
):
void
{
sharedFolder
(
currentSharedFolder
:
string
,
readOnly
:
boolean
):
void
{
this
.
currentSharedFolder
=
currentSharedFolder
this
.
currentSharedFolder
=
currentSharedFolder
this
.
readOnly
=
readOnly
this
.
readOnly
=
readOnly
if
(
this
.
isLoaded
)
this
.
emit
(
'rootFolderChanged'
)
}
}
list
():
Filelist
{
list
():
Filelist
{
...
...
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