mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-20 01:31:51 +00:00
confirmation before github pull
This commit is contained in:
parent
c99a066f99
commit
320e0c02a4
@ -353,6 +353,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
|
||||
<p>Enter the GitHub repository URL:</p>
|
||||
<p><input id="importGithubURL" size="60" placeholder="https://github.com/user/repo"></input></p>
|
||||
<p>If the project is compatible with 8bitworkshop, it should build automatically.</p>
|
||||
<p>Source files must be in the root folder of the repository.</p>
|
||||
<p><button type="button" class="btn btn-primary" id="importGithubButton">Import Project</button></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
14
src/ui.ts
14
src/ui.ts
@ -77,9 +77,11 @@ var TOOL_TO_SOURCE_STYLE = {
|
||||
|
||||
function alertError(s:string) {
|
||||
if (ga) ga('send', 'event', 'error', 'error', s);
|
||||
setWaitDialog(false);
|
||||
bootbox.alert(s);
|
||||
}
|
||||
function alertInfo(s:string) {
|
||||
setWaitDialog(false);
|
||||
bootbox.alert(s);
|
||||
}
|
||||
|
||||
@ -518,10 +520,14 @@ function _pushProjectToGithub(e) {
|
||||
function _pullProjectFromGithub(e) {
|
||||
var ghurl = getBoundGithubURL();
|
||||
if (!ghurl) return;
|
||||
setWaitDialog(true);
|
||||
getGithubService().pull(ghurl).then( (sess:GHSession) => {
|
||||
setWaitDialog(false);
|
||||
projectWindows.updateAllOpenWindows(store);
|
||||
bootbox.confirm("Pull from repository and replace all local files?", (ok) => {
|
||||
if (ok) {
|
||||
setWaitDialog(true);
|
||||
getGithubService().pull(ghurl).then( (sess:GHSession) => {
|
||||
setWaitDialog(false);
|
||||
projectWindows.updateAllOpenWindows(store);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user