From 83dd3130a1bf7a3b4f2b7bfb3aa4bef253e5c4e7 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 11:14:00 +0200 Subject: [PATCH 01/11] Fix #436: Saving emojis per batch, to avoid hitting max payload limit. --- CHANGELOG.md | 4 ++ .../configuration/elements/channel-emojis.ts | 6 +- .../configuration/services/channel-details.ts | 57 +++++++++++++++++-- server/lib/routers/api/configuration.ts | 11 +++- shared/lib/emojis.ts | 3 + 5 files changed, 74 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73baac7a..568811c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 10.1.1 (Not released yet) + +* #436: Saving emojis per batch, to avoid hitting max payload limit. + ## 10.1.0 ### New features diff --git a/client/common/configuration/elements/channel-emojis.ts b/client/common/configuration/elements/channel-emojis.ts index afb9e566..5848c62e 100644 --- a/client/common/configuration/elements/channel-emojis.ts +++ b/client/common/configuration/elements/channel-emojis.ts @@ -102,9 +102,13 @@ export class ChannelEmojisElement extends LivechatElement { try { this.actionDisabled = true - await this._channelDetailsService.saveEmojisConfiguration(this.channelId, this.channelEmojisConfiguration.emojis) + this.channelEmojisConfiguration = await this._channelDetailsService.saveEmojisConfiguration( + this.channelId, + this.channelEmojisConfiguration.emojis + ) this.validationError = undefined this.ptNotifier.info(await this.ptTranslate(LOC_SUCCESSFULLY_SAVED)) + this.requestUpdate('channelEmojisConfiguration') this.requestUpdate('_validationError') } catch (error) { this.validationError = undefined diff --git a/client/common/configuration/services/channel-details.ts b/client/common/configuration/services/channel-details.ts index aa3b02b6..39f1dc7f 100644 --- a/client/common/configuration/services/channel-details.ts +++ b/client/common/configuration/services/channel-details.ts @@ -5,10 +5,12 @@ import type { RegisterClientOptions } from '@peertube/peertube-types/client' import type { - ChannelLiveChatInfos, ChannelConfiguration, ChannelConfigurationOptions, ChannelEmojisConfiguration, ChannelEmojis + ChannelLiveChatInfos, ChannelConfiguration, ChannelConfigurationOptions, ChannelEmojisConfiguration, ChannelEmojis, + CustomEmojiDefinition } from 'shared/lib/types' import { ValidationError, ValidationErrorType } from '../../lib/models/validation' import { getBaseRoute } from '../../../utils/uri' +import { maxEmojisPerChannel } from 'shared/lib/emojis' export class ChannelDetailsService { public _registerClientOptions: RegisterClientOptions @@ -213,11 +215,57 @@ export class ChannelDetailsService { public async saveEmojisConfiguration ( channelId: number, channelEmojis: ChannelEmojis - ): Promise { + ): Promise { if (!await this.validateEmojisConfiguration(channelEmojis)) { throw new Error('Invalid form data') } + // Note: API request body size is limited to 100Kb (expressjs body-parser defaut limit, and Peertube nginx config). + // So we must send new emojis 1 by 1, to be sure to not reach the limit. + if (!channelEmojis.customEmojis.find(e => e.url.startsWith('data:'))) { + // No new emojis, just saving. + return this._saveEmojisConfiguration(channelId, channelEmojis) + } + + let lastResult: ChannelEmojisConfiguration | undefined + let customEmojis: CustomEmojiDefinition[] = [...channelEmojis.customEmojis] // copy the original array + let i = customEmojis.findIndex(e => e.url.startsWith('data:')) + let watchDog = 0 + while (i >= 0) { + watchDog++ + if (watchDog > maxEmojisPerChannel + 10) { // just to avoid infinite loop + throw new Error('Seems we have sent too many emojis, this was not expected') + } + const data: CustomEmojiDefinition[] = customEmojis.slice(0, i + 1) // all elements until first new file + data.push( + // all remaining elements that where already uploaded (to not loose them): + ...customEmojis.slice(i + 1).filter((e) => !e.url.startsWith('data:')) + ) + lastResult = await this._saveEmojisConfiguration(channelId, { + customEmojis: data + }) + + // Must inject the result in customEmojis + const temp = lastResult.emojis.customEmojis.slice(0, i + 1) // last element should have been replace by a http url + temp.push( + ...customEmojis.slice(i + 1) // remaining elements in the previous array + ) + customEmojis = temp + + // and searching again next new emojis + i = customEmojis.findIndex(e => e.url.startsWith('data:')) + } + if (!lastResult) { + // This should not happen... + throw new Error('Unexpected: no last result') + } + return lastResult + } + + private async _saveEmojisConfiguration ( + channelId: number, + channelEmojis: ChannelEmojis + ): Promise { const response = await fetch( getBaseRoute(this._registerClientOptions) + '/api/configuration/channel/emojis/' + @@ -230,10 +278,9 @@ export class ChannelDetailsService { ) if (!response.ok) { - if (response.status === 404) { - // File does not exist yet, that is a normal use case. - } throw new Error('Can\'t get channel emojis options.') } + + return response.json() } } diff --git a/server/lib/routers/api/configuration.ts b/server/lib/routers/api/configuration.ts index ed4e7ce9..43e88be5 100644 --- a/server/lib/routers/api/configuration.ts +++ b/server/lib/routers/api/configuration.ts @@ -168,7 +168,16 @@ async function initConfigurationApiRouter (options: RegisterServerOptions, route await emojis.saveChannelDefinition(channelInfos.id, emojisDefinitionSanitized, bufferInfos) - res.sendStatus(200) + // Reloading data, to send them back to front: + const channelEmojis = + (await emojis.channelCustomEmojisDefinition(channelInfos.id)) ?? + emojis.emptyChannelDefinition() + const result: ChannelEmojisConfiguration = { + channel: channelInfos, + emojis: channelEmojis + } + res.status(200) + res.json(result) } catch (err) { logger.error(err) res.sendStatus(500) diff --git a/shared/lib/emojis.ts b/shared/lib/emojis.ts index 87e6f061..6ea36795 100644 --- a/shared/lib/emojis.ts +++ b/shared/lib/emojis.ts @@ -2,6 +2,9 @@ // // SPDX-License-Identifier: AGPL-3.0-only +// Note: API request body size is limited to 100Kb (expressjs body-parser defaut limit, and Peertube nginx config). +// So we must be sure to never send more than 100Kb. The front end sends new emojis by batch, but maxSize must remain +// as little as possible, so that we never reach 100Kb in JSON/base64 format. export const maxSize: number = 30 * 1024 export const allowedExtensions = ['png', 'jpg', 'jpeg', 'gif'] export const inputFileAccept = ['image/jpg', 'image/png', 'image/gif'] From a0b4b5f61a956173c114c73b160f6c987f0acec4 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 11:38:04 +0200 Subject: [PATCH 02/11] Fix: the emojis import function could add more entries than max allowed emoji count. + another minor fix. --- CHANGELOG.md | 1 + client/@types/global.d.ts | 1 + .../common/configuration/services/channel-details.ts | 12 +++++++++++- languages/en.yml | 1 + languages/fr.yml | 1 + 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 568811c7..ef754363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 10.1.1 (Not released yet) * #436: Saving emojis per batch, to avoid hitting max payload limit. +* Fix: the emojis import function could add more entries than max allowed emoji count. ## 10.1.0 diff --git a/client/@types/global.d.ts b/client/@types/global.d.ts index dd200ec7..1f15b839 100644 --- a/client/@types/global.d.ts +++ b/client/@types/global.d.ts @@ -83,6 +83,7 @@ declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_BOT_NICKNAME: string declare const LOC_LIVECHAT_CONFIGURATION_CHANNEL_FOR_MORE_INFO: string declare const LOC_VALIDATION_ERROR: string +declare const LOC_TOO_MANY_ENTRIES: string declare const LOC_INVALID_VALUE: string declare const LOC_INVALID_VALUE_MISSING: string declare const LOC_INVALID_VALUE_WRONG_TYPE: string diff --git a/client/common/configuration/services/channel-details.ts b/client/common/configuration/services/channel-details.ts index 39f1dc7f..d280c235 100644 --- a/client/common/configuration/services/channel-details.ts +++ b/client/common/configuration/services/channel-details.ts @@ -181,6 +181,16 @@ export class ChannelDetailsService { public async validateEmojisConfiguration (channelEmojis: ChannelEmojis): Promise { const propertiesError: ValidationError['properties'] = {} + if (channelEmojis.customEmojis.length > maxEmojisPerChannel) { + // This can happen when using the import function. + const validationError = new ValidationError( + 'ChannelEmojisValidationError', + await this._registerClientOptions.peertubeHelpers.translate(LOC_TOO_MANY_ENTRIES), + propertiesError + ) + throw validationError + } + const seen = new Map() for (const [i, e] of channelEmojis.customEmojis.entries()) { propertiesError[`emojis.${i}.sn`] = [] @@ -233,7 +243,7 @@ export class ChannelDetailsService { let watchDog = 0 while (i >= 0) { watchDog++ - if (watchDog > maxEmojisPerChannel + 10) { // just to avoid infinite loop + if (watchDog > channelEmojis.customEmojis.length + 10) { // just to avoid infinite loop throw new Error('Seems we have sent too many emojis, this was not expected') } const data: CustomEmojiDefinition[] = customEmojis.slice(0, i + 1) // all elements until first new file diff --git a/languages/en.yml b/languages/en.yml index 3e7dea32..38f3cb50 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -455,6 +455,7 @@ invalid_value_wrong_format: "Value is in the wrong format." invalid_value_not_in_range: "Value is not in authorized range." invalid_value_file_too_big: "File size is too big (max size: %s)." invalid_value_duplicate: "Duplicate value" +too_many_entries: "Too many entries" slow_mode_info: "Slow mode is enabled, users can send a message every %1$s seconds." diff --git a/languages/fr.yml b/languages/fr.yml index 11a73280..eab63f8d 100644 --- a/languages/fr.yml +++ b/languages/fr.yml @@ -522,3 +522,4 @@ livechat_token_disabled_description: "Les utilisateur⋅rices peuvent générer pour inclure le tchat dans les docks web dans OBS.\nConsultez la documentation pour plus d'informations.\nVous pouvez désactiver cette fonctionnalité en cochant ce paramètre.\n" +too_many_entries: "Trop d'entrées" From 48905dd70d4be2ff39f055d6b457a48d003bc99e Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 11:45:36 +0200 Subject: [PATCH 03/11] Fix #437: removing last line if empty when importing emojis. --- CHANGELOG.md | 3 ++- client/common/configuration/elements/channel-emojis.ts | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef754363..d3ec67c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## 10.1.1 (Not released yet) -* #436: Saving emojis per batch, to avoid hitting max payload limit. +* Fix #436: Saving emojis per batch, to avoid hitting max payload limit. * Fix: the emojis import function could add more entries than max allowed emoji count. +* Fix #437: removing last line if empty when importing emojis. ## 10.1.0 diff --git a/client/common/configuration/elements/channel-emojis.ts b/client/common/configuration/elements/channel-emojis.ts index 5848c62e..4e754e00 100644 --- a/client/common/configuration/elements/channel-emojis.ts +++ b/client/common/configuration/elements/channel-emojis.ts @@ -174,6 +174,15 @@ export class ChannelEmojisElement extends LivechatElement { if (!Array.isArray(json)) { throw new Error('Invalid data, an array was expected') } + + // Before adding new entries, we check if the last current line is empty, + // and remove it in such case. + // See https://github.com/JohnXLivingston/peertube-plugin-livechat/issues/437 + const last = this.channelEmojisConfiguration?.emojis.customEmojis.slice(-1)[0] + if (last && last.sn === '' && last.url === '') { + this.channelEmojisConfiguration?.emojis.customEmojis.pop() + } + for (const entry of json) { if (typeof entry !== 'object') { throw new Error('Invalid data') From abd9086ae3b0ecc348adf328603d3d09ed1fd05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jergu=C5=A1=20Fonfer?= Date: Thu, 20 Jun 2024 10:13:54 +0200 Subject: [PATCH 04/11] Added translation using Weblate (Slovak) --- languages/sk.yml | 308 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 languages/sk.yml diff --git a/languages/sk.yml b/languages/sk.yml new file mode 100644 index 00000000..200c8b85 --- /dev/null +++ b/languages/sk.yml @@ -0,0 +1,308 @@ +online_help: "" +open_chat: "" +open_chat_new_window: "" +close_chat: "" +use_chat: "" +use_chat_help: "" +share_chat_link: "" +read_only: "" +show_scrollbarr: "" +transparent_background: "" +tips_for_streamers: | +copy: "" +copied: "" +link_copied: "" +error: "" +open: "" +use_current_theme_color: "" +generate_iframe: "" +chat_for_live_stream: "" +room_name: "" +room_description: "" +not_found: "" +video: "" +channel: "" +last_activity: "" +web: "" +connect_using_xmpp: "" +connect_using_xmpp_help: "" + +important_note_title: "" +important_note_text: | + +diagnostic: | + +chat_title: "" + +list_rooms_label: "" +list_rooms_description: | + +federation_description: | + +federation_no_remote_chat_label: "" +federation_no_remote_chat_description: | + +federation_dont_publish_remotely_label: "" +federation_dont_publish_remotely_description: | + +external_auth_description: | + +external_auth_custom_oidc_title: "" + +external_auth_custom_oidc_label: "" +external_auth_custom_oidc_description: | + +external_auth_custom_oidc_button_label_label: "" +external_auth_custom_oidc_button_label_description: "" + +external_auth_custom_oidc_discovery_url_label: "" +external_auth_oidc_client_id_label: "" +external_auth_oidc_client_secret_label: "" +external_auth_oidc_redirect_uris_info_description: | + +external_auth_google_oidc_label: '' +external_auth_google_oidc_description: | +external_auth_facebook_oidc_label: '' +external_auth_facebook_oidc_description: | + +chat_behaviour_description: "" + +room_type_label: "" +room_type_description: "" +room_type_option_video: "" +room_type_option_channel: "" + +auto_display_label: "" +auto_display_description: "" + +open_blank_label: "" +open_blank_description: "" + +share_url_label: "" +share_url_description: "" +share_url_option_nobody: "" +share_url_option_everyone: "" +share_url_option_owner: "" +share_url_option_owner_moderators: "" + +per_live_video_label: "" +per_live_video_description: "" + +per_live_video_warning_description: | + +all_lives_label: "" +all_lives_description: "" + +all_non_lives_label: "" +all_non_lives_description: "" + +videos_list_label: "" +videos_list_description: | + +no_anonymous_label: "" +no_anonymous_description: | + +auto_ban_anonymous_ip_label: "" +auto_ban_anonymous_ip_description: | + +theming_advanced_description: "" + +avatar_set_label: "" +avatar_set_description: | +avatar_set_option_sepia: "" +avatar_set_option_cat: "" +avatar_set_option_bird: "" +avatar_set_option_fenec: "" +avatar_set_option_abstract: '' +avatar_set_option_legacy: "" + +converse_theme_label: "" +converse_theme_description: "" +converse_theme_option_peertube: "" +converse_theme_option_default: "" +converse_theme_option_concord: "" + +autocolors_label: "" +autocolors_description: | + +chat_style_label: "" +chat_style_description: | + +prosody_advanced_description: "" + +help_builtin_prosody_label: "" +help_builtin_prosody_description: | + +system_prosody_label: "" +system_prosody_description: | + +disable_websocket_label: "" +disable_websocket_description: | + +prosody_port_label: "" +prosody_port_description: | + +prosody_peertube_uri_label: "" +prosody_peertube_uri_description: | + +prosody_muc_log_by_default_label: "" +prosody_muc_log_by_default_description: | + +prosody_muc_expiration_label: "" +prosody_muc_expiration_description: | + +prosody_room_allow_s2s_label: "" +prosody_room_allow_s2s_description: | + +prosody_s2s_port_label: "" +prosody_s2s_port_description: | + +prosody_s2s_interfaces_label: "" +prosody_s2s_interfaces_description: | + +prosody_certificates_dir_label: "" +prosody_certificates_dir_description: | + +prosody_c2s_label: "" +prosody_c2s_description: | + +prosody_c2s_port_label: "" +prosody_c2s_port_description: | + + +prosody_c2s_interfaces_label: "" +prosody_c2s_interfaces_description: | + +prosody_components_label: "" +prosody_components_description: | + +prosody_components_port_label: "" +prosody_components_port_description: | + +prosody_components_interfaces_label: "" +prosody_components_interfaces_description: | + +prosody_components_list_label: "" +prosody_components_list_description: | + +experimental_warning: | + +configuration_description: | + +disable_channel_configuration_label: "" + +save: "" +cancel: "" +successfully_saved: "" +menu_configuration_label: "" +livechat_configuration_title: "" +livechat_configuration_desc: "" +livechat_configuration_please_select: "" +livechat_configuration_channel_title: "" +livechat_configuration_channel_desc: "" +livechat_configuration_channel_slow_mode_label: "" +livechat_configuration_channel_slow_mode_desc: | +livechat_configuration_channel_enable_bot_label: "" +livechat_configuration_channel_bot_options_title: "" +livechat_configuration_channel_forbidden_words_label: "" +livechat_configuration_channel_forbidden_words_desc: | +livechat_configuration_channel_forbidden_words_desc2: | +livechat_configuration_channel_forbidden_words_reason_label: "" +livechat_configuration_channel_forbidden_words_reason_desc: "" +livechat_configuration_channel_forbidden_words_regexp_label: "" +livechat_configuration_channel_forbidden_words_regexp_desc: "" +livechat_configuration_channel_forbidden_words_label_label: "" +livechat_configuration_channel_forbidden_words_label_desc: "" +livechat_configuration_channel_forbidden_words_applytomoderators_label: "" +livechat_configuration_channel_forbidden_words_applytomoderators_desc: | +livechat_configuration_channel_forbidden_words_comments_label: "" +livechat_configuration_channel_forbidden_words_comments_desc: | +livechat_configuration_channel_quote_label: "" +livechat_configuration_channel_quote_desc: | +livechat_configuration_channel_quote_label2: "" +livechat_configuration_channel_quote_desc2: | +livechat_configuration_channel_quote_delay_label: "" +livechat_configuration_channel_quote_delay_desc: | +livechat_configuration_channel_command_label: "" +livechat_configuration_channel_command_desc: | +livechat_configuration_channel_command_cmd_label: "" +livechat_configuration_channel_command_cmd_desc: | +livechat_configuration_channel_command_message_label: "" +livechat_configuration_channel_command_message_desc: "" +livechat_configuration_channel_for_more_info: | +livechat_configuration_channel_banned_jids_label: "" +livechat_configuration_channel_bot_nickname: "" + +validation_error: "" +invalid_value: "" +invalid_value_missing: "" +invalid_value_wrong_type: "" +invalid_value_wrong_format: "" +invalid_value_not_in_range: "" +invalid_value_file_too_big: "" +invalid_value_duplicate: "" + +slow_mode_info: "" + +chatroom_not_accessible: "" + +login_using_external_account: "" +login_remote_peertube: "" +login_remote_peertube_url: "" +login_remote_peertube_searching: "" +login_remote_peertube_url_invalid: "" +login_remote_peertube_no_livechat: "" +login_remote_peertube_video_not_found: "" +login_remote_peertube_video_not_found_try_anyway: "" +login_remote_peertube_video_not_found_try_anyway_button: "" +login_remote_peertube_video_open_failed: "" +login_external_auth_alert_message: "" + +tasks: '' +task_list_create: '' +task_list_create_error: '' +task_list_name: '' +task_list_delete: '' +task_list_delete_confirm: '' +task_create: '' +task_name: '' +task_description: '' +task_delete: '' +task_delete_confirm: '' +task_list_pick_title: '' +task_list_pick_empty: '' +task_list_pick_message: | + +promote: '' + +livechat_configuration_channel_emojis_title: '' +livechat_configuration_channel_emojis_desc: | +livechat_emojis_shortname: '' +livechat_emojis_shortname_desc: | +livechat_emojis_file: '' +livechat_emojis_file_desc: | + +action_import: '' +action_export: '' +action_import_emojis_info: '' + +action_add_entry: '' +action_remove_entry: '' +action_remove_entry_confirm: '' + +loading_error: '' +share_chat_embed: '' +share_chat_peertube_tips: '' +share_chat_dock: '' +share_chat_dock_tips: | + +token_label: '' +token_password: '' +token_date: '' +token_action_create: '' +token_action_revoke: '' +token_default_label: '' +token_action_revoke_confirm: '' +auth_description: | +livechat_token_disabled_label: '' +livechat_token_disabled_description: | From b8eb6a8c7e097294669419b05510fafb5127cdef Mon Sep 17 00:00:00 2001 From: Victor Hampel Date: Wed, 19 Jun 2024 21:55:37 +0000 Subject: [PATCH 05/11] Translated using Weblate (German) Currently translated at 100.0% (243 of 243 strings) Translation: PeerTube LiveChat/Peertube Plugin LiveChat Translate-URL: https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat/de/ --- languages/de.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/languages/de.yml b/languages/de.yml index a88c1424..934b0136 100644 --- a/languages/de.yml +++ b/languages/de.yml @@ -511,3 +511,4 @@ token_action_revoke_confirm: Sind Sie sicher, dass Sie diesen Token widerrufen w auth_description: "

