2023-05-12 16:39:18 +03:00
|
|
|
/* global APP */
|
2015-03-13 15:01:42 +01:00
|
|
|
|
2016-01-15 16:59:35 +02:00
|
|
|
export default {
|
2015-03-13 15:01:42 +01:00
|
|
|
|
2016-01-15 16:59:35 +02:00
|
|
|
/**
|
|
|
|
|
* Show notification that external auth is required (using provided url).
|
2021-04-22 18:05:14 +03:00
|
|
|
* @param {string} url - URL to use for external auth.
|
|
|
|
|
* @param {function} callback - callback to invoke when auth popup is closed.
|
2016-01-15 16:59:35 +02:00
|
|
|
* @returns auth dialog
|
|
|
|
|
*/
|
2023-05-12 16:39:18 +03:00
|
|
|
showExternalAuthDialog(url, callback) {
|
2017-10-12 18:02:29 -05:00
|
|
|
const dialog = APP.UI.messageHandler.openCenteredPopup(
|
2015-12-15 14:09:44 +02:00
|
|
|
url, 910, 660,
|
2017-10-12 18:02:29 -05:00
|
|
|
|
2015-12-15 14:09:44 +02:00
|
|
|
// On closed
|
|
|
|
|
callback
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!dialog) {
|
2017-11-03 12:05:03 -07:00
|
|
|
APP.UI.messageHandler.showWarning({
|
|
|
|
|
descriptionKey: 'dialog.popupError',
|
|
|
|
|
titleKey: 'dialog.popupErrorTitle'
|
|
|
|
|
});
|
2015-12-15 14:09:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return dialog;
|
2015-03-13 15:01:42 +01:00
|
|
|
}
|
|
|
|
|
};
|