Merge branch 'main' into develop
This commit is contained in:
commit
d01d13a69e
@ -11,6 +11,12 @@
|
||||
|
||||
* Fix spanish translation.
|
||||
|
||||
## v5.0.2
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix some cases where the chat immediatly close (Peertube events are not fired in the good order).
|
||||
|
||||
## v5.0.1
|
||||
|
||||
### Breaking changes
|
||||
|
@ -5,6 +5,15 @@ async function register ({ peertubeHelpers, registerHook, registerVideoField }:
|
||||
handler: () => {
|
||||
const container = document.querySelector('#peertube-plugin-livechat-container')
|
||||
if (container) {
|
||||
const url = container.getAttribute('peertube-plugin-livechat-current-url')
|
||||
if (url && url === window.location.href) {
|
||||
console.warn(
|
||||
'[peertube-plugin-livechat navigation-end] ' +
|
||||
'It seems that action:router.navigation-end was called after action:video-watch.video.loaded. ' +
|
||||
'No removing the chat from the DOM.'
|
||||
)
|
||||
return
|
||||
}
|
||||
container.remove()
|
||||
}
|
||||
}
|
||||
|
@ -289,6 +289,7 @@ function register ({ registerHook, peertubeHelpers }: RegisterOptions): void {
|
||||
container = document.createElement('div')
|
||||
container.setAttribute('id', 'peertube-plugin-livechat-container')
|
||||
container.setAttribute('peertube-plugin-livechat-state', 'initializing')
|
||||
container.setAttribute('peertube-plugin-livechat-current-url', window.location.href)
|
||||
placeholder.append(container)
|
||||
|
||||
peertubeHelpers.getSettings().then((s: any) => {
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-livechat",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "peertube-plugin-livechat",
|
||||
"description": "PeerTube plugin livechat: offers a way to embed a chat system into Peertube.",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.2",
|
||||
"author": {
|
||||
"name": "John Livingston",
|
||||
"url": "https://github.com/JohnXLivingston"
|
||||
|
Loading…
x
Reference in New Issue
Block a user