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
b9689481
Commit
b9689481
authored
Nov 12, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes after review
parent
085afff8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
file-explorer.js
src/app/files/file-explorer.js
+3
-4
fileProvider.js
src/app/files/fileProvider.js
+2
-2
No files found.
src/app/files/file-explorer.js
View file @
b9689481
...
@@ -587,7 +587,7 @@ fileExplorer.prototype.copyFiles = function () {
...
@@ -587,7 +587,7 @@ fileExplorer.prototype.copyFiles = function () {
fileExplorer
.
prototype
.
createNewFile
=
function
(
parentFolder
=
'browser'
)
{
fileExplorer
.
prototype
.
createNewFile
=
function
(
parentFolder
=
'browser'
)
{
let
self
=
this
let
self
=
this
modalDialogCustom
.
prompt
(
'Create new file'
,
'File Name (e.g Untitled.sol)'
,
'Untitled.sol'
,
(
input
)
=>
{
modalDialogCustom
.
prompt
(
'Create new file'
,
'File Name (e.g Untitled.sol)'
,
'Untitled.sol'
,
(
input
)
=>
{
if
(
input
===
''
)
input
=
'New file'
if
(
!
input
)
input
=
'New file'
helper
.
createNonClashingName
(
parentFolder
+
'/'
+
input
,
self
.
files
,
(
error
,
newName
)
=>
{
helper
.
createNonClashingName
(
parentFolder
+
'/'
+
input
,
self
.
files
,
(
error
,
newName
)
=>
{
if
(
error
)
return
tooltip
(
'Failed to create file '
+
newName
+
' '
+
error
)
if
(
error
)
return
tooltip
(
'Failed to create file '
+
newName
+
' '
+
error
)
...
@@ -606,9 +606,8 @@ fileExplorer.prototype.createNewFile = function (parentFolder = 'browser') {
...
@@ -606,9 +606,8 @@ fileExplorer.prototype.createNewFile = function (parentFolder = 'browser') {
fileExplorer
.
prototype
.
createNewFolder
=
function
(
parentFolder
)
{
fileExplorer
.
prototype
.
createNewFolder
=
function
(
parentFolder
)
{
let
self
=
this
let
self
=
this
modalDialogCustom
.
prompt
(
'Create new folder'
,
''
,
'New folder'
,
(
input
)
=>
{
modalDialogCustom
.
prompt
(
'Create new folder'
,
''
,
'New folder'
,
(
input
)
=>
{
if
(
input
===
''
)
{
if
(
!
input
)
{
tooltip
(
'Failed to create folder. The name can not be empty'
)
return
tooltip
(
'Failed to create folder. The name can not be empty'
)
return
false
}
}
const
currentPath
=
!
parentFolder
?
self
.
_deps
.
fileManager
.
currentPath
()
:
parentFolder
const
currentPath
=
!
parentFolder
?
self
.
_deps
.
fileManager
.
currentPath
()
:
parentFolder
...
...
src/app/files/fileProvider.js
View file @
b9689481
...
@@ -147,10 +147,10 @@ class FileProvider {
...
@@ -147,10 +147,10 @@ class FileProvider {
this
.
event
.
trigger
(
'fileRemoved'
,
[
this
.
_normalizePath
(
path
)])
this
.
event
.
trigger
(
'fileRemoved'
,
[
this
.
_normalizePath
(
path
)])
return
true
return
true
}
else
{
}
else
{
le
t
items
=
window
.
remixFileSystem
.
readdirSync
(
path
)
cons
t
items
=
window
.
remixFileSystem
.
readdirSync
(
path
)
if
(
items
.
length
!==
0
)
{
if
(
items
.
length
!==
0
)
{
items
.
forEach
((
item
,
index
)
=>
{
items
.
forEach
((
item
,
index
)
=>
{
let
curPath
=
path
+
'/'
+
item
const
curPath
=
`
${
path
}
/
${
item
}
`
if
(
window
.
remixFileSystem
.
statSync
(
curPath
).
isDirectory
())
{
// delete folder
if
(
window
.
remixFileSystem
.
statSync
(
curPath
).
isDirectory
())
{
// delete folder
this
.
remove
(
curPath
)
this
.
remove
(
curPath
)
}
else
{
// delete file
}
else
{
// delete file
...
...
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