Using ChannelConfigurationElement + Adding TranslationDirective

and a lots of fixes
This commit is contained in:
Mehdi Benadel
2024-05-13 16:40:36 +02:00
parent 0fe9fb4dca
commit 9ea26dfd26
11 changed files with 420 additions and 117 deletions

View File

@ -4,8 +4,8 @@
import type { RegisterClientOptions } from '@peertube/peertube-types/client'
import { renderConfigurationHome } from './templates/home'
import { renderConfigurationChannel } from './templates/channel'
import { render } from 'lit'
import './templates/ChannelConfigurationElement'
import { html, render } from 'lit'
/**
* Registers stuff related to the user's configuration pages.
@ -29,7 +29,7 @@ async function registerConfiguration (clientOptions: RegisterClientOptions): Pro
onMount: async ({ rootEl }) => {
const urlParams = new URLSearchParams(window.location.search)
const channelId = urlParams.get('channelId') ?? ''
render(await renderConfigurationChannel(clientOptions, channelId, rootEl), rootEl)
render(html`<channel-configuration .registerClientOptions=${clientOptions}></channel-configuration>`, rootEl)
}
})