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
fa131f92
Commit
fa131f92
authored
Jan 27, 2021
by
lianahus
Committed by
yann300
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add warning to reload the page
parent
b1ca8d7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
settings-tab.js
apps/remix-ide/src/app/tabs/settings-tab.js
+16
-2
No files found.
apps/remix-ide/src/app/tabs/settings-tab.js
View file @
fa131f92
...
...
@@ -77,10 +77,24 @@ module.exports = class SettingsTab extends ViewPlugin {
const
gistAccessToken
=
yo
`<input id="gistaccesstoken" data-id="settingsTabGistAccessToken" type="password" class="form-control">`
if
(
token
)
gistAccessToken
.
value
=
token
const
removeToken
=
()
=>
{
self
.
config
.
set
(
'settings/gist-access-token'
,
''
);
gistAccessToken
.
value
=
''
;
tooltip
(
'Access token removed'
)
}
const
saveToken
=
()
=>
{
this
.
config
.
set
(
'settings/gist-access-token'
,
gistAccessToken
.
value
);
tooltip
(
'Access token saved'
)
}
const
saveToken
=
()
=>
{
this
.
config
.
set
(
'settings/gist-access-token'
,
gistAccessToken
.
value
)
tooltip
(
'Access token has been saved. RELOAD the page to apply it.'
)
}
const
gistAddToken
=
yo
`<input class="btn btn-sm btn-primary ml-2" id="savegisttoken" data-id="settingsTabSaveGistToken" onclick=
${()
=>
saveToken
()}
value="Save" type="button">`
const
gistRemoveToken
=
yo
`<button class="btn btn-sm btn-secondary ml-2" id="removegisttoken" data-id="settingsTabRemoveGistToken" title="Delete Github access token" onclick=
${()
=>
removeToken
()}
>Remove</button>`
this
.
_view
.
gistToken
=
yo
`<div class="text-secondary mb-0 h6">
${
gistAccessToken
}
<div class="d-flex justify-content-end pt-2">
${
copyToClipboard
(()
=>
gistAccessToken
.
value
)}${
gistAddToken
}${
gistRemoveToken
}
</div></div>`
this
.
_view
.
gistToken
=
yo
`
<div class="text-secondary mb-0 h6">
${
gistAccessToken
}
<div class="d-flex justify-content-end pt-2">
${
copyToClipboard
(()
=>
gistAccessToken
.
value
)}${
gistAddToken
}${
gistRemoveToken
}
</div>
<p class="pt-1">
<i class="
${
css
.
icon
}
fas fa-exclamation-triangle text-warning" aria-hidden="true"></i>
<span class="text-warning">PAGE RELOAD REQUIRED AFTER SAVING A NEW TOKEN: (this step is temprorary, will be fixed soon)</span>
</p>
</div>
`
this
.
_view
.
optionVM
=
yo
`<input onchange=
${
onchangeOption
}
class="custom-control-input" id="alwaysUseVM" data-id="settingsTabAlwaysUseVM" type="checkbox">`
this
.
_view
.
optionVMLabel
=
yo
`<label class="form-check-label custom-control-label align-middle" for="alwaysUseVM">Always use Ethereum VM at Load</label>`
if
(
this
.
config
.
get
(
'settings/always-use-vm'
)
===
undefined
)
this
.
config
.
set
(
'settings/always-use-vm'
,
true
)
...
...
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