Custom channel emoticons WIP (#130)
This commit is contained in:
@ -617,6 +617,9 @@ export class DynamicTableFormElement extends LivechatElement {
|
||||
if (validationErrorTypes.includes(ValidationErrorType.NotInRange)) {
|
||||
errorMessages.push(html`${ptTr(LOC_INVALID_VALUE_NOT_IN_RANGE)}`)
|
||||
}
|
||||
if (validationErrorTypes.includes(ValidationErrorType.Duplicate)) {
|
||||
errorMessages.push(html`${ptTr(LOC_INVALID_VALUE_DUPLICATE)}`)
|
||||
}
|
||||
|
||||
return html`<div id="${inputId}-feedback" class="invalid-feedback">${errorMessages}</div>`
|
||||
} else {
|
||||
|
@ -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 ?? ''}
|
||||
/>
|
||||
`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user