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
554609b6
Commit
554609b6
authored
Feb 12, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gist deploy
parent
f385ce9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
file-panel.js
src/app/panels/file-panel.js
+18
-8
No files found.
src/app/panels/file-panel.js
View file @
554609b6
...
@@ -269,6 +269,8 @@ function filepanel (appAPI, filesProvider) {
...
@@ -269,6 +269,8 @@ function filepanel (appAPI, filesProvider) {
modalDialogCustom
.
confirm
(
null
,
`Created a gist at
${
data
.
html_url
}
. Would you like to open it in a new window?`
,
()
=>
{
modalDialogCustom
.
confirm
(
null
,
`Created a gist at
${
data
.
html_url
}
. Would you like to open it in a new window?`
,
()
=>
{
window
.
open
(
data
.
html_url
,
'_blank'
)
window
.
open
(
data
.
html_url
,
'_blank'
)
})
})
}
else
{
modalDialogCustom
.
alert
(
data
.
message
+
' '
+
data
.
documentation_url
)
}
}
}
}
}
}
...
@@ -322,15 +324,23 @@ function filepanel (appAPI, filesProvider) {
...
@@ -322,15 +324,23 @@ function filepanel (appAPI, filesProvider) {
}
}
// return all the files, except the temporary/readonly ones..
// return all the files, except the temporary/readonly ones..
function
packageFiles
(
files
,
callback
)
{
function
packageFiles
(
files
Provider
,
callback
)
{
var
ret
=
{}
var
ret
=
{}
// @TODO remove use of `list()`
filesProvider
.
resolveDirectory
(
'browser'
,
(
error
,
files
)
=>
{
var
filtered
=
Object
.
keys
(
files
.
list
()).
filter
(
function
(
path
)
{
if
(
!
files
.
isReadOnly
(
path
))
{
return
path
}
})
if
(
error
)
callback
(
error
)
async
.
eachSeries
(
filtered
,
function
(
path
,
cb
)
{
else
{
ret
[
path
.
replace
(
files
.
type
+
'/'
,
''
)]
=
{
content
:
files
.
get
(
path
)
}
async
.
eachSeries
(
Object
.
keys
(
files
),
(
path
,
cb
)
=>
{
cb
()
filesProvider
.
get
(
path
,
(
error
,
content
)
=>
{
},
()
=>
{
if
(
error
)
cb
(
error
)
callback
(
null
,
ret
)
else
{
ret
[
path
]
=
{
content
}
cb
()
}
})
},
(
error
)
=>
{
callback
(
error
,
ret
)
})
}
})
})
}
}
...
...
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