Merge pull request #70 from superhero-com/features/forksync

Features/forksync
pull/27296/head
Badi Ifaoui 2024-02-27 13:43:23 +01:00 committed by GitHub
commit a849455e19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 882 additions and 1362 deletions

View File

@ -5,14 +5,3 @@
- [ ] Tests written for new code (and old code if feasible)
- [ ] Linter and other CI checks pass
- [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/element-hq/element-web/blob/develop/CONTRIBUTING.md))
<!--
If you would like to specify text for the changelog entry other than your PR title, add the following:
Notes: Add super cool feature
For PRs which *only* affect the desktop version, please use:
Notes: none
element-desktop notes: Add super cool feature
-->

3
.github/labels.yml vendored
View File

@ -226,6 +226,9 @@
- name: "Z-Fixed by Element Call"
description: "Issues which can be closed when we move to Element Call"
color: "ededed"
- name: "Z-Fixed-By-OIDC"
description: "Issues which can be closed when we move to OIDC"
color: "ededed"
- name: "Z-Flaky-Test"
description: "A test is raising false alarms"
color: "ededed"

View File

@ -91,7 +91,7 @@ jobs:
running-workflow-name: "Build & Deploy develop.element.io"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release).)*$
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare).)*$
# We keep the latest develop.tar.gz on R2 instead of relying on the github artifact uploaded earlier
# as the expires after 24h and requires auth to download.

View File

@ -14,3 +14,11 @@ jobs:
project: Issue triage
column: Incoming
repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
automate-project-columns-next:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/element-hq/projects/120
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}

View File

@ -137,9 +137,8 @@
"@types/tar-js": "^0.3.5",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"allchange": "^1.0.6",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"babel-jest": "^29.0.0",
"babel-loader": "^9.0.0",
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
@ -148,8 +147,8 @@
"concurrently": "^8.0.0",
"copy-webpack-plugin": "^12.0.0",
"cronstrue": "^2.41.0",
"css-loader": "^5.2.7",
"css-minimizer-webpack-plugin": "^5.0.1",
"css-loader": "^6.0.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"dotenv": "^16.0.2",
"eslint": "8.56.0",
"eslint-config-google": "^0.14.0",
@ -159,7 +158,7 @@
"eslint-plugin-matrix-org": "^1.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^50.0.0",
"eslint-plugin-unicorn": "^51.0.0",
"fake-indexeddb": "^5.0.0",
"fetch-mock": "9.11.0",
"fetch-mock-jest": "^1.5.1",
@ -177,19 +176,18 @@
"mkdirp": "^3.0.0",
"modernizr": "^3.12.0",
"node-fetch": "^2.6.7",
"postcss": "^8.4.31",
"postcss": "8.4.33",
"postcss-easings": "^2.0.0",
"postcss-hexrgba": "2.0.1",
"postcss-import": "^16.0.0",
"postcss-import": "16.0.0",
"postcss-loader": "^8.1.0",
"postcss-mixins": "^6.2.3",
"postcss-nested": "^4.2.3",
"postcss-preset-env": "^9.3.0",
"postcss-scss": "^4.0.4",
"postcss-simple-vars": "^7.0.1",
"prettier": "3.2.4",
"prettier": "3.2.5",
"process": "^0.11.10",
"proxy-agent": "^6.3.0",
"raw-loader": "^4.0.2",
"react-beautiful-dnd": "^13.1.0",
"rimraf": "^5.0.0",

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
#
# Script to perform a release of element-web.
set -e
cd "$(dirname "$0")"
./node_modules/matrix-js-sdk/release.sh "$@"

View File

@ -202,7 +202,7 @@ async function verifyServerConfig(): Promise<IConfigOptions> {
}
}
validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
validatedConfig = await AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
} catch (e) {
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) {

View File

@ -43,6 +43,7 @@ import { BreadcrumbsStore } from "matrix-react-sdk/src/stores/BreadcrumbsStore";
import { UPDATE_EVENT } from "matrix-react-sdk/src/stores/AsyncStore";
import { avatarUrlForRoom, getInitialLetter } from "matrix-react-sdk/src/Avatar";
import DesktopCapturerSourcePicker from "matrix-react-sdk/src/components/views/elements/DesktopCapturerSourcePicker";
import { OidcRegistrationClientMetadata } from "matrix-js-sdk/src/matrix";
import VectorBasePlatform from "./VectorBasePlatform";
import { SeshatIndexManager } from "./SeshatIndexManager";
@ -56,6 +57,8 @@ interface SquirrelUpdate {
updateURL: string;
}
const SSO_ID_KEY = "element-desktop-ssoid";
const isMac = navigator.platform.toUpperCase().includes("MAC");
function platformFriendlyName(): string {
@ -377,7 +380,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
public getSSOCallbackUrl(fragmentAfterLogin: string): URL {
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
url.protocol = "element";
url.searchParams.set("element-desktop-ssoid", this.ssoID);
url.searchParams.set(SSO_ID_KEY, this.ssoID);
return url;
}
@ -435,4 +438,23 @@ export default class ElectronPlatform extends VectorBasePlatform {
await this.ipc.call("clearStorage");
} catch (e) {}
}
public get baseUrl(): string {
// This configuration is element-desktop specific so the types here do not know about it
return (SdkConfig.get() as unknown as Record<string, string>)["web_base_url"] ?? "https://app.element.io";
}
public async getOidcClientMetadata(): Promise<OidcRegistrationClientMetadata> {
const baseMetadata = await super.getOidcClientMetadata();
return {
...baseMetadata,
applicationType: "native",
// XXX: This should be overridable in config
clientUri: "https://element.io",
};
}
public getOidcClientState(): string {
return `:${SSO_ID_KEY}:${this.ssoID}`;
}
}

View File

@ -223,6 +223,9 @@ describe("loading:", function () {
// Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: SERVER_SUPPORTED_MATRIX_VERSIONS });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
httpBackend
.when("GET", "/_matrix/client/unstable/org.matrix.msc2965/auth_issuer")
.respond(404, { errcode: "M_UNRECOGNIZED", error: "Unrecognized request" });
return sleep(1)
.then(async () => {

View File

@ -13,7 +13,7 @@
"declaration": true,
"jsx": "react",
"lib": ["es2021", "dom", "dom.iterable"],
"strict": true,
"strict": true
},
"include": [
"./node_modules/matrix-js-sdk/src/@types/*.d.ts",
@ -26,12 +26,12 @@
"./src/**/*.tsx",
"./test/**/*.ts",
"./test/**/*.tsx",
"./scripts/*.ts",
"./scripts/*.ts"
],
"ts-node": {
"files": true,
"moduleTypes": {
"*": "cjs",
},
},
"*": "cjs"
}
}
}

View File

@ -7,5 +7,6 @@
# The values of this are provided to `yarn add` for inclusion.
modules:
- "@nordeck/element-web-guest-module@1.0.0"
- "@nordeck/element-web-opendesk-module@0.3.0"
- "@nordeck/element-web-opendesk-module@0.4.0"
- "@nordeck/element-web-widget-lifecycle-module@1.0.1"
- "@nordeck/element-web-widget-toggles-module@0.1.0"

View File

@ -324,6 +324,7 @@ module.exports = (env, argv) => {
options: {
importLoaders: 1,
sourceMap: true,
esModule: false,
},
},
{
@ -409,6 +410,7 @@ module.exports = (env, argv) => {
options: {
importLoaders: 1,
sourceMap: true,
esModule: false,
},
},
{

2149
yarn.lock

File diff suppressed because it is too large Load Diff