Merge remote-tracking branch 'origin/livekit' into dbkr/ppe2ee
This commit is contained in:
88
.github/workflows/netlify-fullmesh.yaml
vendored
88
.github/workflows/netlify-fullmesh.yaml
vendored
@@ -1,88 +0,0 @@
|
|||||||
name: Netlify Main
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["Build"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
branches:
|
|
||||||
- "full-mesh"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
deployments: write
|
|
||||||
# Important: the 'branches' filter above will match the 'main' branch on forks,
|
|
||||||
# so we need to check the head repo too in order to not run on PRs from forks
|
|
||||||
# We check the branch name again too just for completeness
|
|
||||||
# (Is there a nicer way to see if a PR is from a fork?)
|
|
||||||
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'full-mesh'
|
|
||||||
steps:
|
|
||||||
- name: Create Deployment
|
|
||||||
uses: bobheadxi/deployments@v1
|
|
||||||
id: deployment
|
|
||||||
with:
|
|
||||||
step: start
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
env: main-branch-cd
|
|
||||||
ref: ${{ github.event.workflow_run.head_sha }}
|
|
||||||
|
|
||||||
- name: "Download artifact"
|
|
||||||
uses: actions/github-script@v6.4.1
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
run_id: ${{ github.event.workflow_run.id }},
|
|
||||||
});
|
|
||||||
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
|
||||||
return artifact.name == "build"
|
|
||||||
})[0];
|
|
||||||
const download = await github.rest.actions.downloadArtifact({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
artifact_id: matchArtifact.id,
|
|
||||||
archive_format: 'zip',
|
|
||||||
});
|
|
||||||
const fs = require('fs');
|
|
||||||
fs.writeFileSync('${{github.workspace}}/build.zip', Buffer.from(download.data));
|
|
||||||
|
|
||||||
- name: Extract Artifacts
|
|
||||||
run: unzip -d dist build.zip && rm build.zip
|
|
||||||
|
|
||||||
- name: Add redirects file
|
|
||||||
# We fetch from github directly as we don't bother checking out the repo
|
|
||||||
run: curl -s https://raw.githubusercontent.com/vector-im/element-call/main/config/netlify_redirects > dist/_redirects
|
|
||||||
|
|
||||||
- name: Add config file
|
|
||||||
run: curl -s https://raw.githubusercontent.com/vector-im/element-call/main/config/element_io_develop.json > dist/config.json
|
|
||||||
|
|
||||||
- name: Deploy to Netlify
|
|
||||||
id: netlify
|
|
||||||
uses: nwtgck/actions-netlify@v2.1.0
|
|
||||||
with:
|
|
||||||
publish-dir: dist
|
|
||||||
deploy-message: "Deploy from GitHub Actions"
|
|
||||||
production-branch: main
|
|
||||||
production-deploy: true
|
|
||||||
# These don't work because we're in workflow_run
|
|
||||||
enable-pull-request-comment: false
|
|
||||||
enable-commit-comment: false
|
|
||||||
github-deployment-environment: main
|
|
||||||
env:
|
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
|
||||||
timeout-minutes: 1
|
|
||||||
|
|
||||||
- name: Update deployment status
|
|
||||||
uses: bobheadxi/deployments@v1
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
step: finish
|
|
||||||
override: false
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
status: ${{ job.status }}
|
|
||||||
env: ${{ steps.deployment.outputs.env }}
|
|
||||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
|
||||||
env_url: ${{ steps.netlify.outputs.deploy-url }}
|
|
||||||
87
.github/workflows/netlify-livekit.yaml
vendored
87
.github/workflows/netlify-livekit.yaml
vendored
@@ -1,87 +0,0 @@
|
|||||||
name: Netlify LiveKit
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ["Build"]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
branches:
|
|
||||||
- "livekit"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
deployments: write
|
|
||||||
# Important: the 'branches' filter above will match the 'livekit' branch on forks,
|
|
||||||
# so we need to check the head repo too in order to not run on PRs from forks
|
|
||||||
# We check the branch name again too just for completeness
|
|
||||||
# (Is there a nicer way to see if a PR is from a fork?)
|
|
||||||
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'livekit'
|
|
||||||
steps:
|
|
||||||
- name: Create Deployment
|
|
||||||
uses: bobheadxi/deployments@v1
|
|
||||||
id: deployment
|
|
||||||
with:
|
|
||||||
step: start
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
env: livekit-experiment-branch-cd
|
|
||||||
ref: ${{ github.event.workflow_run.head_sha }}
|
|
||||||
|
|
||||||
- name: "Download artifact"
|
|
||||||
uses: actions/github-script@v6.4.1
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
run_id: ${{ github.event.workflow_run.id }},
|
|
||||||
});
|
|
||||||
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
|
||||||
return artifact.name == "build"
|
|
||||||
})[0];
|
|
||||||
const download = await github.rest.actions.downloadArtifact({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
artifact_id: matchArtifact.id,
|
|
||||||
archive_format: 'zip',
|
|
||||||
});
|
|
||||||
const fs = require('fs');
|
|
||||||
fs.writeFileSync('${{github.workspace}}/build.zip', Buffer.from(download.data));
|
|
||||||
|
|
||||||
- name: Extract Artifacts
|
|
||||||
run: unzip -d dist build.zip && rm build.zip
|
|
||||||
|
|
||||||
- name: Add redirects file
|
|
||||||
# We fetch from github directly as we don't bother checking out the repo
|
|
||||||
run: curl -s https://raw.githubusercontent.com/vector-im/element-call/livekit/config/netlify_redirects > dist/_redirects
|
|
||||||
|
|
||||||
- name: Add config file
|
|
||||||
run: curl -s https://raw.githubusercontent.com/vector-im/element-call/livekit/config/element_io_preview.json > dist/config.json
|
|
||||||
|
|
||||||
- name: Deploy to Netlify
|
|
||||||
id: netlify
|
|
||||||
uses: nwtgck/actions-netlify@v2.1.0
|
|
||||||
with:
|
|
||||||
publish-dir: dist
|
|
||||||
deploy-message: "Deploy from GitHub Actions"
|
|
||||||
production-branch: livekit
|
|
||||||
production-deploy: true
|
|
||||||
# These don't work because we're in workflow_run
|
|
||||||
enable-pull-request-comment: false
|
|
||||||
enable-commit-comment: false
|
|
||||||
env:
|
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
||||||
NETLIFY_SITE_ID: e3b9fa82-c040-4db6-b4bf-42b524d57423
|
|
||||||
timeout-minutes: 1
|
|
||||||
|
|
||||||
- name: Update deployment status
|
|
||||||
uses: bobheadxi/deployments@v1
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
step: finish
|
|
||||||
override: false
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
status: ${{ job.status }}
|
|
||||||
env: ${{ steps.deployment.outputs.env }}
|
|
||||||
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
|
|
||||||
env_url: ${{ steps.netlify.outputs.deploy-url }}
|
|
||||||
@@ -88,7 +88,6 @@
|
|||||||
"@testing-library/react": "^14.0.0",
|
"@testing-library/react": "^14.0.0",
|
||||||
"@testing-library/user-event": "^14.5.1",
|
"@testing-library/user-event": "^14.5.1",
|
||||||
"@types/content-type": "^1.1.5",
|
"@types/content-type": "^1.1.5",
|
||||||
"@types/d3": "^7.4.0",
|
|
||||||
"@types/dom-screen-wake-lock": "^1.0.1",
|
"@types/dom-screen-wake-lock": "^1.0.1",
|
||||||
"@types/dompurify": "^3.0.2",
|
"@types/dompurify": "^3.0.2",
|
||||||
"@types/grecaptcha": "^3.0.4",
|
"@types/grecaptcha": "^3.0.4",
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2023 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.glass {
|
|
||||||
border-radius: 36px;
|
|
||||||
padding: 11px;
|
|
||||||
border: 1px solid var(--cpd-color-alpha-gray-400);
|
|
||||||
background: var(--cpd-color-alpha-gray-400);
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.glass > * {
|
|
||||||
border-radius: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.glass.frosted {
|
|
||||||
backdrop-filter: blur(20px);
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2023 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 {
|
|
||||||
ComponentPropsWithoutRef,
|
|
||||||
ReactNode,
|
|
||||||
forwardRef,
|
|
||||||
Children,
|
|
||||||
} from "react";
|
|
||||||
import classNames from "classnames";
|
|
||||||
|
|
||||||
import styles from "./Glass.module.css";
|
|
||||||
|
|
||||||
interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
||||||
children: ReactNode;
|
|
||||||
className?: string;
|
|
||||||
/**
|
|
||||||
* Increases the blur effect.
|
|
||||||
* @default false
|
|
||||||
*/
|
|
||||||
frosted?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a border of glass around a child component.
|
|
||||||
*/
|
|
||||||
export const Glass = forwardRef<HTMLDivElement, Props>(
|
|
||||||
({ frosted = false, children, className, ...rest }, ref) => (
|
|
||||||
<div
|
|
||||||
ref={ref}
|
|
||||||
className={classNames(className, styles.glass, {
|
|
||||||
[styles.frosted]: frosted,
|
|
||||||
})}
|
|
||||||
{...rest}
|
|
||||||
>
|
|
||||||
{Children.only(children)}
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
);
|
|
||||||
@@ -29,12 +29,11 @@ import { Drawer } from "vaul";
|
|||||||
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
||||||
import CloseIcon from "@vector-im/compound-design-tokens/icons/close.svg?react";
|
import CloseIcon from "@vector-im/compound-design-tokens/icons/close.svg?react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { Heading } from "@vector-im/compound-web";
|
import { Heading, Glass } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import styles from "./Modal.module.css";
|
import styles from "./Modal.module.css";
|
||||||
import overlayStyles from "./Overlay.module.css";
|
import overlayStyles from "./Overlay.module.css";
|
||||||
import { useMediaQuery } from "./useMediaQuery";
|
import { useMediaQuery } from "./useMediaQuery";
|
||||||
import { Glass } from "./Glass";
|
|
||||||
|
|
||||||
// TODO: Support tabs
|
// TODO: Support tabs
|
||||||
export interface Props extends AriaDialogProps {
|
export interface Props extends AriaDialogProps {
|
||||||
@@ -118,7 +117,6 @@ export const Modal: FC<Props> = ({
|
|||||||
/>
|
/>
|
||||||
<DialogContent asChild {...rest}>
|
<DialogContent asChild {...rest}>
|
||||||
<Glass
|
<Glass
|
||||||
frosted
|
|
||||||
className={classNames(
|
className={classNames(
|
||||||
className,
|
className,
|
||||||
overlayStyles.overlay,
|
overlayStyles.overlay,
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ limitations under the License.
|
|||||||
import { ComponentPropsWithoutRef, FC } from "react";
|
import { ComponentPropsWithoutRef, FC } from "react";
|
||||||
import { Button } from "@vector-im/compound-web";
|
import { Button } from "@vector-im/compound-web";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import UserAddSolidIcon from "@vector-im/compound-design-tokens/icons/user-add-solid.svg?react";
|
import UserAddIcon from "@vector-im/compound-design-tokens/icons/user-add.svg?react";
|
||||||
|
|
||||||
export const InviteButton: FC<
|
export const InviteButton: FC<
|
||||||
Omit<ComponentPropsWithoutRef<"button">, "children">
|
Omit<ComponentPropsWithoutRef<"button">, "children">
|
||||||
> = (props) => {
|
> = (props) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Button kind="secondary" size="sm" Icon={UserAddSolidIcon} {...props}>
|
<Button kind="secondary" size="sm" Icon={UserAddIcon} {...props}>
|
||||||
{t("Invite")}
|
{t("Invite")}
|
||||||
</Button>
|
</Button>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ import {
|
|||||||
} from "livekit-client";
|
} from "livekit-client";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
import { logger } from "matrix-js-sdk/src/logger";
|
||||||
|
import { Glass } from "@vector-im/compound-web";
|
||||||
|
|
||||||
import { Avatar } from "../Avatar";
|
import { Avatar } from "../Avatar";
|
||||||
import styles from "./VideoPreview.module.css";
|
import styles from "./VideoPreview.module.css";
|
||||||
import { useMediaDevices } from "../livekit/MediaDevicesContext";
|
import { useMediaDevices } from "../livekit/MediaDevicesContext";
|
||||||
import { MuteStates } from "./MuteStates";
|
import { MuteStates } from "./MuteStates";
|
||||||
import { Glass } from "../Glass";
|
|
||||||
import { useMediaQuery } from "../useMediaQuery";
|
import { useMediaQuery } from "../useMediaQuery";
|
||||||
|
|
||||||
export type MatrixInfo = {
|
export type MatrixInfo = {
|
||||||
|
|||||||
Reference in New Issue
Block a user