Custom channel emoticons WIP (#130)
This commit is contained in:
parent
1b9ecea443
commit
47b580d132
@ -216,6 +216,10 @@ $small-view: 800px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.peertube-livechat-emojis-thead-file {
|
||||
min-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
livechat-dynamic-table-form {
|
||||
|
@ -45,7 +45,8 @@ export class ChannelEmojisElement extends LivechatElement {
|
||||
},
|
||||
url: {
|
||||
colName: ptTr(LOC_LIVECHAT_EMOJIS_FILE),
|
||||
description: ptTr(LOC_LIVECHAT_EMOJIS_FILE_DESC)
|
||||
description: ptTr(LOC_LIVECHAT_EMOJIS_FILE_DESC),
|
||||
headerClassList: ['peertube-livechat-emojis-thead-file']
|
||||
}
|
||||
}
|
||||
const tableSchema: DynamicFormSchema = {
|
||||
|
@ -78,11 +78,14 @@ interface DynamicTableRowData {
|
||||
row: { [key: string]: DynamicTableAcceptedTypes }
|
||||
}
|
||||
|
||||
interface DynamicFormHeaderCellData {
|
||||
colName: TemplateResult | DirectiveResult
|
||||
description: TemplateResult | DirectiveResult
|
||||
headerClassList?: string[]
|
||||
}
|
||||
|
||||
export interface DynamicFormHeader {
|
||||
[key: string]: {
|
||||
colName: TemplateResult | DirectiveResult
|
||||
description: TemplateResult | DirectiveResult
|
||||
}
|
||||
[key: string]: DynamicFormHeaderCellData
|
||||
}
|
||||
export interface DynamicFormSchema { [key: string]: CellDataSchema }
|
||||
|
||||
@ -197,10 +200,15 @@ export class DynamicTableFormElement extends LivechatElement {
|
||||
</thead>`
|
||||
}
|
||||
|
||||
private readonly _renderHeaderCell = (headerCellData: { colName: TemplateResult | DirectiveResult
|
||||
description: TemplateResult | DirectiveResult }): TemplateResult => {
|
||||
private readonly _renderHeaderCell = (headerCellData: DynamicFormHeaderCellData): TemplateResult => {
|
||||
return html`<th scope="col">
|
||||
<div data-toggle="tooltip" data-placement="bottom" data-html="true" title=${headerCellData.description}>
|
||||
<div
|
||||
data-toggle="tooltip"
|
||||
data-placement="bottom"
|
||||
data-html="true"
|
||||
title=${headerCellData.description}
|
||||
class=${headerCellData.headerClassList?.join(' ') ?? ''}
|
||||
>
|
||||
${headerCellData.colName}
|
||||
</div>
|
||||
</th>`
|
||||
|
Loading…
Reference in New Issue
Block a user