Skip to content

Commit

Permalink
Merge tag 'v1.9.3' into sc
Browse files Browse the repository at this point in the history
* Convert the "Cryptography" settings panel to an HTML table to assist screen reader users. ([\element-hq#6968](matrix-org/matrix-react-sdk#6968)). Contributed by [andybalaam](https://github.com/andybalaam).
* Swap order of private space creation and tweak copy ([\element-hq#6967](matrix-org/matrix-react-sdk#6967)). Fixes element-hq#18768 and element-hq#18768.
* Add spacing to Room settings - Notifications subsection ([\#6962](matrix-org/matrix-react-sdk#6962)). Contributed by [CicadaCinema](https://github.com/CicadaCinema).
* Use HTML tables for some tabular user interface areas, to assist with screen reader use ([\element-hq#6955](matrix-org/matrix-react-sdk#6955)). Contributed by [andybalaam](https://github.com/andybalaam).
* Fix space invite edge cases ([\element-hq#6884](matrix-org/matrix-react-sdk#6884)). Fixes element-hq#19010 element-hq#17345 and element-hq#19010.
* Allow options to cascade kicks/bans throughout spaces ([\element-hq#6829](matrix-org/matrix-react-sdk#6829)). Fixes element-hq#18969 and element-hq#18969.
* Make public space alias field mandatory again ([\element-hq#6921](matrix-org/matrix-react-sdk#6921)). Fixes element-hq#19003 and element-hq#19003.
* Add progress bar to restricted room upgrade dialog ([\element-hq#6919](matrix-org/matrix-react-sdk#6919)). Fixes element-hq#19146 and element-hq#19146.
* Add customisation point for visibility of invites and room creation ([\element-hq#6922](matrix-org/matrix-react-sdk#6922)). Fixes element-hq#19331 and element-hq#19331.
* Inhibit `Unable to get validated threepid` error during UIA ([\element-hq#6928](matrix-org/matrix-react-sdk#6928)). Fixes element-hq#18883 and element-hq#18883.
* Tweak room list skeleton UI height and behaviour ([\element-hq#6926](matrix-org/matrix-react-sdk#6926)). Fixes element-hq#18231 element-hq#16581 and element-hq#18231.
* If public room creation fails, retry without publishing it ([\#6872](matrix-org/matrix-react-sdk#6872)). Fixes element-hq#19194 and element-hq#19194. Contributed by [AndrewFerr](https://github.com/AndrewFerr).
* Iterate invite your teammates to Space view ([\element-hq#6925](matrix-org/matrix-react-sdk#6925)). Fixes element-hq#18772 and element-hq#18772.
* Make placeholder more grey when no input ([\element-hq#6840](matrix-org/matrix-react-sdk#6840)). Fixes element-hq#17243 and element-hq#17243. Contributed by [wlach](https://github.com/wlach).
* Respect tombstones in locally known rooms for Space children ([\element-hq#6906](matrix-org/matrix-react-sdk#6906)). Fixes element-hq#19246 element-hq#19256 and element-hq#19246.
* Improve emoji shortcodes generated from annotations ([\element-hq#6907](matrix-org/matrix-react-sdk#6907)). Fixes element-hq#19304 and element-hq#19304.
* Hide kick & ban options in UserInfo when looking at own profile ([\element-hq#6911](matrix-org/matrix-react-sdk#6911)). Fixes element-hq#19066 and element-hq#19066.
* Add progress bar to Community to Space migration tool ([\element-hq#6887](matrix-org/matrix-react-sdk#6887)). Fixes element-hq#19216 and element-hq#19216.
* Fix leave space cancel button exploding ([\element-hq#6966](matrix-org/matrix-react-sdk#6966)).
* Fix edge case behaviour of the space join spinner for guests ([\element-hq#6972](matrix-org/matrix-react-sdk#6972)). Fixes element-hq#19359 and element-hq#19359.
* Convert emoticon to emoji at the end of a line on send even if the cursor isn't there ([\element-hq#6965](matrix-org/matrix-react-sdk#6965)). Contributed by [SimonBrandner](https://github.com/SimonBrandner).
* Fix text overflows button on Home page ([\#6898](matrix-org/matrix-react-sdk#6898)). Fixes element-hq#19180 and element-hq#19180. Contributed by [oliver-pham](https://github.com/oliver-pham).
* Space Room View should react to join rule changes down /sync ([\#6945](matrix-org/matrix-react-sdk#6945)). Fixes element-hq#19390 and element-hq#19390.
* Hide leave section button if user isn't in the room e.g peeking ([\element-hq#6920](matrix-org/matrix-react-sdk#6920)). Fixes element-hq#17410 and element-hq#17410.
* Fix bug where room list would get stuck showing no rooms ([\element-hq#6939](matrix-org/matrix-react-sdk#6939)). Fixes element-hq#19373 and element-hq#19373.
* Update room settings dialog title when room name changes ([\element-hq#6916](matrix-org/matrix-react-sdk#6916)). Fixes element-hq#17480 and element-hq#17480. Contributed by [psrpinto](https://github.com/psrpinto).
* Fix editing losing emote-ness and rainbow-ness of messages ([\element-hq#6931](matrix-org/matrix-react-sdk#6931)). Fixes element-hq#19350 and element-hq#19350.
* Remove semicolon from notifications panel ([\element-hq#6930](matrix-org/matrix-react-sdk#6930)). Contributed by [robintown](https://github.com/robintown).
* Prevent profile image in left panel's backdrop from being selected ([\element-hq#6924](matrix-org/matrix-react-sdk#6924)). Contributed by [rom4nik](https://github.com/rom4nik).
* Validate that the phone number verification field is filled before allowing user to submit ([\element-hq#6918](matrix-org/matrix-react-sdk#6918)). Fixes element-hq#19316 and element-hq#19316. Contributed by [VFermat](https://github.com/VFermat).
* Updated how save button becomes disabled in room settings to listen for all fields instead of the most recent ([\element-hq#6917](matrix-org/matrix-react-sdk#6917)). Contributed by [LoganArnett](https://github.com/LoganArnett).
* Use FocusLock around ContextMenus to simplify focus management ([\element-hq#6311](matrix-org/matrix-react-sdk#6311)). Fixes element-hq#19259 and element-hq#19259.
* Fix space hierarchy pagination ([\element-hq#6908](matrix-org/matrix-react-sdk#6908)). Fixes element-hq#19276 and element-hq#19276.
* Fix spaces keyboard shortcuts not working for last space ([\element-hq#6909](matrix-org/matrix-react-sdk#6909)). Fixes element-hq#19255 and element-hq#19255.
* Use fallback avatar only for DMs with 2 people. ([\element-hq#6895](matrix-org/matrix-react-sdk#6895)). Fixes element-hq#18747 and element-hq#18747. Contributed by [andybalaam](https://github.com/andybalaam).
  • Loading branch information
su-ex committed Oct 25, 2021
2 parents 4cbdff9 + e794234 commit d37fc69
Show file tree
Hide file tree
Showing 20 changed files with 706 additions and 495 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ body:
- type: textarea
id: result
attributes:
label: What happened?
label: Outcome
placeholder: Tell us what went wrong
value: |
### What did you expect?
#### What did you expect?
### What happened?
#### What happened instead?
validations:
required: true
- type: input
Expand Down Expand Up @@ -65,9 +65,9 @@ body:
- type: dropdown
id: rageshake
attributes:
label: Have you submitted a rageshake?
label: Will you send logs?
description: |
Did you know that you can send a /rageshake command from your application to submit logs for this issue? Trigger the defect, then type /rageshake into the message entry area followed by a description of the problem and send the command. This will automatically submit anonymous logs to the developers.
Did you know that you can send a /rageshake command from your application to submit logs for this issue? Trigger the defect, then type `/rageshake` into the message input area followed by a description of the problem and send the command. You will be able to add a link to this defect report and submit anonymous logs to the developers.
options:
- 'Yes'
- 'No'
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ body:
- type: textarea
id: result
attributes:
label: What happened?
label: Outcome
placeholder: Tell us what went wrong
value: |
### What did you expect?
#### What did you expect?
### What happened?
#### What happened instead?
validations:
required: true
- type: input
Expand Down Expand Up @@ -65,9 +65,9 @@ body:
- type: dropdown
id: rageshake
attributes:
label: Have you submitted a rageshake?
label: Will you send logs?
description: |
Did you know that you can send a /rageshake command from the web applicaiton to submit logs for this issue? Trigger the defect, then type /rageshake into the message entry area followed by a description of the problem and send the command. This will automatically submit anonymous logs to the developers.
Did you know that you can send a /rageshake command from the web application to submit logs for this issue? Trigger the defect, then type `/rageshake` into the message input area followed by a description of the problem and send the command. You will be able to add a link to this defect report and submit anonymous logs to the developers.
options:
- 'Yes'
- 'No'
Expand Down
130 changes: 130 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion docs/labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ Enables sending hidden read receipts as per [MSC2285](https://github.com/matrix-

Adds a "Message layout" section under `Settings -> Appearance`, where the user can select their preferred message layout (e.g. IRC or Modern). Additionally, adds a new "Message bubbles" layout.

## Pseudonymous Analytics opt-in
## Pseudonymous Analytics opt-in (`feature_pseudonymous_analytics_opt_in`)

Opts in to collection of pseudonymous analytics data via Posthog. See https://github.com/matrix-org/matrix-react-sdk/pull/6495

## Polls (`feature_polls`) [In Development]

Polls are a way to gauge interest from your community about a certain topic with a simple voting mechanic
within the message timeline. Note that this feature is currently under active development and therefore is
entirely incomplete and may not work at all - it is not recommended for general use at this time.

Bug reports, feature requests, etc are not currently accepted for this feature flag. A later stage of
development will provide opportunities for feedback.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.9.2",
"version": "1.9.3",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
Expand Down Expand Up @@ -58,11 +58,10 @@
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz",
"browser-request": "^0.3.3",
"gfm.css": "^1.1.2",
"highlight.js": "^10.5.0",
"jsrsasign": "^10.2.0",
"katex": "^0.12.0",
"matrix-js-sdk": "14.0.1",
"matrix-react-sdk": "3.32.1",
"matrix-js-sdk": "15.0.0",
"matrix-react-sdk": "3.33.0",
"matrix-widget-api": "^0.1.0-beta.16",
"prop-types": "^15.7.2",
"react": "17.0.2",
Expand Down
2 changes: 2 additions & 0 deletions src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

import "matrix-react-sdk/src/@types/global"; // load matrix-react-sdk's type extensions first
import type { Renderer } from "react-dom";
import type { logger } from "matrix-js-sdk/src/logger";

type ElectronChannel =
"app_onAction" |
Expand All @@ -36,6 +37,7 @@ type ElectronChannel =
declare global {
interface Window {
mxSendRageshake: (text: string, withLogs?: boolean) => void;
matrixLogger: typeof logger;
matrixChat: ReturnType<Renderer>;

// electron-only
Expand Down
6 changes: 4 additions & 2 deletions src/i18n/strings/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Dismiss": "Hylkää",
"Unknown device": "Tuntematon laite",
"Welcome to Element": "Tervetuloa Element-sovellukseen",
"You need to be using HTTPS to place a screen-sharing call.": "Sinun täytyy käyttää HTTPS-yhteyttä, jotta voit jakaa ruudun puhelussa.",
"You need to be using HTTPS to place a screen-sharing call.": "Sinun täytyy käyttää HTTPS-yhteyttä, jotta voit jakaa näytön puhelussa.",
"powered by Matrix": "moottorina Matrix",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Hajautettua ja salattua viestintää Matrix-teknologialla",
"Sign In": "Kirjaudu",
Expand Down Expand Up @@ -32,5 +32,7 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Element-asetuksesi sisältävät epäkelpoa JSONia. Korjaa ongelma ja lataa sivu uudelleen.",
"Powered by Matrix": "Moottorina Matrix",
"Your browser can't run %(brand)s": "%(brand)s ei toimi selaimessasi",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s käyttää edistyneitä selaimen ominaisuuksia, joita nykyinen selaimesi ei tue."
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s käyttää edistyneitä selaimen ominaisuuksia, joita nykyinen selaimesi ei tue.",
"Use %(brand)s on mobile": "Käytä %(brand)sia mobiilisti",
"Switch to space by number": "Vaihda avaruuteen käyttäen numeroa"
}
4 changes: 2 additions & 2 deletions src/i18n/strings/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "Konfigurasi Element Anda mengandung JSON yang tidak valid. Mohon perbaiki masalahnya dan muat ulang halaman nya.",
"Invalid configuration: no default server specified.": "Konfigurasi tidak valid: server default belum ditentukan.",
"Missing indexeddb worker script!": "Tidak ada script worker indexeddb!",
"Explore rooms": "Jelajahi ruang",
"Explore rooms": "Jelajahi ruangan",
"Create Account": "Buat Akun",
"Switch to space by number": "Beralih ke ruang dengan nomor",
"Go to your browser to complete Sign In": "Buka browser Anda untuk menyelesaikan Masuk",
Expand All @@ -22,7 +22,7 @@
"Your browser can't run %(brand)s": "Browser Anda tidak bisa menjalankan %(brand)s",
"Unsupported browser": "Browser tidak didukung",
"Use %(brand)s on mobile": "Gunakan %(brand)s di ponsel",
"Powered by Matrix": "Didukung oleh Matrix",
"Powered by Matrix": "Diberdayakan oleh Matrix",
"%(appName)s (%(browserName)s, %(osName)s)": "%(appName)s (%(browserName)s, %(osName)s)",
"%(brand)s Desktop (%(platformName)s)": "%(brand)s Desktop (%(platformName)s)",
"Previous/next recently visited room or community": "Ruangan atau komunitas yang baru saja dikunjungi sebelum/berikutnya",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/strings/kab.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
"Open": "Ldi",
"Your browser can't run %(brand)s": "Iminig-inek·inem ur isselkan ara %(brand)s",
"%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s isseqdac timahilin n yiminig leqqayen ur yessefrak ara yiminig-ik·im amiran.",
"Powered by Matrix": "Iteddu s lmendad n Matrix"
"Powered by Matrix": "Iteddu s lmendad n Matrix",
"Use %(brand)s on mobile": "Seqdec %(brand)s deg tiliɣri",
"Switch to space by number": "Ddu ɣer space s uṭṭun"
}
2 changes: 1 addition & 1 deletion src/i18n/strings/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Create Account": "Создать учётную запись",
"Explore rooms": "Список комнат",
"Unexpected error preparing the app. See console for details.": "Неожиданная ошибка при подготовке приложения. Подробности см. в консоли.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Неверная конфигурация: может указывать только один из следующих параметров: default_server_config, default_server_name или default_hs_url.",
"Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Неверная конфигурация: можно указывать только один из следующих параметров: default_server_config, default_server_name или default_hs_url.",
"Invalid configuration: no default server specified.": "Неверная конфигурация: сервер по умолчанию не указан.",
"The message from the parser is: %(message)s": "Сообщение из парсера: %(message)s",
"Invalid JSON": "Нерабочий JSON",
Expand Down
37 changes: 20 additions & 17 deletions src/vector/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery";
import * as Lifecycle from "matrix-react-sdk/src/Lifecycle";
import type MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixChat";
import SdkConfig from "matrix-react-sdk/src/SdkConfig";
import { logger } from "matrix-js-sdk/src/logger";

import { parseQs, parseQsFromFragment } from './url_utils';
import VectorBasePlatform from "./platform/VectorBasePlatform";
import { createClient } from "matrix-js-sdk/src/matrix";

let lastLocationHashSet: string = null;

console.log(`Application is running in ${process.env.NODE_ENV} mode`);
logger.log(`Application is running in ${process.env.NODE_ENV} mode`);

window.matrixLogger = logger;

// Parse the given window.location and return parameters that can be used when calling
// MatrixChat.showScreen(screen, params)
Expand All @@ -55,7 +58,7 @@ function getScreenFromLocation(location: Location) {
function routeUrl(location: Location) {
if (!window.matrixChat) return;

console.log("Routing URL ", location.href);
logger.log("Routing URL ", location.href);
const s = getScreenFromLocation(location);
(window.matrixChat as MatrixChatType).showScreen(s.screen, s.params);
}
Expand All @@ -71,7 +74,7 @@ function onHashChange(ev: HashChangeEvent) {
// This will be called whenever the SDK changes screens,
// so a web page can update the URL bar appropriately.
function onNewScreen(screen: string, replaceLast = false) {
console.log("newscreen " + screen);
logger.log("newscreen " + screen);
const hash = '#/' + screen;
lastLocationHashSet = hash;

Expand Down Expand Up @@ -133,7 +136,7 @@ function onTokenLoginCompleted() {

url.searchParams.delete("loginToken");

console.log(`Redirecting to ${url.href} to drop loginToken from queryparams`);
logger.log(`Redirecting to ${url.href} to drop loginToken from queryparams`);
window.history.replaceState(null, "", url.href);
}

Expand All @@ -145,7 +148,7 @@ export async function loadApp(fragParams: {}) {
const params = parseQs(window.location);

const urlWithoutQuery = window.location.protocol + '//' + window.location.host + window.location.pathname;
console.log("Vector starting at " + urlWithoutQuery);
logger.log("Vector starting at " + urlWithoutQuery);

(platform as VectorBasePlatform).startUpdater();

Expand All @@ -158,7 +161,7 @@ export async function loadApp(fragParams: {}) {
const isReturningFromSso = !!params.loginToken;
const autoRedirect = config['sso_immediate_redirect'] === true;
if (!hasPossibleToken && !isReturningFromSso && autoRedirect) {
console.log("Bypassing app load to redirect to SSO");
logger.log("Bypassing app load to redirect to SSO");
const tempCli = createClient({
baseUrl: config['validated_server_config'].hsUrl,
idBaseUrl: config['validated_server_config'].isUrl,
Expand Down Expand Up @@ -188,7 +191,7 @@ export async function loadApp(fragParams: {}) {
async function verifyServerConfig() {
let validatedConfig;
try {
console.log("Verifying homeserver configuration");
logger.log("Verifying homeserver configuration");

// Note: the query string may include is_url and hs_url - we only respect these in the
// context of email validation. Because we don't respect them otherwise, we do not need
Expand Down Expand Up @@ -219,8 +222,8 @@ async function verifyServerConfig() {
}

if (hsUrl) {
console.log("Config uses a default_hs_url - constructing a default_server_config using this information");
console.warn(
logger.log("Config uses a default_hs_url - constructing a default_server_config using this information");
logger.warn(
"DEPRECATED CONFIG OPTION: In the future, default_hs_url will not be accepted. Please use " +
"default_server_config instead.",
);
Expand All @@ -239,13 +242,13 @@ async function verifyServerConfig() {

let discoveryResult = null;
if (wkConfig) {
console.log("Config uses a default_server_config - validating object");
logger.log("Config uses a default_server_config - validating object");
discoveryResult = await AutoDiscovery.fromDiscoveryConfig(wkConfig);
}

if (serverName) {
console.log("Config uses a default_server_name - doing .well-known lookup");
console.warn(
logger.log("Config uses a default_server_name - doing .well-known lookup");
logger.warn(
"DEPRECATED CONFIG OPTION: In the future, default_server_name will not be accepted. Please " +
"use default_server_config instead.",
);
Expand All @@ -256,10 +259,10 @@ async function verifyServerConfig() {
} catch (e) {
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) {
console.error(e);
console.warn("A session was found - suppressing config error and using the session's homeserver");
logger.error(e);
logger.warn("A session was found - suppressing config error and using the session's homeserver");

console.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
logger.log("Using pre-existing hsUrl and isUrl: ", { hsUrl, isUrl });
validatedConfig = await AutoDiscoveryUtils.validateServerConfigWithStaticUrls(hsUrl, isUrl, true);
} else {
// the user is not logged in, so scream
Expand All @@ -270,10 +273,10 @@ async function verifyServerConfig() {
validatedConfig.isDefault = true;

// Just in case we ever have to debug this
console.log("Using homeserver config:", validatedConfig);
logger.log("Using homeserver config:", validatedConfig);

// Add the newly built config to the actual config for use by the app
console.log("Updating SdkConfig with validated discovery information");
logger.log("Updating SdkConfig with validated discovery information");
SdkConfig.add({ "validated_server_config": validatedConfig });

return SdkConfig.get();
Expand Down
19 changes: 10 additions & 9 deletions src/vector/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ limitations under the License.
// Our own CSS (which is themed) is imported via separate webpack entry points
// in webpack.config.js
require('gfm.css/gfm.css');
require('highlight.js/styles/github.css');
require('katex/dist/katex.css');

/**
Expand All @@ -38,19 +37,21 @@ require('./localstorage-fix');
import { parseQsFromFragment } from "./url_utils";
import './modernizr';

import { logger } from "matrix-js-sdk/src/logger";

async function settled(...promises: Array<Promise<any>>) {
for (const prom of promises) {
try {
await prom;
} catch (e) {
console.error(e);
logger.error(e);
}
}
}

function checkBrowserFeatures() {
if (!window.Modernizr) {
console.error("Cannot check features - Modernizr global is missing.");
logger.error("Cannot check features - Modernizr global is missing.");
return false;
}

Expand All @@ -77,14 +78,14 @@ function checkBrowserFeatures() {
let featureComplete = true;
for (let i = 0; i < featureList.length; i++) {
if (window.Modernizr[featureList[i]] === undefined) {
console.error(
logger.error(
"Looked for feature '%s' but Modernizr has no results for this. " +
"Has it been configured correctly?", featureList[i],
);
return false;
}
if (window.Modernizr[featureList[i]] === false) {
console.error("Browser missing feature: '%s'", featureList[i]);
logger.error("Browser missing feature: '%s'", featureList[i]);
// toggle flag rather than return early so we log all missing features rather than just the first.
featureComplete = false;
}
Expand Down Expand Up @@ -173,13 +174,13 @@ async function start() {
// ##########################
if (!acceptBrowser) {
await new Promise<void>(resolve => {
console.error("Browser is missing required features.");
logger.error("Browser is missing required features.");
// take to a different landing page to AWOOOOOGA at the user
showIncompatibleBrowser(() => {
if (window.localStorage) {
window.localStorage.setItem('mx_accepts_unsupported_browser', String(true));
}
console.log("User accepts the compatibility risks.");
logger.log("User accepts the compatibility risks.");
resolve();
});
});
Expand Down Expand Up @@ -222,7 +223,7 @@ async function start() {
// run on the components.
await loadApp(fragparts.params);
} catch (err) {
console.error(err);
logger.error(err);
// Like the compatibility page, AWOOOOOGA at the user
// This uses the default brand since the app config is unavailable.
await showError(_t("Your Element is misconfigured"), [
Expand All @@ -232,7 +233,7 @@ async function start() {
}

start().catch(err => {
console.error(err);
logger.error(err);
// show the static error in an iframe to not lose any context / console data
// with some basic styling to make the iframe full page
delete document.body.style.height;
Expand Down
Loading

0 comments on commit d37fc69

Please sign in to comment.