diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
index e356c40..86557ef 100644
--- a/.github/workflows/publish.yaml
+++ b/.github/workflows/publish.yaml
@@ -32,10 +32,14 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6
+
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
+ platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
diff --git a/Dockerfile b/Dockerfile
index e31506c..eb7e7a5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:16-buster as builder
+FROM --platform=$BUILDPLATFORM node:16-buster as builder
WORKDIR /src
diff --git a/package.json b/package.json
index e50037f..4f0309e 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"build-storybook": "build-storybook",
"prettier:check": "prettier -c src",
"prettier:format": "prettier -w src",
+ "lint": "yarn lint:types && yarn lint:js",
"lint:js": "eslint --max-warnings 0 src",
"lint:types": "tsc"
},
@@ -36,7 +37,7 @@
"classnames": "^2.3.1",
"color-hash": "^2.0.1",
"events": "^3.3.0",
- "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#aa0d3bd1f5a006d151f826e6b8c5f286abb6e960",
+ "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#404f8e130e44a78b0159c55902df1b129b3816d1",
"mermaid": "^8.13.8",
"normalize.css": "^8.0.1",
"pako": "^2.0.4",
diff --git a/src/Header.jsx b/src/Header.jsx
index 85039de..d4f83e5 100644
--- a/src/Header.jsx
+++ b/src/Header.jsx
@@ -1,5 +1,5 @@
import classNames from "classnames";
-import React, { useRef } from "react";
+import React, { useCallback, useRef } from "react";
import { Link } from "react-router-dom";
import styles from "./Header.module.css";
import { ReactComponent as Logo } from "./icons/Logo.svg";
@@ -8,6 +8,9 @@ import { ReactComponent as ArrowLeftIcon } from "./icons/ArrowLeft.svg";
import { useButton } from "@react-aria/button";
import { Subtitle } from "./typography/Typography";
import { Avatar } from "./Avatar";
+import { IncompatibleVersionModal } from "./IncompatibleVersionModal";
+import { useModalTriggerState } from "./Modal";
+import { Button } from "./button";
export function Header({ children, className, ...rest }) {
return (
@@ -84,3 +87,25 @@ export function RoomSetupHeaderInfo({ roomName, avatarUrl, ...rest }) {
);
}
+
+export function VersionMismatchWarning({ users, room }) {
+ const { modalState, modalProps } = useModalTriggerState();
+
+ const onDetailsClick = useCallback(() => {
+ modalState.open();
+ }, [modalState]);
+
+ if (users.size === 0) return null;
+
+ return (
+
+ Incomaptible versions!
+
+ {modalState.isOpen && (
+
+ )}
+
+ );
+}
diff --git a/src/Header.module.css b/src/Header.module.css
index 04313d9..7f94581 100644
--- a/src/Header.module.css
+++ b/src/Header.module.css
@@ -104,6 +104,24 @@
flex-shrink: 0;
}
+.versionMismatchWarning {
+ padding-left: 15px;
+}
+
+.versionMismatchWarning::before {
+ content: "";
+ display: inline-block;
+ position: relative;
+ top: 1px;
+ width: 16px;
+ height: 16px;
+ mask-image: url("./icons/AlertTriangleFilled.svg");
+ mask-repeat: no-repeat;
+ mask-size: contain;
+ background-color: var(--alert);
+ padding-right: 5px;
+}
+
@media (min-width: 800px) {
.headerLogo,
.roomAvatar,
diff --git a/src/IncompatibleVersionModal.tsx b/src/IncompatibleVersionModal.tsx
new file mode 100644
index 0000000..6cc5615
--- /dev/null
+++ b/src/IncompatibleVersionModal.tsx
@@ -0,0 +1,48 @@
+/*
+Copyright 2022 New Vector Ltd
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import { Room } from "matrix-js-sdk";
+import React from "react";
+
+import { Modal, ModalContent } from "./Modal";
+import { Body } from "./typography/Typography";
+
+interface Props {
+ userIds: Set;
+ room: Room;
+}
+
+export const IncompatibleVersionModal: React.FC = ({
+ userIds,
+ room,
+ ...rest
+}) => {
+ const userLis = Array.from(userIds).map((u) => (
+
{room.getMember(u).name}
+ ));
+
+ return (
+
+
+
+ Other users are trying to join this call from incompatible versions.
+ These users should ensure that they have refreshed their browsers:
+