✌️
This commit is contained in:
parent
7602f16727
commit
a62fe67e25
3 changed files with 17 additions and 18 deletions
16
src/web/app/desktop/scripts/dialog.js
Normal file
16
src/web/app/desktop/scripts/dialog.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
const riot = require('riot');
|
||||
|
||||
module.exports = (title, text, buttons, canThrough, onThrough) => {
|
||||
const dialog = document.body.appendChild(document.createElement('mk-dialog'));
|
||||
const controller = riot.observable();
|
||||
riot.mount(dialog, {
|
||||
controller: controller,
|
||||
title: title,
|
||||
text: text,
|
||||
buttons: buttons,
|
||||
canThrough: canThrough,
|
||||
onThrough: onThrough
|
||||
});
|
||||
controller.trigger('open');
|
||||
return controller;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue