]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/confirm-dialog.js
Removed parallel testing, updated predis
[bookstack] / resources / js / components / confirm-dialog.js
index 858be1b852be7eb23636113720294a8b878dca27..572945d5aba4ae7099a30dc29a28fe58f62d4542 100644 (file)
@@ -1,12 +1,12 @@
 import {onSelect} from "../services/dom";
+import {Component} from "./component";
 
 /**
  * Custom equivalent of window.confirm() using our popup component.
  * Is promise based so can be used like so:
  * `const result = await dialog.show()`
- * @extends {Component}
  */
-class ConfirmDialog {
+export class ConfirmDialog extends Component {
 
     setup() {
         this.container = this.$el;
@@ -34,7 +34,7 @@ class ConfirmDialog {
      * @returns {Popup}
      */
     getPopup() {
-        return this.container.components.popup;
+        return window.$components.firstOnElement(this.container, 'popup');
     }
 
     /**
@@ -47,6 +47,4 @@ class ConfirmDialog {
         }
     }
 
-}
-
-export default ConfirmDialog;
\ No newline at end of file
+}
\ No newline at end of file