Merge remote-tracking branch 'upstream/develop' into task/color-cleanup-1
This commit is contained in:
commit
aeaed1e612
5 changed files with 11 additions and 20 deletions
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* @matrix-org/element-web
|
1
.node-version
Normal file
1
.node-version
Normal file
|
@ -0,0 +1 @@
|
||||||
|
14
|
|
@ -60,7 +60,6 @@ import Modal from './Modal';
|
||||||
import { _t } from './languageHandler';
|
import { _t } from './languageHandler';
|
||||||
import dis from './dispatcher/dispatcher';
|
import dis from './dispatcher/dispatcher';
|
||||||
import WidgetUtils from './utils/WidgetUtils';
|
import WidgetUtils from './utils/WidgetUtils';
|
||||||
import WidgetEchoStore from './stores/WidgetEchoStore';
|
|
||||||
import SettingsStore from './settings/SettingsStore';
|
import SettingsStore from './settings/SettingsStore';
|
||||||
import { Jitsi } from "./widgets/Jitsi";
|
import { Jitsi } from "./widgets/Jitsi";
|
||||||
import { WidgetType } from "./widgets/WidgetType";
|
import { WidgetType } from "./widgets/WidgetType";
|
||||||
|
@ -86,6 +85,7 @@ import { randomUppercaseString, randomLowercaseString } from "matrix-js-sdk/src/
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
import SdkConfig from './SdkConfig';
|
import SdkConfig from './SdkConfig';
|
||||||
import { ensureDMExists, findDMForUser } from './createRoom';
|
import { ensureDMExists, findDMForUser } from './createRoom';
|
||||||
|
import { WidgetLayoutStore, Container } from './stores/widgets/WidgetLayoutStore';
|
||||||
import { getIncomingCallToastKey } from './toasts/IncomingCallToast';
|
import { getIncomingCallToastKey } from './toasts/IncomingCallToast';
|
||||||
import ToastStore from './stores/ToastStore';
|
import ToastStore from './stores/ToastStore';
|
||||||
import IncomingCallToast from "./toasts/IncomingCallToast";
|
import IncomingCallToast from "./toasts/IncomingCallToast";
|
||||||
|
@ -1011,14 +1011,10 @@ export default class CallHandler extends EventEmitter {
|
||||||
|
|
||||||
// prevent double clicking the call button
|
// prevent double clicking the call button
|
||||||
const room = MatrixClientPeg.get().getRoom(roomId);
|
const room = MatrixClientPeg.get().getRoom(roomId);
|
||||||
const currentJitsiWidgets = WidgetUtils.getRoomWidgetsOfType(room, WidgetType.JITSI);
|
const jitsiWidget = WidgetStore.instance.getApps(roomId).find((app) => WidgetType.JITSI.matches(app.type));
|
||||||
const hasJitsi = currentJitsiWidgets.length > 0
|
if (jitsiWidget) {
|
||||||
|| WidgetEchoStore.roomHasPendingWidgetsOfType(roomId, currentJitsiWidgets, WidgetType.JITSI);
|
// If there already is a Jitsi widget pin it
|
||||||
if (hasJitsi) {
|
WidgetLayoutStore.instance.moveToContainer(room, jitsiWidget, Container.Top);
|
||||||
Modal.createTrackedDialog('Call already in progress', '', ErrorDialog, {
|
|
||||||
title: _t('Call in Progress'),
|
|
||||||
description: _t('A call is currently being placed!'),
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,6 @@
|
||||||
"Unable to transfer call": "Unable to transfer call",
|
"Unable to transfer call": "Unable to transfer call",
|
||||||
"Transfer Failed": "Transfer Failed",
|
"Transfer Failed": "Transfer Failed",
|
||||||
"Failed to transfer call": "Failed to transfer call",
|
"Failed to transfer call": "Failed to transfer call",
|
||||||
"Call in Progress": "Call in Progress",
|
|
||||||
"A call is currently being placed!": "A call is currently being placed!",
|
|
||||||
"Permission Required": "Permission Required",
|
"Permission Required": "Permission Required",
|
||||||
"You do not have permission to start a conference call in this room": "You do not have permission to start a conference call in this room",
|
"You do not have permission to start a conference call in this room": "You do not have permission to start a conference call in this room",
|
||||||
"End conference": "End conference",
|
"End conference": "End conference",
|
||||||
|
|
13
src/theme.js
13
src/theme.js
|
@ -171,15 +171,10 @@ export async function setTheme(theme) {
|
||||||
// look for the stylesheet elements.
|
// look for the stylesheet elements.
|
||||||
// styleElements is a map from style name to HTMLLinkElement.
|
// styleElements is a map from style name to HTMLLinkElement.
|
||||||
const styleElements = Object.create(null);
|
const styleElements = Object.create(null);
|
||||||
let a;
|
const themes = Array.from(document.querySelectorAll('[data-mx-theme]'));
|
||||||
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
|
themes.forEach(theme => {
|
||||||
const href = a.getAttribute("href");
|
styleElements[theme.attributes['data-mx-theme'].value.toLowerCase()] = theme;
|
||||||
// shouldn't we be using the 'title' tag rather than the href?
|
});
|
||||||
const match = href && href.match(/^bundles\/.*\/theme-(.*)\.css$/);
|
|
||||||
if (match) {
|
|
||||||
styleElements[match[1]] = a;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(stylesheetName in styleElements)) {
|
if (!(stylesheetName in styleElements)) {
|
||||||
throw new Error("Unknown theme " + stylesheetName);
|
throw new Error("Unknown theme " + stylesheetName);
|
||||||
|
|
Loading…
Reference in a new issue