Use the gui.confirm dialog and not the native confirm function.
This commit is contained in:
parent
d70de98256
commit
e25a8bbc7c
|
@ -164,30 +164,32 @@ class FilmOut {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
useFile() {
|
useFile() {
|
||||||
const elem = $('#digital');
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const filePath = elem.attr('data-file');
|
const elem = $('#digital');
|
||||||
const fileName = elem.val();
|
const filePath = elem.attr('data-file');
|
||||||
let proceed = false;
|
const fileName = elem.val();
|
||||||
let obj = {
|
let proceed = false;
|
||||||
path: filePath,
|
let obj = {
|
||||||
fileName
|
path: filePath,
|
||||||
};
|
fileName
|
||||||
if (filePath && filePath !== '') {
|
};
|
||||||
proceed = confirm(`Are you sure you want to use ${fileName}?`);
|
if (filePath && filePath !== '') {
|
||||||
}
|
proceed = yield gui.confirm(`Are you sure you want to use ${fileName}?`);
|
||||||
else {
|
}
|
||||||
this.selectFile();
|
else {
|
||||||
}
|
this.selectFile();
|
||||||
if (proceed) {
|
}
|
||||||
gui.overlay(true);
|
if (proceed) {
|
||||||
gui.spinner(true, `Getting info about ${fileName}`);
|
gui.overlay(true);
|
||||||
ipcRenderer.send('filmout', obj);
|
gui.spinner(true, `Getting info about ${fileName}`);
|
||||||
}
|
ipcRenderer.send('filmout', obj);
|
||||||
else {
|
}
|
||||||
$('#projector_type_digital').prop('checked', 'checked');
|
else {
|
||||||
$('#digital').removeClass('active');
|
$('#projector_type_digital').prop('checked', 'checked');
|
||||||
}
|
$('#digital').removeClass('active');
|
||||||
//cancel video
|
}
|
||||||
|
//cancel video
|
||||||
|
});
|
||||||
}
|
}
|
||||||
//callback after
|
//callback after
|
||||||
onFilmout(evt, args) {
|
onFilmout(evt, args) {
|
||||||
|
@ -240,15 +242,17 @@ class FilmOut {
|
||||||
elem.addClass('on');
|
elem.addClass('on');
|
||||||
}
|
}
|
||||||
preExport() {
|
preExport() {
|
||||||
let proceed = false;
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (this.state.path && this.state.path !== '') {
|
let proceed = false;
|
||||||
proceed = confirm(`Export all frames for ${this.state.name}? This may take a while, but will allow filmout sequences to run faster.`);
|
if (this.state.path && this.state.path !== '') {
|
||||||
}
|
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);
|
if (proceed) {
|
||||||
gui.spinner(true, `Exporting frames for ${this.state.name}`);
|
gui.overlay(true);
|
||||||
ipcRenderer.send('pre_export', {});
|
gui.spinner(true, `Exporting frames for ${this.state.name}`);
|
||||||
}
|
ipcRenderer.send('pre_export', {});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
onPreExport(evt, args) {
|
onPreExport(evt, args) {
|
||||||
log.info('onPreExport');
|
log.info('onPreExport');
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -167,7 +167,7 @@ class FilmOut {
|
||||||
this.useFile();
|
this.useFile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
useFile () {
|
async useFile () {
|
||||||
const elem : any = $('#digital');
|
const elem : any = $('#digital');
|
||||||
const filePath : string = elem.attr('data-file');
|
const filePath : string = elem.attr('data-file');
|
||||||
const fileName : string = elem.val();
|
const fileName : string = elem.val();
|
||||||
|
@ -178,7 +178,7 @@ class FilmOut {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (filePath && filePath !== '') {
|
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 {
|
} else {
|
||||||
this.selectFile();
|
this.selectFile();
|
||||||
}
|
}
|
||||||
|
@ -249,11 +249,11 @@ class FilmOut {
|
||||||
elem[0].style.backgroundImage = `url('${args.path}')`;
|
elem[0].style.backgroundImage = `url('${args.path}')`;
|
||||||
elem.addClass('on');
|
elem.addClass('on');
|
||||||
}
|
}
|
||||||
preExport () {
|
async preExport () {
|
||||||
let proceed = false;
|
let proceed = false;
|
||||||
|
|
||||||
if (this.state.path && this.state.path !== '') {
|
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) {
|
if (proceed) {
|
||||||
|
|
Loading…
Reference in New Issue