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
483a1ad8
Commit
483a1ad8
authored
Sep 26, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
0cd50b5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
file-explorer.js
src/app/files/file-explorer.js
+4
-4
fileProvider.js
src/app/files/fileProvider.js
+1
-1
remixDProvider.js
src/app/files/remixDProvider.js
+0
-4
No files found.
src/app/files/file-explorer.js
View file @
483a1ad8
...
...
@@ -207,13 +207,13 @@ function fileExplorer (localRegistry, files, menuItems) {
}
}
else
{
actions
[
'Rename'
]
=
()
=>
{
if
(
self
.
files
.
readonly
)
{
return
tooltip
(
'cannot rename folder. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
if
(
self
.
files
.
isReadOnly
(
key
)
)
{
return
tooltip
(
'cannot rename folder. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
var
name
=
label
.
querySelector
(
'span[data-path="'
+
key
+
'"]'
)
if
(
name
)
editModeOn
(
name
)
}
}
actions
[
'Delete'
]
=
()
=>
{
if
(
self
.
files
.
readonly
)
{
return
tooltip
(
'cannot delete folder. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
if
(
self
.
files
.
isReadOnly
(
key
)
)
{
return
tooltip
(
'cannot delete folder. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
modalDialogCustom
.
confirm
(
'Confirm to delete a folder'
,
'Are you sure you want to delete this folder?'
,
()
=>
{
files
.
remove
(
key
)
},
()
=>
{})
}
MENU_HANDLE
=
contextMenu
(
event
,
actions
)
...
...
@@ -226,12 +226,12 @@ function fileExplorer (localRegistry, files, menuItems) {
const
provider
=
self
.
_deps
.
fileManager
.
fileProviderOf
(
key
)
if
(
!
provider
.
isExternalFolder
(
key
))
{
actions
[
'Rename'
]
=
()
=>
{
if
(
self
.
files
.
readonly
)
{
return
tooltip
(
'cannot rename file. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
if
(
self
.
files
.
isReadOnly
(
key
)
)
{
return
tooltip
(
'cannot rename file. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
var
name
=
label
.
querySelector
(
'span[data-path="'
+
key
+
'"]'
)
if
(
name
)
editModeOn
(
name
)
}
actions
[
'Delete'
]
=
()
=>
{
if
(
self
.
files
.
readonly
)
{
return
tooltip
(
'cannot delete file. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
if
(
self
.
files
.
isReadOnly
(
key
)
)
{
return
tooltip
(
'cannot delete file. '
+
self
.
files
.
type
+
' is a read only explorer'
)
}
modalDialogCustom
.
confirm
(
'Delete a file'
,
'Are you sure you want to delete this file?'
,
()
=>
{
files
.
remove
(
key
)
},
...
...
src/app/files/fileProvider.js
View file @
483a1ad8
...
...
@@ -71,7 +71,7 @@ class FileProvider {
get
(
path
,
cb
)
{
cb
=
cb
||
function
()
{}
if
(
this
.
normalizedNameExists
[
path
]
)
path
=
this
.
getNormalizedName
(
path
)
// ensure we actually use the normalized path from here
if
(
this
.
normalizedNameExists
(
path
)
)
path
=
this
.
getNormalizedName
(
path
)
// ensure we actually use the normalized path from here
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
exists
=
window
.
remixFileSystem
.
existsSync
(
unprefixedpath
)
if
(
!
exists
)
return
cb
(
null
,
null
)
...
...
src/app/files/remixDProvider.js
View file @
483a1ad8
...
...
@@ -113,10 +113,6 @@ module.exports = class RemixDProvider {
return
true
}
addReadOnly
(
path
,
content
)
{
return
false
}
isReadOnly
(
path
)
{
return
this
.
_readOnlyMode
||
this
.
_readOnlyFiles
[
path
]
===
1
}
...
...
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