Add style compat with peertube v7
This commit is contained in:
@ -66,15 +66,16 @@ async function registerConfiguration (clientOptions: RegisterClientOptions): Pro
|
||||
for (const link of links) {
|
||||
if (typeof link !== 'object') { continue }
|
||||
if (!('key' in link)) { continue }
|
||||
if (link.key !== 'in-my-library') { continue }
|
||||
myLibraryLinks = link
|
||||
break
|
||||
if (link.key === 'in-my-library' || link.key === 'my-video-space') {
|
||||
myLibraryLinks = link
|
||||
break
|
||||
}
|
||||
}
|
||||
if (!myLibraryLinks) { return links }
|
||||
if (!Array.isArray(myLibraryLinks.links)) { return links }
|
||||
|
||||
const label = await peertubeHelpers.translate(LOC_MENU_CONFIGURATION_LABEL)
|
||||
myLibraryLinks.links.push({
|
||||
myLibraryLinks.links.unshift({
|
||||
label,
|
||||
shortLabel: label,
|
||||
path: '/p/livechat/configuration',
|
||||
|
@ -38,7 +38,7 @@ export class HelpButtonElement extends LivechatElement {
|
||||
href="${this.url.href}"
|
||||
target=_blank
|
||||
title="${this.buttonTitle}"
|
||||
class="orange-button peertube-button-link"
|
||||
class="primary-button orange-button peertube-button-link"
|
||||
>${unsafeHTML(helpButtonSVG())}</a>`
|
||||
})
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ type displayButtonOptions = displayButtonOptionsCallback | displayButtonOptionsH
|
||||
function displayButton (dbo: displayButtonOptions): void {
|
||||
const button = document.createElement('a')
|
||||
button.classList.add(
|
||||
'orange-button', 'peertube-button-link',
|
||||
'primary-button', 'orange-button', 'peertube-button-link',
|
||||
'peertube-plugin-livechat-button',
|
||||
'peertube-plugin-livechat-button-' + dbo.name
|
||||
)
|
||||
|
Reference in New Issue
Block a user