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
01c2781f
Commit
01c2781f
authored
Mar 24, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate from homepage
parent
baa1563c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
app.js
apps/remix-ide/src/app.js
+1
-3
landing-page.js
apps/remix-ide/src/app/ui/landing-page/landing-page.js
+9
-0
migrateFileSystem.js
apps/remix-ide/src/migrateFileSystem.js
+2
-6
No files found.
apps/remix-ide/src/app.js
View file @
01c2781f
...
@@ -18,7 +18,7 @@ import { LandingPage } from './app/ui/landing-page/landing-page'
...
@@ -18,7 +18,7 @@ import { LandingPage } from './app/ui/landing-page/landing-page'
import
{
MainPanel
}
from
'./app/components/main-panel'
import
{
MainPanel
}
from
'./app/components/main-panel'
import
FetchAndCompile
from
'./app/compiler/compiler-sourceVerifier-fetchAndCompile'
import
FetchAndCompile
from
'./app/compiler/compiler-sourceVerifier-fetchAndCompile'
import
migrateFileSystem
,
{
migrateToWorkspace
}
from
'./migrateFileSystem'
import
migrateFileSystem
from
'./migrateFileSystem'
const
isElectron
=
require
(
'is-electron'
)
const
isElectron
=
require
(
'is-electron'
)
const
csjs
=
require
(
'csjs-inject'
)
const
csjs
=
require
(
'csjs-inject'
)
...
@@ -494,7 +494,5 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -494,7 +494,5 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// get the file list from the parent iframe
// get the file list from the parent iframe
loadFileFromParent
(
fileManager
)
loadFileFromParent
(
fileManager
)
migrateToWorkspace
(
fileManager
,
filePanel
)
if
(
params
.
embed
)
framingService
.
embed
()
if
(
params
.
embed
)
framingService
.
embed
()
}
}
apps/remix-ide/src/app/ui/landing-page/landing-page.js
View file @
01c2781f
...
@@ -357,6 +357,11 @@ export class LandingPage extends ViewPlugin {
...
@@ -357,6 +357,11 @@ export class LandingPage extends ViewPlugin {
query
.
update
({
appVersion
:
'0.7.7'
})
query
.
update
({
appVersion
:
'0.7.7'
})
document
.
location
.
reload
()
document
.
location
.
reload
()
}
}
const
migrateWorkspace
=
()
=>
{
migrateToWorkspace
(
globalRegistry
.
get
(
'fileManager'
).
api
,
globalRegistry
.
get
(
'filePanel'
).
api
)
}
const
img
=
yo
`<img class=
${
css
.
logoImg
}
src="assets/img/guitarRemiCroped.webp" onclick="
${()
=>
playRemi
()}
"></img>`
const
img
=
yo
`<img class=
${
css
.
logoImg
}
src="assets/img/guitarRemiCroped.webp" onclick="
${()
=>
playRemi
()}
"></img>`
const
playRemi
=
async
()
=>
{
await
document
.
getElementById
(
'remiAudio'
).
play
()
}
const
playRemi
=
async
()
=>
{
await
document
.
getElementById
(
'remiAudio'
).
play
()
}
// to retrieve medium posts
// to retrieve medium posts
...
@@ -435,6 +440,10 @@ export class LandingPage extends ViewPlugin {
...
@@ -435,6 +440,10 @@ export class LandingPage extends ViewPlugin {
<i class="fab fa-ethereum
${
css
.
image
}
"></i>
<i class="fab fa-ethereum
${
css
.
image
}
"></i>
<span class="
${
css
.
text
}
" onclick=
${()
=>
switchToPreviousVersion
()}
>Old experience</span>
<span class="
${
css
.
text
}
" onclick=
${()
=>
switchToPreviousVersion
()}
>Old experience</span>
</p>
</p>
<p>
<i class="fab fa-ethereum
${
css
.
image
}
"></i>
<span class="
${
css
.
text
}
" onclick=
${()
=>
migrateWorkspace
()}
>Migrate old filesystem to workspace</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
apps/remix-ide/src/migrateFileSystem.js
View file @
01c2781f
...
@@ -24,19 +24,15 @@ export default (fileProvider) => {
...
@@ -24,19 +24,15 @@ export default (fileProvider) => {
export
async
function
migrateToWorkspace
(
fileManager
,
filePanel
)
{
export
async
function
migrateToWorkspace
(
fileManager
,
filePanel
)
{
const
browserProvider
=
fileManager
.
getProvider
(
'browser'
)
const
browserProvider
=
fileManager
.
getProvider
(
'browser'
)
const
workspaceProvider
=
fileManager
.
getProvider
(
'workspace'
)
const
workspaceProvider
=
fileManager
.
getProvider
(
'workspace'
)
const
flag
=
'status'
const
fileStorageBrowserWorkspace
=
new
Storage
(
'remix_browserWorkspace_migration:'
)
if
(
fileStorageBrowserWorkspace
.
get
(
flag
)
===
'done'
)
return
const
files
=
await
browserProvider
.
copyFolderToJson
(
'/'
)
const
files
=
await
browserProvider
.
copyFolderToJson
(
'/'
)
console
.
log
(
files
)
console
.
log
(
files
)
if
(
Object
.
keys
(
files
).
length
>
0
)
{
if
(
Object
.
keys
(
files
).
length
>
0
)
{
const
workspaceName
=
'
default_workspace'
const
workspaceName
=
'
workspace_migrated_'
+
Date
.
now
()
const
workspacePath
=
joinPath
(
'browser'
,
workspaceProvider
.
workspacesPath
,
workspaceName
)
const
workspacePath
=
joinPath
(
'browser'
,
workspaceProvider
.
workspacesPath
,
workspaceName
)
await
filePanel
.
processCreateWorkspace
(
workspaceName
)
await
filePanel
.
processCreateWorkspace
(
workspaceName
)
filePanel
.
getWorkspaces
()
// refresh list
filePanel
.
getWorkspaces
()
// refresh list
await
populateWorkspace
(
workspacePath
,
files
,
browserProvider
)
await
populateWorkspace
(
workspacePath
,
files
,
browserProvider
)
}
}
fileStorageBrowserWorkspace
.
set
(
flag
,
'done'
)
}
}
const
populateWorkspace
=
async
(
workspace
,
json
,
browserProvider
)
=>
{
const
populateWorkspace
=
async
(
workspace
,
json
,
browserProvider
)
=>
{
...
...
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