Use the gui.confirm dialog and not the native confirm function.

This commit is contained in:
sixteenmillimeter 2020-02-21 16:58:35 -05:00
parent d70de98256
commit e25a8bbc7c
3 changed files with 42 additions and 38 deletions

View File

@ -164,6 +164,7 @@ class FilmOut {
});
}
useFile() {
return __awaiter(this, void 0, void 0, function* () {
const elem = $('#digital');
const filePath = elem.attr('data-file');
const fileName = elem.val();
@ -173,7 +174,7 @@ class FilmOut {
fileName
};
if (filePath && filePath !== '') {
proceed = confirm(`Are you sure you want to use ${fileName}?`);
proceed = yield gui.confirm(`Are you sure you want to use ${fileName}?`);
}
else {
this.selectFile();
@ -188,6 +189,7 @@ class FilmOut {
$('#digital').removeClass('active');
}
//cancel video
});
}
//callback after
onFilmout(evt, args) {
@ -240,15 +242,17 @@ class FilmOut {
elem.addClass('on');
}
preExport() {
return __awaiter(this, void 0, void 0, function* () {
let proceed = false;
if (this.state.path && this.state.path !== '') {
proceed = confirm(`Export all frames for ${this.state.name}? This may take a while, but will allow filmout sequences to run faster.`);
proceed = yield gui.confirm(`Export all frames for ${this.state.name}? This may take a while, but will allow filmout sequences to run faster.`);
}
if (proceed) {
gui.overlay(true);
gui.spinner(true, `Exporting frames for ${this.state.name}`);
ipcRenderer.send('pre_export', {});
}
});
}
onPreExport(evt, args) {
log.info('onPreExport');

File diff suppressed because one or more lines are too long

View File

@ -167,7 +167,7 @@ class FilmOut {
this.useFile();
}
}
useFile () {
async useFile () {
const elem : any = $('#digital');
const filePath : string = elem.attr('data-file');
const fileName : string = elem.val();
@ -178,7 +178,7 @@ class FilmOut {
};
if (filePath && filePath !== '') {
proceed = confirm(`Are you sure you want to use ${fileName}?`);
proceed = await gui.confirm(`Are you sure you want to use ${fileName}?`);
} else {
this.selectFile();
}
@ -249,11 +249,11 @@ class FilmOut {
elem[0].style.backgroundImage = `url('${args.path}')`;
elem.addClass('on');
}
preExport () {
async preExport () {
let proceed = false;
if (this.state.path && this.state.path !== '') {
proceed = confirm(`Export all frames for ${this.state.name}? This may take a while, but will allow filmout sequences to run faster.`);
proceed = await gui.confirm(`Export all frames for ${this.state.name}? This may take a while, but will allow filmout sequences to run faster.`);
}
if (proceed) {