cloudcmd/client/dom/dialog.js
2025-12-31 14:13:10 +02:00

26 lines
576 B
JavaScript

'use strict';
const {tryToCatch} = require('try-to-catch');
const {
alert,
prompt,
confirm,
progress,
} = require('smalltalk');
const title = 'Cloud Commander';
module.exports.alert = (...a) => alert(title, ...a, {
cancel: false,
});
module.exports.prompt = (...a) => tryToCatch(prompt, title, ...a);
module.exports.confirm = (...a) => tryToCatch(confirm, title, ...a);
module.exports.progress = (...a) => progress(title, ...a);
module.exports.alert.noFiles = () => {
return alert(title, 'No files selected!', {
cancel: false,
});
};