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
cf19a8bb
Commit
cf19a8bb
authored
Sep 23, 2019
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixes import with github, http,reslver-engine
- fixes tooltip for publish to gist - add readonly mode(is not finished yet)
parent
c0e45c89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
file-explorer.js
src/app/files/file-explorer.js
+1
-1
fileProvider.js
src/app/files/fileProvider.js
+28
-0
landing-page.js
src/app/ui/landing-page/landing-page.js
+2
-4
No files found.
src/app/files/file-explorer.js
View file @
cf19a8bb
...
@@ -350,7 +350,7 @@ fileExplorer.prototype.init = function () {
...
@@ -350,7 +350,7 @@ fileExplorer.prototype.init = function () {
fileExplorer
.
prototype
.
publishToGist
=
function
()
{
fileExplorer
.
prototype
.
publishToGist
=
function
()
{
modalDialogCustom
.
confirm
(
modalDialogCustom
.
confirm
(
'Create a public gist'
,
'Create a public gist'
,
'Are you sure you want to publish all your files anonymously as a public gist on github.com?'
,
'Are you sure you want to publish all your files
in browser directory
anonymously as a public gist on github.com?'
,
()
=>
{
this
.
toGist
()
}
()
=>
{
this
.
toGist
()
}
)
)
}
}
...
...
src/app/files/fileProvider.js
View file @
cf19a8bb
...
@@ -6,6 +6,11 @@ class FileProvider {
...
@@ -6,6 +6,11 @@ class FileProvider {
constructor
(
name
)
{
constructor
(
name
)
{
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
this
.
type
=
name
this
.
type
=
name
<<<<<<<
HEAD
=======
this
.
normalizedNames
=
{}
// contains the raw url associated with the displayed path
this
.
readonlyItems
=
[
'browser'
]
>>>>>>>
2
fe4db91
...
-
fixes
import
with
github
,
http
,
reslver
-
engine
}
}
exists
(
path
,
cb
)
{
exists
(
path
,
cb
)
{
...
@@ -23,6 +28,10 @@ class FileProvider {
...
@@ -23,6 +28,10 @@ class FileProvider {
get
(
path
,
cb
)
{
get
(
path
,
cb
)
{
cb
=
cb
||
function
()
{}
cb
=
cb
||
function
()
{}
<<<<<<<
HEAD
=======
if
(
this
.
normalizedNames
[
path
])
path
=
this
.
normalizedNames
[
path
]
// ensure we actually use the normalized path from here
>>>>>>>
2
fe4db91
...
-
fixes
import
with
github
,
http
,
reslver
-
engine
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
exists
=
window
.
remixFileSystem
.
existsSync
(
unprefixedpath
)
var
exists
=
window
.
remixFileSystem
.
existsSync
(
unprefixedpath
)
if
(
!
exists
)
return
cb
(
null
,
null
)
if
(
!
exists
)
return
cb
(
null
,
null
)
...
@@ -63,15 +72,34 @@ class FileProvider {
...
@@ -63,15 +72,34 @@ class FileProvider {
return
true
return
true
}
}
<<<<<<<
HEAD
addReadOnly
(
path
,
content
)
{
addReadOnly
(
path
,
content
)
{
=======
addReadOnly
(
path
,
content
,
url
)
{
this
.
readonlyItems
.
push
(
path
)
if
(
url
!==
undefined
)
this
.
normalizedNames
[
url
]
=
path
>>>>>>>
2
fe4db91
...
-
fixes
import
with
github
,
http
,
reslver
-
engine
return
this
.
set
(
path
,
content
)
return
this
.
set
(
path
,
content
)
}
}
isReadOnly
(
path
)
{
isReadOnly
(
path
)
{
<<<<<<<
HEAD
return
false
return
false
}
}
remove
(
path
)
{
remove
(
path
)
{
=======
return
!
this
.
readonlyItems
.
includes
(
path
)
}
remove
(
path
)
{
// remove from readonly list
const
indexToRemove
=
this
.
readonlyItems
.
indexOf
(
path
)
if
(
indexToRemove
!==
-
1
)
{
this
.
readonlyItems
.
splice
(
indexToRemove
,
1
)
}
>>>>>>>
2
fe4db91
...
-
fixes
import
with
github
,
http
,
reslver
-
engine
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
unprefixedpath
=
this
.
removePrefix
(
path
)
if
(
!
this
.
_exists
(
unprefixedpath
))
{
if
(
!
this
.
_exists
(
unprefixedpath
))
{
return
false
return
false
...
...
src/app/ui/landing-page/landing-page.js
View file @
cf19a8bb
...
@@ -110,10 +110,8 @@ export class LandingPage extends ViewPlugin {
...
@@ -110,10 +110,8 @@ export class LandingPage extends ViewPlugin {
if
(
error
)
{
if
(
error
)
{
modalDialogCustom
.
alert
(
error
)
modalDialogCustom
.
alert
(
error
)
}
else
{
}
else
{
if
(
fileProviders
[
type
])
{
fileProviders
[
'browser'
].
addReadOnly
(
type
+
'/'
+
cleanUrl
,
content
,
url
)
fileProviders
[
type
].
addReadOnly
(
cleanUrl
,
content
,
url
)
globalRegistry
.
get
(
'verticalicon'
).
api
.
select
(
'fileExplorers'
)
globalRegistry
.
get
(
'verticalicon'
).
api
.
select
(
'fileExplorers'
)
}
}
}
}
}
)
)
...
...
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