Authentifizierung

\n" livechat_token_disabled_label: Livechat-Token deaktivieren share_chat_dock: Dock +token_date: Datum From c21b0c9bb00f6d48e49d12221857e1a3e9337445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jergu=C5=A1=20Fonfer?= Date: Thu, 20 Jun 2024 08:14:16 +0000 Subject: [PATCH 06/11] Translated using Weblate (Slovak) Currently translated at 3.2% (8 of 243 strings) Translation: PeerTube LiveChat/Peertube Plugin LiveChat Translate-URL: https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat/sk/ --- languages/sk.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/languages/sk.yml b/languages/sk.yml index 200c8b85..2b55abc6 100644 --- a/languages/sk.yml +++ b/languages/sk.yml @@ -1,11 +1,11 @@ -online_help: "" -open_chat: "" -open_chat_new_window: "" -close_chat: "" -use_chat: "" -use_chat_help: "" -share_chat_link: "" -read_only: "" +online_help: "Online pomoc" +open_chat: "Otvoriť chat" +open_chat_new_window: "Otvoriť chat na novom okne" +close_chat: "Zavrieť čet" +use_chat: "Použite chat" +use_chat_help: "Ak je povolená, vedľa videa sa zobrazí chat." +share_chat_link: "Zdieľať odkaz na čet" +read_only: "Iba na čítanie" show_scrollbarr: "" transparent_background: "" tips_for_streamers: | From ef998d49f80d302754ecd618b1596cb3fc15003e Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 11:48:19 +0200 Subject: [PATCH 07/11] Changelog and fix sk lang file. --- CHANGELOG.md | 1 + languages/sk.yml | 300 ----------------------------------------------- 2 files changed, 1 insertion(+), 300 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3ec67c3..cf705883 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Fix #436: Saving emojis per batch, to avoid hitting max payload limit. * Fix: the emojis import function could add more entries than max allowed emoji count. * Fix #437: removing last line if empty when importing emojis. +* Updated translations: de, sk. ## 10.1.0 diff --git a/languages/sk.yml b/languages/sk.yml index 2b55abc6..0bf6b72e 100644 --- a/languages/sk.yml +++ b/languages/sk.yml @@ -6,303 +6,3 @@ use_chat: "Použite chat" use_chat_help: "Ak je povolená, vedľa videa sa zobrazí chat." share_chat_link: "Zdieľať odkaz na čet" read_only: "Iba na čítanie" -show_scrollbarr: "" -transparent_background: "" -tips_for_streamers: | -copy: "" -copied: "" -link_copied: "" -error: "" -open: "" -use_current_theme_color: "" -generate_iframe: "" -chat_for_live_stream: "" -room_name: "" -room_description: "" -not_found: "" -video: "" -channel: "" -last_activity: "" -web: "" -connect_using_xmpp: "" -connect_using_xmpp_help: "" - -important_note_title: "" -important_note_text: | - -diagnostic: | - -chat_title: "" - -list_rooms_label: "" -list_rooms_description: | - -federation_description: | - -federation_no_remote_chat_label: "" -federation_no_remote_chat_description: | - -federation_dont_publish_remotely_label: "" -federation_dont_publish_remotely_description: | - -external_auth_description: | - -external_auth_custom_oidc_title: "" - -external_auth_custom_oidc_label: "" -external_auth_custom_oidc_description: | - -external_auth_custom_oidc_button_label_label: "" -external_auth_custom_oidc_button_label_description: "" - -external_auth_custom_oidc_discovery_url_label: "" -external_auth_oidc_client_id_label: "" -external_auth_oidc_client_secret_label: "" -external_auth_oidc_redirect_uris_info_description: | - -external_auth_google_oidc_label: '' -external_auth_google_oidc_description: | -external_auth_facebook_oidc_label: '' -external_auth_facebook_oidc_description: | - -chat_behaviour_description: "" - -room_type_label: "" -room_type_description: "" -room_type_option_video: "" -room_type_option_channel: "" - -auto_display_label: "" -auto_display_description: "" - -open_blank_label: "" -open_blank_description: "" - -share_url_label: "" -share_url_description: "" -share_url_option_nobody: "" -share_url_option_everyone: "" -share_url_option_owner: "" -share_url_option_owner_moderators: "" - -per_live_video_label: "" -per_live_video_description: "" - -per_live_video_warning_description: | - -all_lives_label: "" -all_lives_description: "" - -all_non_lives_label: "" -all_non_lives_description: "" - -videos_list_label: "" -videos_list_description: | - -no_anonymous_label: "" -no_anonymous_description: | - -auto_ban_anonymous_ip_label: "" -auto_ban_anonymous_ip_description: | - -theming_advanced_description: "" - -avatar_set_label: "" -avatar_set_description: | -avatar_set_option_sepia: "" -avatar_set_option_cat: "" -avatar_set_option_bird: "" -avatar_set_option_fenec: "" -avatar_set_option_abstract: '' -avatar_set_option_legacy: "" - -converse_theme_label: "" -converse_theme_description: "" -converse_theme_option_peertube: "" -converse_theme_option_default: "" -converse_theme_option_concord: "" - -autocolors_label: "" -autocolors_description: | - -chat_style_label: "" -chat_style_description: | - -prosody_advanced_description: "" - -help_builtin_prosody_label: "" -help_builtin_prosody_description: | - -system_prosody_label: "" -system_prosody_description: | - -disable_websocket_label: "" -disable_websocket_description: | - -prosody_port_label: "" -prosody_port_description: | - -prosody_peertube_uri_label: "" -prosody_peertube_uri_description: | - -prosody_muc_log_by_default_label: "" -prosody_muc_log_by_default_description: | - -prosody_muc_expiration_label: "" -prosody_muc_expiration_description: | - -prosody_room_allow_s2s_label: "" -prosody_room_allow_s2s_description: | - -prosody_s2s_port_label: "" -prosody_s2s_port_description: | - -prosody_s2s_interfaces_label: "" -prosody_s2s_interfaces_description: | - -prosody_certificates_dir_label: "" -prosody_certificates_dir_description: | - -prosody_c2s_label: "" -prosody_c2s_description: | - -prosody_c2s_port_label: "" -prosody_c2s_port_description: | - - -prosody_c2s_interfaces_label: "" -prosody_c2s_interfaces_description: | - -prosody_components_label: "" -prosody_components_description: | - -prosody_components_port_label: "" -prosody_components_port_description: | - -prosody_components_interfaces_label: "" -prosody_components_interfaces_description: | - -prosody_components_list_label: "" -prosody_components_list_description: | - -experimental_warning: | - -configuration_description: | - -disable_channel_configuration_label: "" - -save: "" -cancel: "" -successfully_saved: "" -menu_configuration_label: "" -livechat_configuration_title: "" -livechat_configuration_desc: "" -livechat_configuration_please_select: "" -livechat_configuration_channel_title: "" -livechat_configuration_channel_desc: "" -livechat_configuration_channel_slow_mode_label: "" -livechat_configuration_channel_slow_mode_desc: | -livechat_configuration_channel_enable_bot_label: "" -livechat_configuration_channel_bot_options_title: "" -livechat_configuration_channel_forbidden_words_label: "" -livechat_configuration_channel_forbidden_words_desc: | -livechat_configuration_channel_forbidden_words_desc2: | -livechat_configuration_channel_forbidden_words_reason_label: "" -livechat_configuration_channel_forbidden_words_reason_desc: "" -livechat_configuration_channel_forbidden_words_regexp_label: "" -livechat_configuration_channel_forbidden_words_regexp_desc: "" -livechat_configuration_channel_forbidden_words_label_label: "" -livechat_configuration_channel_forbidden_words_label_desc: "" -livechat_configuration_channel_forbidden_words_applytomoderators_label: "" -livechat_configuration_channel_forbidden_words_applytomoderators_desc: | -livechat_configuration_channel_forbidden_words_comments_label: "" -livechat_configuration_channel_forbidden_words_comments_desc: | -livechat_configuration_channel_quote_label: "" -livechat_configuration_channel_quote_desc: | -livechat_configuration_channel_quote_label2: "" -livechat_configuration_channel_quote_desc2: | -livechat_configuration_channel_quote_delay_label: "" -livechat_configuration_channel_quote_delay_desc: | -livechat_configuration_channel_command_label: "" -livechat_configuration_channel_command_desc: | -livechat_configuration_channel_command_cmd_label: "" -livechat_configuration_channel_command_cmd_desc: | -livechat_configuration_channel_command_message_label: "" -livechat_configuration_channel_command_message_desc: "" -livechat_configuration_channel_for_more_info: | -livechat_configuration_channel_banned_jids_label: "" -livechat_configuration_channel_bot_nickname: "" - -validation_error: "" -invalid_value: "" -invalid_value_missing: "" -invalid_value_wrong_type: "" -invalid_value_wrong_format: "" -invalid_value_not_in_range: "" -invalid_value_file_too_big: "" -invalid_value_duplicate: "" - -slow_mode_info: "" - -chatroom_not_accessible: "" - -login_using_external_account: "" -login_remote_peertube: "" -login_remote_peertube_url: "" -login_remote_peertube_searching: "" -login_remote_peertube_url_invalid: "" -login_remote_peertube_no_livechat: "" -login_remote_peertube_video_not_found: "" -login_remote_peertube_video_not_found_try_anyway: "" -login_remote_peertube_video_not_found_try_anyway_button: "" -login_remote_peertube_video_open_failed: "" -login_external_auth_alert_message: "" - -tasks: '' -task_list_create: '' -task_list_create_error: '' -task_list_name: '' -task_list_delete: '' -task_list_delete_confirm: '' -task_create: '' -task_name: '' -task_description: '' -task_delete: '' -task_delete_confirm: '' -task_list_pick_title: '' -task_list_pick_empty: '' -task_list_pick_message: | - -promote: '' - -livechat_configuration_channel_emojis_title: '' -livechat_configuration_channel_emojis_desc: | -livechat_emojis_shortname: '' -livechat_emojis_shortname_desc: | -livechat_emojis_file: '' -livechat_emojis_file_desc: | - -action_import: '' -action_export: '' -action_import_emojis_info: '' - -action_add_entry: '' -action_remove_entry: '' -action_remove_entry_confirm: '' - -loading_error: '' -share_chat_embed: '' -share_chat_peertube_tips: '' -share_chat_dock: '' -share_chat_dock_tips: | - -token_label: '' -token_password: '' -token_date: '' -token_action_create: '' -token_action_revoke: '' -token_default_label: '' -token_action_revoke_confirm: '' -auth_description: | -livechat_token_disabled_label: '' -livechat_token_disabled_description: | From d19a84a6454db8cbc125febe4fb75e0954f903c9 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 11:49:17 +0200 Subject: [PATCH 08/11] Release v10.1.1. --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf705883..208cc01c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 10.1.1 (Not released yet) +## 10.1.1 * Fix #436: Saving emojis per batch, to avoid hitting max payload limit. * Fix: the emojis import function could add more entries than max allowed emoji count. diff --git a/package-lock.json b/package-lock.json index 91457dd9..0b0713a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "peertube-plugin-livechat", - "version": "10.1.0", + "version": "10.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "peertube-plugin-livechat", - "version": "10.1.0", + "version": "10.1.1", "license": "AGPL-3.0", "dependencies": { "@xmpp/jid": "^0.13.1", diff --git a/package.json b/package.json index c03d6f92..ecc3febf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "peertube-plugin-livechat", "description": "PeerTube plugin livechat: create chat rooms for your Peertube lives! Comes with many features: federation, moderation tools, chat bot, chat persistence, OBS integration, ...", - "version": "10.1.0", + "version": "10.1.1", "license": "AGPL-3.0", "author": { "name": "John Livingston", From e177ca26b34bd1a6dc8614d14776029b90369c60 Mon Sep 17 00:00:00 2001 From: Victor Hampel Date: Wed, 19 Jun 2024 21:57:18 +0000 Subject: [PATCH 09/11] Translated using Weblate (German) Currently translated at 100.0% (732 of 732 strings) Translation: PeerTube LiveChat/Peertube Plugin Livechat Documentation Translate-URL: https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat-documentation/de/ --- support/documentation/po/livechat.de.po | 100 +++++++++++++++++------- 1 file changed, 71 insertions(+), 29 deletions(-) diff --git a/support/documentation/po/livechat.de.po b/support/documentation/po/livechat.de.po index e2d1ba65..5e7182ed 100644 --- a/support/documentation/po/livechat.de.po +++ b/support/documentation/po/livechat.de.po @@ -8,15 +8,17 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2024-06-19 12:16+0200\n" -"PO-Revision-Date: 2024-06-18 20:10+0000\n" -"Last-Translator: Victor Hampel \n" -"Language-Team: German \n" +"PO-Revision-Date: 2024-06-20 11:44+0000\n" +"Last-Translator: Victor Hampel " +"\n" +"Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Weblate 5.5.5\n" +"X-Generator: Weblate 5.6\n" #. type: Yaml Front Matter Hash Value: description #: support/documentation/content/en/contact/_index.md @@ -1165,6 +1167,17 @@ msgstr "Jetzt können Sie dieses Konto zu Gateways hinzufügen und bestimmte Liv #: support/documentation/content/en/documentation/admin/advanced/matterbridge.md msgid "This documentation use an anonymous account to connect the bridge to the chat. But since the livechat v10.1.0, there is a new way to generate long term authentication token, that allows to connect using your account. This is used for [OBS docks](/peertube-plugin-livechat/documentation/user/obs). Using this feature for other purposes is not documented and not officially supported yet. If you want to use it anyway, you can request a token by calling then `/plugins/livechat/router/api/auth/tokens` endpoint. To get needed headers and request body, just check what happens when you generate a new token for OBS docks." msgstr "" +"In dieser Dokumentation wird ein anonymes Konto verwendet, um die Brücke mit " +"dem Chat zu verbinden. Aber seit dem Livechat v10.1.0 gibt es eine neue " +"Möglichkeit, ein langfristiges Authentifizierungs-Token zu generieren, das " +"es erlaubt, sich mit dem eigenen Konto zu verbinden. Dies wird für [OBS " +"docks](/peertube-plugin-livechat/de/documentation/user/obs) verwendet. Die " +"Verwendung dieser Funktion für andere Zwecke ist nicht dokumentiert und wird " +"noch nicht offiziell unterstützt. Wenn Sie es trotzdem benutzen wollen, " +"können Sie ein Token anfordern, indem Sie den Endpunkt `/plugins/livechat/" +"router/api/auth/tokens` aufrufen. Um die benötigten Header und den Request " +"Body zu erhalten, prüfe einfach, was passiert, wenn du ein neues Token für " +"OBS Docks generierst." #. type: Yaml Front Matter Hash Value: description #: support/documentation/content/en/documentation/admin/advanced/xmpp_clients.md @@ -2508,10 +2521,8 @@ msgstr "OBS Overlay" #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md -#, fuzzy -#| msgid "You can easily include the chat in your stream." msgid "You can easily include the chat in your video stream." -msgstr "Sie können den Chat ganz einfach in Ihren Stream integrieren." +msgstr "Sie können den Chat ganz einfach in Ihren Videostream integrieren." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md @@ -2574,7 +2585,7 @@ msgstr "Hinweis: Sie können vollständig die Chat-Farben anpassen. Dies ist noc #: support/documentation/content/en/documentation/user/obs.md #, no-wrap msgid "OBS Dock" -msgstr "" +msgstr "OBS Dock" #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md @@ -2592,70 +2603,95 @@ msgstr "Diese Funktion kann von den Administratoren der Instanz deaktiviert werd #: support/documentation/content/en/documentation/user/obs.md msgid "You can use OBS \"Custom browser docks\" to integrate the chat in your OBS while you are streaming. The livechat plugin offers a way to create long term token that can identify you automatically to join the chat, so you don't have to enter your password in OBS." msgstr "" +"Sie können OBS \"Benutzerdefinierte Browser-Docks\" verwenden, um den Chat " +"in OBS zu integrieren, während Sie streamen. Das Livechat-Plugin bietet " +"eine Möglichkeit, ein langfristiges Token zu erstellen, das Sie automatisch " +"identifiziert, um dem Chat beizutreten, so dass Sie Ihr Passwort nicht in " +"OBS eingeben müssen." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "To do so, just use the \"{{% livechat_label share_chat_link %}}\", and open the \"{{% livechat_label share_chat_dock %}}\" tab. From there, you can create a new token using the \"+\" button." msgstr "" +"Verwenden Sie dazu einfach \"{{% livechat_label share_chat_link %}}\", und " +"öffnen Sie die Registerkarte \"{{% livechat_label share_chat_dock %}}\". " +"Von dort aus können Sie mit der Schaltfläche \"+\" ein neuen Token erstellen." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md #: support/documentation/content/en/documentation/user/streamers/basics.md -#, fuzzy -#| msgid "![Share link popup](/peertube-plugin-livechat/images/share_readonly.png?classes=shadow,border&height=200px)" msgid "![Share link popup - dock tab](/peertube-plugin-livechat/images/share_dock.png?classes=shadow,border&height=200px)" -msgstr "![Link Teilen Popup](/peertube-plugin-livechat/images/share_readonly.png?classes=shadow,border&height=200px)" +msgstr "" +"![Link teilen Fenster - Dock Reiter](/peertube-plugin-livechat/images/" +"share_dock.png?classes=shadow,border&height=200px)" #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "Then, copy the url, and use the \"Docks / Custom browser docks\" menu from your OBS to add a dock with this URL." msgstr "" +"Kopieren Sie dann die URL und verwenden Sie das Menü \"Docks / " +"Benutzerdefinierte Browser-Docks\" in Ihrem OBS, um ein Dock mit dieser URL " +"hinzuzufügen." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md -#, fuzzy -#| msgid "![Chat menu](/peertube-plugin-livechat/images/top_menu.png?classes=shadow,border&height=200px)" msgid "![OBS - Dock menu](/peertube-plugin-livechat/images/obs_dock_menu.png?classes=shadow,border&height=200px)" -msgstr "![Chat Menü](/peertube-plugin-livechat/images/top_menu.png?classes=shadow,border&height=200px)" +msgstr "" +"![OBS - Dock Menü](/peertube-plugin-livechat/images/obs_dock_menu." +"png?classes=shadow,border&height=200px)" #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md -#, fuzzy -#| msgid "![External login dialog](/peertube-plugin-livechat/images/external_login_dialog.png?classes=shadow,border&height=200px)" msgid "![OBS - Dock dialog](/peertube-plugin-livechat/images/obs_dock_dialog.png?classes=shadow,border&height=200px)" -msgstr "![Externer Anmeldedialog](/peertube-plugin-livechat/images/external_login_dialog.png?classes=shadow,border&height=200px)" +msgstr "" +"![OBS - Dock-Dialog](/peertube-plugin-livechat/images/obs_dock_dialog." +"png?classes=shadow,border&height=200px)" #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "Once you have done, you will have a new dock connected to the chat with your account." msgstr "" +"Danach haben Sie ein neues Dock, das mit dem Chat und Ihrem Konto verbunden " +"ist." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md -#, fuzzy -#| msgid "![Share button](/peertube-plugin-livechat/images/share_button.png?classes=shadow,border&height=200px)" msgid "![OBS - Dock](/peertube-plugin-livechat/images/obs_dock.png?classes=shadow,border&height=200px)" -msgstr "![Teilen Schaltfläche](/peertube-plugin-livechat/images/share_button.png?classes=shadow,border&height=200px)" +msgstr "" +"![OBS - Dock](/peertube-plugin-livechat/images/obs_dock." +"png?classes=shadow,border&height=200px)" #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "Tokens are valid to join any chat room. You don't have to generate separate tokens for each of your rooms. You can also customize the nickame that will be used by changing the `n` parameter in the url." msgstr "" +"Die Token sind für die Teilnahme an jedem Chatraum gültig. Sie müssen nicht " +"für jeden Ihrer Räume ein eigenes Token erstellen. Sie können auch den " +"Spitznamen, der verwendet wird, anpassen, indem Sie den Parameter `n` in der " +"URL ändern." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "Don't share these links to anyone, as it would allow them to connect as yourself." msgstr "" +"Geben Sie diese Links nicht weiter, da sie es anderen Personen ermöglichen " +"würden, eine Verbindung mit Ihrem Konto herzustellen." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "If a token is compromised, or no more needed, you can revoke them." msgstr "" +"Wenn ein Token kompromittiert ist oder nicht mehr benötigt wird, können Sie " +"ihn widerrufen." #. type: Plain text #: support/documentation/content/en/documentation/user/obs.md msgid "These tokens can be used for other purposes, as connecting to your account with XMPP bots or clients. This feature is not documented yet, and not officially supported. So use with care." msgstr "" +"Diese Token können für andere Zwecke verwendet werden, z. B. für die " +"Verbindung mit XMPP-Bots oder -Clients zu Ihrem Konto. Diese Funktion ist " +"noch nicht dokumentiert und wird offiziell nicht unterstützt. Verwenden Sie " +"sie also mit Vorsicht." #. type: Title ## #: support/documentation/content/en/documentation/user/obs.md @@ -2747,6 +2783,8 @@ msgstr "Diese Schaltfläche öffnet ein Popup-Fenster, in dem Sie eine URL erhal #: support/documentation/content/en/documentation/user/streamers/basics.md msgid "The \"{{% livechat_label share_chat_embed %}}\" tab provide some links to embed the chat in websites, or in your live stream." msgstr "" +"Auf der Registerkarte \"{{% livechat_label share_chat_embed %}}\" finden Sie " +"einige Links zum Einbetten des Chats in Websites oder in Ihre Livestream." #. type: Plain text #: support/documentation/content/en/documentation/user/streamers/basics.md @@ -2770,22 +2808,26 @@ msgstr "{{% livechat_label generate_iframe %}}: Anstelle einer URL erhalten Sie #. type: Plain text #: support/documentation/content/en/documentation/user/streamers/basics.md -#, fuzzy -#| msgid "Please refer to the [OBS documentation](/peertube-plugin-livechat/documentation/user/obs)." msgid "For more information on the \"{{% livechat_label share_chat_dock %}}\" tab, check the [OBS documentation](/peertube-plugin-livechat/documentation/user/obs)." -msgstr "Bitte lesen Sie die [OBS-Dokumentation](/peertube-plugin-livechat/de/documentation/user/obs)." +msgstr "" +"Weitere Informationen über die Registerkarte \"{{% livechat_label " +"share_chat_dock %}}\" finden Sie in der [OBS-Dokumentation](/peertube-" +"plugin-livechat/de/documentation/user/obs)." #. type: Plain text #: support/documentation/content/en/documentation/user/streamers/basics.md msgid "In the \"{{% livechat_label web %}}\" tab, the provided url opens the chat in the Peertube interface. You can share this link to other users to invite them to join the chat." msgstr "" +"Auf der Registerkarte \"{{% livechat_label web %}}\" öffnet die angegebene " +"URL den Chat in der Peertube-Oberfläche. Sie können diesen Link an andere " +"Benutzer weitergeben, um sie zum Chat einzuladen." #. type: Plain text #: support/documentation/content/en/documentation/user/streamers/basics.md -#, fuzzy -#| msgid "![Share link popup](/peertube-plugin-livechat/images/share_readonly.png?classes=shadow,border&height=200px)" msgid "![Share link popup - web tab](/peertube-plugin-livechat/images/share_web.png?classes=shadow,border&height=200px)" -msgstr "![Link Teilen Popup](/peertube-plugin-livechat/images/share_readonly.png?classes=shadow,border&height=200px)" +msgstr "" +"![Link teilen Fenster - Web Reiter](/peertube-plugin-livechat/images/" +"share_web.png?classes=shadow,border&height=200px)" #. type: Plain text #: support/documentation/content/en/documentation/user/streamers/basics.md @@ -2794,10 +2836,10 @@ msgstr "Das \"{{% livechat_label share_chat_link %}}\" Popup-Fenster kann auch e #. type: Plain text #: support/documentation/content/en/documentation/user/streamers/basics.md -#, fuzzy -#| msgid "![Share XMPP](/peertube-plugin-livechat/images/share_xmpp_dialog.png?classes=shadow,border&height=200px)" msgid "![Share link popup - xmpp tab](/peertube-plugin-livechat/images/share_xmpp_dialog.png?classes=shadow,border&height=200px)" -msgstr "![XMPP Link teilen](/peertube-plugin-livechat/images/share_xmpp_dialog.png?classes=shadow,border&height=200px)" +msgstr "" +"![Link teilen Fenster - xmpp Reiter](/peertube-plugin-livechat/images/" +"share_xmpp_dialog.png?classes=shadow,border&height=200px)" #. type: Title ## #: support/documentation/content/en/documentation/user/streamers/basics.md From 1be95f01b130bfac08d3083b7977b9afcc15b909 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 14:39:15 +0200 Subject: [PATCH 10/11] Fix: clicking on the import custom emojis button, without selected any file, was resulting in a state with all action button disabled. --- CHANGELOG.md | 4 ++++ client/common/configuration/elements/channel-emojis.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 208cc01c..7a460cff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 10.1.2 + +* Fix: clicking on the import custom emojis button, without selected any file, was resulting in a state with all action button disabled. + ## 10.1.1 * Fix #436: Saving emojis per batch, to avoid hitting max payload limit. diff --git a/client/common/configuration/elements/channel-emojis.ts b/client/common/configuration/elements/channel-emojis.ts index 4e754e00..4475cc65 100644 --- a/client/common/configuration/elements/channel-emojis.ts +++ b/client/common/configuration/elements/channel-emojis.ts @@ -132,7 +132,6 @@ export class ChannelEmojisElement extends LivechatElement { */ public async importEmojis (ev: Event): Promise { ev.preventDefault() - this.actionDisabled = true try { // download a json file: const file = await new Promise((resolve, reject) => { @@ -153,6 +152,8 @@ export class ChannelEmojisElement extends LivechatElement { input.remove() }) + this.actionDisabled = true + const content = await new Promise((resolve, reject) => { const fileReader = new FileReader() fileReader.onerror = reject From 1f1543bc976c1cb562d88a12512c7cf84c82f648 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 20 Jun 2024 14:47:31 +0200 Subject: [PATCH 11/11] Fix missing package files in v10.1.2. --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0b0713a1..a0fe6c3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "peertube-plugin-livechat", - "version": "10.1.1", + "version": "10.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "peertube-plugin-livechat", - "version": "10.1.1", + "version": "10.1.2", "license": "AGPL-3.0", "dependencies": { "@xmpp/jid": "^0.13.1", diff --git a/package.json b/package.json index ecc3febf..f5ad7e62 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "peertube-plugin-livechat", "description": "PeerTube plugin livechat: create chat rooms for your Peertube lives! Comes with many features: federation, moderation tools, chat bot, chat persistence, OBS integration, ...", - "version": "10.1.1", + "version": "10.1.2", "license": "AGPL-3.0", "author": { "name": "John Livingston",