mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-11-28 08:50:22 +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>Enter the GitHub repository URL:</p>
|
||||||
<p><input id="importGithubURL" size="60" placeholder="https://github.com/user/repo"></input></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>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>
|
<p><button type="button" class="btn btn-primary" id="importGithubButton">Import Project</button></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -77,9 +77,11 @@ var TOOL_TO_SOURCE_STYLE = {
|
|||||||
|
|
||||||
function alertError(s:string) {
|
function alertError(s:string) {
|
||||||
if (ga) ga('send', 'event', 'error', 'error', s);
|
if (ga) ga('send', 'event', 'error', 'error', s);
|
||||||
|
setWaitDialog(false);
|
||||||
bootbox.alert(s);
|
bootbox.alert(s);
|
||||||
}
|
}
|
||||||
function alertInfo(s:string) {
|
function alertInfo(s:string) {
|
||||||
|
setWaitDialog(false);
|
||||||
bootbox.alert(s);
|
bootbox.alert(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,11 +520,15 @@ function _pushProjectToGithub(e) {
|
|||||||
function _pullProjectFromGithub(e) {
|
function _pullProjectFromGithub(e) {
|
||||||
var ghurl = getBoundGithubURL();
|
var ghurl = getBoundGithubURL();
|
||||||
if (!ghurl) return;
|
if (!ghurl) return;
|
||||||
|
bootbox.confirm("Pull from repository and replace all local files?", (ok) => {
|
||||||
|
if (ok) {
|
||||||
setWaitDialog(true);
|
setWaitDialog(true);
|
||||||
getGithubService().pull(ghurl).then( (sess:GHSession) => {
|
getGithubService().pull(ghurl).then( (sess:GHSession) => {
|
||||||
setWaitDialog(false);
|
setWaitDialog(false);
|
||||||
projectWindows.updateAllOpenWindows(store);
|
projectWindows.updateAllOpenWindows(store);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmCommit(sess) : Promise<GHSession> {
|
function confirmCommit(sess) : Promise<GHSession> {
|
||||||
|
Loading…
Reference in New Issue
Block a user