Custom channel emoticons WIP (#130)

This commit is contained in:
John Livingston
2024-06-06 15:03:12 +02:00
parent 893708d93a
commit a777c7ac8d
12 changed files with 56 additions and 17 deletions

View File

@ -8,7 +8,6 @@ import { registerClientOptionsContext } from '../contexts/peertube'
import { html } from 'lit'
import { customElement, property } from 'lit/decorators.js'
import { consume } from '@lit/context'
import { ifDefined } from 'lit/directives/if-defined.js'
/**
* Special element to upload image files.
@ -40,7 +39,6 @@ export class ImageFileInputElement extends LivechatElement {
public accept: string[] = ['image/jpg', 'image/png', 'image/gif']
protected override render = (): unknown => {
// FIXME: limit file size in the upload field.
return html`
${this.value
? html`<img src=${this.value} @click=${(ev: Event) => {
@ -57,11 +55,6 @@ export class ImageFileInputElement extends LivechatElement {
style=${this.value ? 'visibility: hidden;' : ''}
@change=${async (ev: Event) => this._upload(ev)}
/>
<input
type="hidden"
name=${ifDefined(this.name)}
value=${this.value ?? ''}
/>
`
}