diff --git a/blocks/Config/initialConfig.js b/blocks/Config/initialConfig.js index 02cbc902..991adc0b 100644 --- a/blocks/Config/initialConfig.js +++ b/blocks/Config/initialConfig.js @@ -5,7 +5,7 @@ import { serializeCsv } from '../utils/comma-separated.js'; export const DEFAULT_CDN_CNAME = 'https://ucarecdn.com'; export const DEFAULT_BASE_URL = 'https://upload.uploadcare.com'; -export const DEFAULT_SOCIAL_BASE_URL = 'https://social.uploadcare.com'; +export const DEFAULT_SOCIAL_BASE_URL = 'https://localhost.localdomain:5000'; /** @type {import('../../types/exported').ConfigType} */ export const initialConfig = { diff --git a/blocks/ExternalSource/ExternalSource.js b/blocks/ExternalSource/ExternalSource.js index 5dde9c10..9e7d7f0d 100644 --- a/blocks/ExternalSource/ExternalSource.js +++ b/blocks/ExternalSource/ExternalSource.js @@ -51,6 +51,8 @@ export class ExternalSource extends UploaderBlock { this._messageBridge?.send({ type: 'select-all' }); }, + onKeyDown: () => {}, + onDeselectAll: () => { this._messageBridge?.send({ type: 'deselect-all' }); }, @@ -102,6 +104,10 @@ export class ExternalSource extends UploaderBlock { this.subConfigValue('multiple', (multiple) => { this.$.showSelectionStatus = multiple; }); + + this.subConfigValue('localeName', (val) => { + this.setupL10n(); + }); } /** @@ -153,6 +159,7 @@ export class ExternalSource extends UploaderBlock { /** @private */ handleIframeLoad() { this.applyStyles(); + this.setupL10n(); } /** @private */ @@ -163,6 +170,14 @@ export class ExternalSource extends UploaderBlock { }); } + /** @private */ + setupL10n() { + this._messageBridge?.send({ + type: 'set-locale-definition', + localeDefinition: this.cfg.localeName, + }); + } + /** @private */ remoteUrl() { const { pubkey, remoteTabSessionKey, socialBaseUrl, multiple } = this.cfg; diff --git a/blocks/ExternalSource/types.js b/blocks/ExternalSource/types.js index 3c28e3f9..7d4915ea 100644 --- a/blocks/ExternalSource/types.js +++ b/blocks/ExternalSource/types.js @@ -131,6 +131,10 @@ * theme: Record; * } * | { + * type: 'set-locale-definition'; + * localeDefinition: string; + * } + * | { * type: 'set-embed-css'; * css: Partial; * }} OutputMessage