Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes before release v10.1.0 #409

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/common/configuration/elements/channel-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export class ChannelConfigurationElement extends LivechatElement {

@provide({ context: channelConfigurationContext })
@state()
public _channelConfiguration?: ChannelConfiguration
private _channelConfiguration?: ChannelConfiguration

@provide({ context: channelDetailsServiceContext })
private _channelDetailsService?: ChannelDetailsService

@state()
public _validationError?: ValidationError
private _validationError?: ValidationError

private readonly _asyncTaskRender = new Task(this, {
task: async ([registerClientOptions]) => {
Expand Down
5 changes: 1 addition & 4 deletions client/common/configuration/elements/channel-home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ export class ChannelHomeElement extends LivechatElement {
public registerClientOptions?: RegisterClientOptions

@state()
public _channels?: ChannelLiveChatInfos[]
private _channels?: ChannelLiveChatInfos[]

@provide({ context: channelDetailsServiceContext })
private _channelDetailsService?: ChannelDetailsService

@state()
public _formStatus: boolean | any = undefined

private readonly _asyncTaskRender = new Task(this, {
task: async ([registerClientOptions]) => {
// Getting the current username in localStorage. Don't know any cleaner way to do.
Expand Down
3 changes: 2 additions & 1 deletion client/common/configuration/elements/channel-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import { consume } from '@lit/context'

@customElement('livechat-channel-tabs')
export class ChannelHomeElement extends LivechatElement {
// eslint-disable-next-line @typescript-eslint/prefer-readonly
@consume({ context: registerClientOptionsContext, subscribe: true })
public registerClientOptions?: RegisterClientOptions
private _registerClientOptions?: RegisterClientOptions

@property({ attribute: false })
public channelId?: number
Expand Down
2 changes: 1 addition & 1 deletion client/common/configuration/services/channel-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ValidationError, ValidationErrorType } from '../../lib/models/validatio
import { getBaseRoute } from '../../../utils/uri'

export class ChannelDetailsService {
public _registerClientOptions: RegisterClientOptions
private readonly _registerClientOptions: RegisterClientOptions

private readonly _headers: any = {}

Expand Down
4 changes: 2 additions & 2 deletions client/common/lib/elements/dynamic-table-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class DynamicTableFormElement extends LivechatElement {
public rows: Array<{ [key: string]: DynamicTableAcceptedTypes }> = []

@state()
public _rowsById: DynamicTableRowData[] = []
private _rowsById: DynamicTableRowData[] = []

@property({ attribute: false })
public formName: string = ''
Expand All @@ -120,7 +120,7 @@ export class DynamicTableFormElement extends LivechatElement {
private _lastRowId = 1

@property({ attribute: false })
private columnOrder: string[] = []
public columnOrder: string[] = []

// fixes situations when list has been reinitialized or changed outside of CustomElement
private readonly _updateLastRowId = (): void => {
Expand Down
5 changes: 3 additions & 2 deletions client/common/lib/elements/help-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ import { LivechatElement } from './livechat'

@customElement('livechat-help-button')
export class HelpButtonElement extends LivechatElement {
// eslint-disable-next-line @typescript-eslint/prefer-readonly
@consume({ context: registerClientOptionsContext, subscribe: true })
public registerClientOptions?: RegisterClientOptions
private _registerClientOptions?: RegisterClientOptions

@property({ attribute: false })
public buttonTitle: string | DirectiveResult = ptTr(LOC_ONLINE_HELP)
Expand All @@ -35,7 +36,7 @@ export class HelpButtonElement extends LivechatElement {
? await localizedHelpUrl(registerClientOptions, { page: this.page })
: '')
},
args: () => [this.registerClientOptions]
args: () => [this._registerClientOptions]
})

protected override render = (): unknown => {
Expand Down
7 changes: 4 additions & 3 deletions client/common/lib/elements/image-file-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import { consume } from '@lit/context'
*/
@customElement('livechat-image-file-input')
export class ImageFileInputElement extends LivechatElement {
// eslint-disable-next-line @typescript-eslint/prefer-readonly
@consume({ context: registerClientOptionsContext, subscribe: true })
public registerClientOptions?: RegisterClientOptions
private _registerClientOptions?: RegisterClientOptions

@property({ attribute: false })
public name?: string
Expand Down Expand Up @@ -68,11 +69,11 @@ export class ImageFileInputElement extends LivechatElement {
}

if (this.maxSize && file.size > this.maxSize) {
let msg = await this.registerClientOptions?.peertubeHelpers.translate(LOC_INVALID_VALUE_FILE_TOO_BIG)
let msg = await this._registerClientOptions?.peertubeHelpers.translate(LOC_INVALID_VALUE_FILE_TOO_BIG)
if (msg) {
// FIXME: better unit handling (here we force kb)
msg = msg.replace('%s', Math.round(this.maxSize / 1024).toString() + 'k')
this.registerClientOptions?.peertubeHelpers.notifier.error(msg)
this._registerClientOptions?.peertubeHelpers.notifier.error(msg)
}
return
}
Expand Down
Loading