diff --git a/client/@types/global.d.ts b/client/@types/global.d.ts index a9e9dd58..97b336ee 100644 --- a/client/@types/global.d.ts +++ b/client/@types/global.d.ts @@ -88,3 +88,5 @@ declare const LOC_INVALID_VALUE_NOT_IN_RANGE: string declare const LOC_CHATROOM_NOT_ACCESSIBLE: string declare const LOC_PROMOTE: string + +declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_EMOJIS_TITLE: string diff --git a/client/common/configuration/elements/channel-emojis.ts b/client/common/configuration/elements/channel-emojis.ts index 917bf935..012586d2 100644 --- a/client/common/configuration/elements/channel-emojis.ts +++ b/client/common/configuration/elements/channel-emojis.ts @@ -3,15 +3,16 @@ // SPDX-License-Identifier: AGPL-3.0-only import type { RegisterClientOptions } from '@peertube/peertube-types/client' +import type { ChannelEmojisConfiguration } from 'shared/lib/types' import { LivechatElement } from '../../lib/elements/livechat' import { registerClientOptionsContext } from '../../lib/contexts/peertube' import { ChannelDetailsService } from '../services/channel-details' import { channelDetailsServiceContext } from '../contexts/channel' -import { ChannelEmojis } from 'shared/lib/types' -// import { ptTr } from '../../lib/directives/translation' +import { ptTr } from '../../lib/directives/translation' import { Task } from '@lit/task' import { customElement, property } from 'lit/decorators.js' import { provide } from '@lit/context' +import { html } from 'lit' /** * Channel emojis configuration page. @@ -25,15 +26,37 @@ export class ChannelEmojisElement extends LivechatElement { @property({ attribute: false }) public channelId?: number - private _channelEmojis?: ChannelEmojis + private _channelEmojisConfiguration?: ChannelEmojisConfiguration @provide({ context: channelDetailsServiceContext }) private _channelDetailsService?: ChannelDetailsService - protected override render = (): void => { + protected override render = (): unknown => { return this._asyncTaskRender.render({ pending: () => {}, - complete: () => {}, + complete: () => html` +