af10633a7d
Avoid native browser alerts Original-merge: 907947c523079451aa09712059de0a60f91516df Merged-by: thornbill <thornbill@users.noreply.github.com> Backported-by: Joshua M. Boniface <joshua@boniface.me>
20 lines
467 B
JavaScript
20 lines
467 B
JavaScript
import { appRouter } from './router/appRouter';
|
|
import dialog from './dialog/dialog';
|
|
import globalize from '../lib/globalize';
|
|
|
|
export default async function (text, title) {
|
|
const options = typeof text === 'string' ? { title, text } : text;
|
|
|
|
await appRouter.ready();
|
|
|
|
options.buttons = [
|
|
{
|
|
name: globalize.translate('ButtonGotIt'),
|
|
id: 'ok',
|
|
type: 'submit'
|
|
}
|
|
];
|
|
|
|
return dialog.show(options);
|
|
}
|