1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-14 04:34:04 +00:00

Implement OOP hosttree (#32)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
2023-06-18 21:31:55 +02:00
committed by GitHub
parent 3fe5f09163
commit a1456b3987
33 changed files with 624 additions and 593 deletions

View File

@ -0,0 +1,20 @@
function newDialog(dialogComponent, data = {}) {
const outlet = document.createElement('div');
outlet.className = 'dialogoutlet';
document.getElementById('dialogoutlets').appendChild(outlet);
const instance = new dialogComponent({ target: outlet, props: data });
instance.$close = function() {
instance.$destroy();
outlet.remove();
};
instance.$on('close', instance.$close);
return instance;
}
const dialogs = { new: newDialog };
export default dialogs;