2022-06-16 19:53:33 +02:00
|
|
|
import appContext from "../services/app_context.js";
|
|
|
|
|
|
|
|
async function info(message) {
|
|
|
|
return new Promise(res =>
|
|
|
|
appContext.triggerCommand("showInfoDialog", {message, callback: res}));
|
|
|
|
}
|
|
|
|
|
2022-06-16 20:19:26 +02:00
|
|
|
async function confirm(message) {
|
|
|
|
return new Promise(res =>
|
|
|
|
appContext.triggerCommand("showConfirmDialog", {message, callback: res}));
|
|
|
|
}
|
|
|
|
|
2022-06-16 21:13:09 +02:00
|
|
|
async function prompt(props) {
|
|
|
|
return new Promise(res =>
|
|
|
|
appContext.triggerCommand("showPromptDialog", {...props, callback: res}));
|
|
|
|
}
|
|
|
|
|
2022-06-16 19:53:33 +02:00
|
|
|
export default {
|
2022-06-16 20:19:26 +02:00
|
|
|
info,
|
2022-06-16 21:13:09 +02:00
|
|
|
confirm,
|
|
|
|
prompt
|
2022-06-16 19:53:33 +02:00
|
|
|
};
|