mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
26 lines
574 B
JavaScript
26 lines
574 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,
|
|
});
|
|
};
|