Refactoring.
This commit is contained in:
parent
a4a9f85956
commit
268c60d699
@ -473,6 +473,6 @@ livechat-image-file-input {
|
||||
}
|
||||
}
|
||||
|
||||
livechat-configuration-row {
|
||||
livechat-configuration-section-header {
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
@ -251,11 +251,11 @@ export class ChannelConfigurationElement extends LivechatElement {
|
||||
</p>
|
||||
|
||||
<form livechat-configuration-channel-options role="form" @submit=${this._saveConfig}>
|
||||
<livechat-configuration-row
|
||||
<livechat-configuration-section-header
|
||||
.title=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_SLOW_MODE_LABEL)}
|
||||
.description=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_SLOW_MODE_DESC, true)}
|
||||
.helpPage=${'documentation/user/streamers/slow_mode'}>
|
||||
</livechat-configuration-row>
|
||||
</livechat-configuration-section-header>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_SLOW_MODE_LABEL)}
|
||||
@ -281,11 +281,11 @@ export class ChannelConfigurationElement extends LivechatElement {
|
||||
${this._renderFeedback('peertube-livechat-slowmode-duration-feedback', 'slowMode.duration')}
|
||||
</div>
|
||||
|
||||
<livechat-configuration-row
|
||||
<livechat-configuration-section-header
|
||||
.title=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_BOT_OPTIONS_TITLE)}
|
||||
.description=${''}
|
||||
.helpPage=${'documentation/user/streamers/channel'}>
|
||||
</livechat-configuration-row>
|
||||
</livechat-configuration-section-header>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input
|
||||
@ -332,11 +332,11 @@ export class ChannelConfigurationElement extends LivechatElement {
|
||||
${this._renderFeedback('peertube-livechat-bot-nickname-feedback', 'bot.nickname')}
|
||||
</div>
|
||||
|
||||
<livechat-configuration-row
|
||||
<livechat-configuration-section-header
|
||||
.title=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_LABEL)}
|
||||
.description=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_DESC)}
|
||||
.helpPage=${'documentation/user/streamers/bot/forbidden_words'}>
|
||||
</livechat-configuration-row>
|
||||
</livechat-configuration-section-header>
|
||||
<livechat-dynamic-table-form
|
||||
.header=${tableHeaderList.forbiddenWords}
|
||||
.schema=${tableSchema.forbiddenWords}
|
||||
@ -353,11 +353,11 @@ export class ChannelConfigurationElement extends LivechatElement {
|
||||
.formName=${'forbidden-words'}
|
||||
></livechat-dynamic-table-form>
|
||||
|
||||
<livechat-configuration-row
|
||||
<livechat-configuration-section-header
|
||||
.title=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_QUOTE_LABEL)}
|
||||
.description=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_QUOTE_DESC)}
|
||||
.helpPage=${'documentation/user/streamers/bot/quotes'}>
|
||||
</livechat-configuration-row>
|
||||
</livechat-configuration-section-header>
|
||||
<livechat-dynamic-table-form
|
||||
.header=${tableHeaderList.quotes}
|
||||
.schema=${tableSchema.quotes}
|
||||
@ -374,11 +374,11 @@ export class ChannelConfigurationElement extends LivechatElement {
|
||||
.formName=${'quote'}
|
||||
></livechat-dynamic-table-form>
|
||||
|
||||
<livechat-configuration-row
|
||||
<livechat-configuration-section-header
|
||||
.title=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_COMMAND_LABEL)}
|
||||
.description=${ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_COMMAND_DESC)}
|
||||
.helpPage=${'documentation/user/streamers/bot/commands'}>
|
||||
</livechat-configuration-row>
|
||||
</livechat-configuration-section-header>
|
||||
<livechat-dynamic-table-form
|
||||
.header=${tableHeaderList.commands}
|
||||
.schema=${tableSchema.commands}
|
||||
|
@ -6,7 +6,7 @@ import { html } from 'lit'
|
||||
import { customElement, property } from 'lit/decorators.js'
|
||||
import { LivechatElement } from './livechat'
|
||||
|
||||
@customElement('livechat-configuration-row')
|
||||
@customElement('livechat-configuration-section-header')
|
||||
export class ConfigurationRowElement extends LivechatElement {
|
||||
@property({ attribute: false })
|
||||
public override title: string = 'title'
|
@ -197,6 +197,7 @@ export class DynamicTableFormElement extends LivechatElement {
|
||||
this._updateLastRowId()
|
||||
|
||||
// Filter removed rows
|
||||
// FIXME: seems buggy. Missing assignation?
|
||||
this._rowsById.filter(rowById => this.rows.includes(rowById.row))
|
||||
|
||||
for (let i = 0; i < this.rows.length; i++) {
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Add here all your elements, the main JS file will import them all.
|
||||
import './help-button'
|
||||
import './dynamic-table-form'
|
||||
import './configuration-row'
|
||||
import './configuration-section-header'
|
||||
import './tags-input'
|
||||
import './image-file-input'
|
||||
import './spinner'
|
||||
|
Loading…
x
Reference in New Issue
Block a user