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
71fbf28e
Commit
71fbf28e
authored
Jan 28, 2021
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fix
parent
65d17222
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
file-explorer.tsx
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
+6
-6
No files found.
libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
View file @
71fbf28e
...
...
@@ -25,7 +25,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
focusPath
:
null
,
files
:
[],
fileManager
:
null
,
accessToken
:
null
,
ctrlKey
:
false
,
newFileName
:
''
,
actions
:
[],
...
...
@@ -73,8 +72,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
useEffect
(()
=>
{
(
async
()
=>
{
const
fileManager
=
registry
.
get
(
'filemanager'
).
api
const
config
=
registry
.
get
(
'config'
).
api
const
accessToken
=
config
.
get
(
'settings/gist-access-token'
)
const
files
=
await
fetchDirectoryContent
(
name
)
const
actions
=
[{
id
:
'newFile'
,
...
...
@@ -121,7 +118,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
}]
setState
(
prevState
=>
{
return
{
...
prevState
,
fileManager
,
accessToken
,
files
,
actions
}
return
{
...
prevState
,
fileManager
,
files
,
actions
}
})
})()
},
[])
...
...
@@ -605,7 +602,10 @@ export const FileExplorer = (props: FileExplorerProps) => {
},
null
)
}
else
{
// check for token
if
(
!
state
.
accessToken
)
{
const
config
=
registry
.
get
(
'config'
).
api
const
accessToken
=
config
.
get
(
'settings/gist-access-token'
)
if
(
!
accessToken
)
{
modal
(
'Authorize Token'
,
'Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.'
,
{
label
:
'Close'
,
fn
:
async
()
=>
{}
...
...
@@ -613,7 +613,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
}
else
{
const
description
=
'Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime.
\
n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version='
+
queryParams
.
get
().
version
+
'&optimize='
+
queryParams
.
get
().
optimize
+
'&runs='
+
queryParams
.
get
().
runs
+
'&gist='
const
gists
=
new
Gists
({
token
:
state
.
accessToken
})
const
gists
=
new
Gists
({
token
:
accessToken
})
if
(
id
)
{
const
originalFileList
=
await
getOriginalFiles
(
id
)
...
...
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