peertube-plugin-livechat/conversejs/custom/shared/modals/livechat-external-login.js
John Livingston 003cb24dd8
Updating Converse upstream (with bootstrap5):
* bootstrap 5 compatibility
* other Converse updates integration
* hack to get the sidebar work as with Converse v10.
* modal onHide was renamed close.
* fix slow mode infobox margin.
* fix margin
* shorter action label, for better dropdown UX.
2024-08-06 12:04:28 +02:00

35 lines
940 B
JavaScript

// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
//
// SPDX-License-Identifier: AGPL-3.0-only
import { __ } from 'i18n'
import BaseModal from 'plugins/modal/modal.js'
import { api } from '@converse/headless'
import { html } from 'lit'
import 'livechat-external-login-content.js'
class ExternalLoginModal extends BaseModal {
remotePeertubeError = ''
renderModal () {
return html`<converse-livechat-external-login-content></converse-livechat-external-login-content>`
}
getModalTitle () {
// eslint-disable-next-line no-undef
return __(LOC_login_using_external_account)
}
close () {
super.close()
// kill the externalAuthGetResult handler if still there
try {
if (window.externalAuthGetResult) { window.externalAuthGetResult() }
} catch (err) {
console.error(err)
}
}
}
api.elements.define('converse-livechat-external-login', ExternalLoginModal)