Merge branch 'develop' into t3chguy/fix/d1728

This commit is contained in:
Michael Telatynski 2025-02-24 10:32:58 +00:00 committed by GitHub
commit 839653deac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
94 changed files with 2693 additions and 1879 deletions

35
.github/SSLcom-sandbox.crt vendored Normal file
View File

@ -0,0 +1,35 @@
-----BEGIN CERTIFICATE-----
MIIGBzCCA++gAwIBAgIIaI6ivggL++4wDQYJKoZIhvcNAQELBQAwgZAxCzAJBgNV
BAYTAlVTMQ4wDAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UE
CgwPU1NMIENvcnBvcmF0aW9uMUUwQwYDVQQDDDxTU0wuY29tIEVWIFJvb3QgQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyIC0gRGV2ZWxvcG1lbnQwHhcNMTgw
MTE2MTIxNjM2WhcNNDMwMTE1MTIxNjM2WjCBkDELMAkGA1UEBhMCVVMxDjAMBgNV
BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9y
YXRpb24xRTBDBgNVBAMMPFNTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eSBSU0EgUjIgLSBEZXZlbG9wbWVudDCCAiIwDQYJKoZIhvcNAQEBBQAD
ggIPADCCAgoCggIBAK/qcD65JCkueKp0+KXG2kAw8euDHuraLR3lJoUFz4ilGK1M
t+RjSuY6dHQw8ku7TnW9ejWoSFjCBSDx7tP/fzOwOxmBW6+F1NDuV/IaUtn3G2lk
CZglVk9z3n1HuWDN10xNiLoo5nzeIlvNAoDbXDGhI4Y6Z0qouAIS607JpJMWHOqZ
OUiiOuM11gI5Kz9GtVttXCjRmwlkU8WiJVIUuVedQAQt2FChrzNQewGFFi0uIau/
wFRclx6hd4JRIImC6VMJd9lcitWsqMcM94pD3fX2ozNgWX+MVlmcDYFSN9Sv8tG4
yCj4ONS8HZGzbxeyQXJhEJSi2FnBi0j6MD/d4DNFj0hCg9wz3fgVLDGCO0pNMO0Y
oXdrzfoj1/zEv0Ibgh7zKG2JHkPfapn3ExFI5d6xi66u5tPVI8cvLxqrgybRPs7Z
y1dQA7ew3LyTPAHoGtbTMvewtx1TkTtRxxhRRm0l58owqSVbSYrixFtosNobCERo
uiknaQqoY1ZDsdKsaqFoZDbntNRYhN3Ea4OPWVqDUU5ZPz9MTIRAi3MIq854yyQo
BjX9nv+kYa+Esr19pxUW0z7BWFhbXsMVpt0QMVyhwgzXvEreaZHFwHHaGb9d5x5P
VBDhsigMmtzBk9NlbCsy+uGXWHgZA/DVefueEq0sv38VoU30uYa5Tj0FLm09AgMB
AAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUI9PCucv3G9fRoTDu
ZQ4Hw6g4PkIwHQYDVR0OBBYEFCPTwrnL9xvX0aEw7mUOB8OoOD5CMA4GA1UdDwEB
/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAk43CCrC0Zbvi7YUsSePKi+KzvyQ9
mjKa5NBU/A5/sLeZS3R+wqCX7l5euYVDsUuNgNVD/QL9jNIonuHBrvKaxkmqxE1r
IcDEaUdjy2lQ0uqD7UDoS3ctrjGkPpUahrTdr3gaKcQBtUhn9v4Y2OBm6J1hDVwI
CIKcxIzRv6AUpApOtk+++m5tzDU48t8+GzrVl1hkspSYcumA+zuHllbPDL1ADdo5
kK/bBQtZrGqzPqKzeqaB1A5Wm0Igwf++7nyzdKNdjxtv907D9vg8EB4Swavuv/Ne
5/jbpI32pz0NIzzSl5ARAHuFhILsO/cEAlloDoTHzibHqFDIeU9/59HMUsJYMOtD
Ii0/LmQ6dBE4TeukCCLJwtkFYZ2eBgDjF/LHBB+z/UBs4milRgwx+Pe5UDUEjtGe
G/XMVnTSKZTy9jMaXJD5EmfP+Cfh8EEgFgjg4AmLUbEo9gXzPxyXSLgd8JGSsjg8
EV/Ri4Mmmt4XUwlSVvEOezxxDGd17gwbottCIC+rqPHonHkGmKpLMH80Bk0uOOCs
ui1oVwSifMyIcudgCcOfRLUf/f2j2NW7N7E7Vw/Zqfn+pqp/EG0KCqOM2vfJAc0s
u3rSrOJZGtB6txgtmTjoadxApWf4U/FCi3uArt6gS5MJqZjuiRNXs/K3SlSAqLGl
5UiG52ew+VdBHzE=
-----END CERTIFICATE-----

View File

@ -7,6 +7,8 @@ on:
branches: branches:
- develop - develop
permissions: {} # We use ELEMENT_BOT_TOKEN instead
jobs: jobs:
backport: backport:
name: Backport name: Backport

View File

@ -41,9 +41,12 @@ run-name: Element ${{ inputs.mode != 'release' && github.event_name != 'release'
concurrency: ${{ github.workflow }} concurrency: ${{ github.workflow }}
env: env:
R2_BUCKET: ${{ vars.R2_BUCKET }} R2_BUCKET: ${{ vars.R2_BUCKET }}
permissions: {} # Uses ELEMENT_BOT_TOKEN
jobs: jobs:
prepare: prepare:
uses: ./.github/workflows/build_prepare.yaml uses: ./.github/workflows/build_prepare.yaml
permissions:
contents: read
with: with:
config: element.io/${{ inputs.mode || (github.event_name == 'release' && 'release') || 'nightly' }} config: element.io/${{ inputs.mode || (github.event_name == 'release' && 'release') || 'nightly' }}
version: ${{ (inputs.mode != 'release' && github.event_name != 'release') && 'develop' || '' }} version: ${{ (inputs.mode != 'release' && github.event_name != 'release') && 'develop' || '' }}
@ -59,7 +62,7 @@ jobs:
name: Windows ${{ matrix.arch }} name: Windows ${{ matrix.arch }}
strategy: strategy:
matrix: matrix:
arch: [ia32, x64] arch: [ia32, x64, arm64]
uses: ./.github/workflows/build_windows.yaml uses: ./.github/workflows/build_windows.yaml
secrets: inherit secrets: inherit
with: with:
@ -194,6 +197,14 @@ jobs:
name: packages.element.io name: packages.element.io
path: packages.element.io path: packages.element.io
# Workaround for https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj
- uses: unfor19/install-aws-cli-action@e8b481e524a99f37fbd39fdc1dcb3341ab091367 # v1
if: needs.prepare.outputs.deploy == 'true'
with:
version: 2.22.35
verbose: false
arch: amd64
- name: Deploy artifacts - name: Deploy artifacts
if: needs.prepare.outputs.deploy == 'true' if: needs.prepare.outputs.deploy == 'true'
run: | run: |

View File

@ -6,9 +6,12 @@ on:
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
permissions: {} # No permissions required
jobs: jobs:
fetch: fetch:
uses: ./.github/workflows/build_prepare.yaml uses: ./.github/workflows/build_prepare.yaml
permissions:
contents: read
with: with:
config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }} config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }}
version: ${{ github.event.pull_request.base.ref == 'develop' && 'develop' || '' }} version: ${{ github.event.pull_request.base.ref == 'develop' && 'develop' || '' }}
@ -19,7 +22,7 @@ jobs:
uses: ./.github/workflows/build_windows.yaml uses: ./.github/workflows/build_windows.yaml
strategy: strategy:
matrix: matrix:
arch: [x64, ia32] arch: [x64, ia32, arm64]
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
@ -73,12 +76,12 @@ jobs:
executable: "/opt/Element/element-desktop" executable: "/opt/Element/element-desktop"
prepare_cmd: "sudo apt-get -qq update && sudo apt install ./dist/*.deb" prepare_cmd: "sudo apt-get -qq update && sudo apt install ./dist/*.deb"
- name: "Linux (arm64) (sqlcipher: system)" - name: "Linux (arm64) (sqlcipher: system)"
os: dind-l-arm64 os: ubuntu-22.04-arm
artifact: linux-arm64-sqlcipher-system artifact: linux-arm64-sqlcipher-system
executable: "/opt/Element/element-desktop" executable: "/opt/Element/element-desktop"
prepare_cmd: "sudo apt-get -qq update && sudo apt install -y ./dist/*.deb" prepare_cmd: "sudo apt-get -qq update && sudo apt install -y ./dist/*.deb"
- name: "Linux (arm64) (sqlcipher: static)" - name: "Linux (arm64) (sqlcipher: static)"
os: dind-l-arm64 os: ubuntu-22.04-arm
artifact: linux-arm64-sqlcipher-static artifact: linux-arm64-sqlcipher-static
executable: "/opt/Element/element-desktop" executable: "/opt/Element/element-desktop"
prepare_cmd: "sudo apt-get -qq update && sudo apt install -y ./dist/*.deb" prepare_cmd: "sudo apt-get -qq update && sudo apt install -y ./dist/*.deb"
@ -93,19 +96,6 @@ jobs:
name: Test ${{ matrix.name }} name: Test ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
# Workaround for self-hosted runners lacking yarn
- name: Install Yarn
if: runner.environment == 'self-hosted'
run: |
# Sanity check that the arch is arm64 as we expect
[[ $(uname -p) == "aarch64" ]] || exit 1
sudo apt-get -qq update
sudo apt-get install -y curl
curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js
chmod +x $HOME/bin/yarn
echo "$HOME/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
@ -134,12 +124,6 @@ jobs:
# We need sudo on Linux as it is installed in /opt/ # We need sudo on Linux as it is installed in /opt/
RUN_AS: ${{ runner.os == 'Linux' && 'sudo' || '' }} RUN_AS: ${{ runner.os == 'Linux' && 'sudo' || '' }}
- name: Workaround macOS GHA permission issues
if: runner.os == 'macOS'
run: |
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/opt/off/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
- name: Run tests - name: Run tests
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
timeout-minutes: 5 timeout-minutes: 5

View File

@ -22,32 +22,16 @@ on:
description: "How to link sqlcipher, one of 'system' | 'static'" description: "How to link sqlcipher, one of 'system' | 'static'"
env: env:
SQLCIPHER_BUNDLED: ${{ inputs.sqlcipher == 'static' && '1' || '' }} SQLCIPHER_BUNDLED: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
MAX_GLIBC: 2.31 # bullseye-era glibc, used by glibc-check.sh
permissions: {} # No permissions required
jobs: jobs:
# We build the hak files on native infrastructure as matrix-seshat fails to cross-compile properly build:
# We build on native infrastructure as matrix-seshat fails to cross-compile properly
# https://github.com/matrix-org/seshat/issues/135 # https://github.com/matrix-org/seshat/issues/135
hak: runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
runs-on: ${{ inputs.arch == 'arm64' && 'dind-l-arm64' || 'ubuntu-22.04' }}
env: env:
HAK_DOCKER_IMAGE: ghcr.io/element-hq/element-desktop-dockerbuild HAK_DOCKER_IMAGE: ghcr.io/element-hq/element-desktop-dockerbuild
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
arch: ${{ steps.config.outputs.arch }}
build-args: ${{ steps.config.outputs.build-args }}
steps: steps:
# Workaround for self-hosted runners lacking tools
- name: Install missing tools
if: runner.environment == 'self-hosted'
run: |
# Sanity check that the arch is arm64 as we expect
[[ $(uname -p) == "aarch64" ]] || exit 1
sudo apt-get -qq update
# curl for yarn download, git for tj-actions/changed-files, zstd for actions/cache
sudo apt-get install -y curl git zstd
curl -fsSL --create-dirs -o $HOME/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js
chmod +x $HOME/bin/yarn
echo "$HOME/bin" >> $GITHUB_PATH
- name: Resolve docker image tag for push - name: Resolve docker image tag for push
if: github.event_name == 'push' if: github.event_name == 'push'
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$GITHUB_REF_NAME" >> $GITHUB_ENV run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$GITHUB_REF_NAME" >> $GITHUB_ENV
@ -82,18 +66,11 @@ jobs:
with: with:
name: webapp name: webapp
- name: Calculate cache key
id: cache-key
run: |
echo "key=$CACHE_KEY" >> $GITHUB_OUTPUT
env:
CACHE_KEY: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }}
- name: Cache .hak - name: Cache .hak
id: cache id: cache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
key: ${{ steps.cache-key.outputs.key }} key: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }}
path: | path: |
./.hak ./.hak
@ -105,21 +82,20 @@ jobs:
# Workaround for https://github.com/actions/setup-node/issues/317 # Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0 FORCE_COLOR: 0
# Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "yarn install --frozen-lockfile"
- name: "Get modified files" - name: "Get modified files"
id: changed_files id: changed_files
if: steps.cache.outputs.cache-hit != 'true' && github.event_name == 'pull_request' if: steps.cache.outputs.cache-hit != 'true' && github.event_name == 'pull_request'
uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # v45 uses: tj-actions/changed-files@dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 # v45
with: with:
files: | files: |
dockerbuild/** dockerbuild/**
# This allows contributors to test changes to the dockerbuild image within a pull request # This allows contributors to test changes to the dockerbuild image within a pull request
- name: Build docker image - name: Build docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6 uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
if: steps.changed_files.outputs.any_modified == 'true' if: steps.changed_files.outputs.any_modified == 'true'
with: with:
context: dockerbuild context: dockerbuild
@ -136,51 +112,16 @@ jobs:
$HAK_DOCKER_IMAGE \ $HAK_DOCKER_IMAGE \
yarn build:native yarn build:native
- name: Check native libraries - name: Fix permissions on .hak
run: sudo chown -R $USER:$USER .hak
- name: Check native libraries in hak dependencies
run: | run: |
shopt -s globstar shopt -s globstar
for filename in ./.hak/hakModules/**/*.node; do for filename in ./.hak/hakModules/**/*.node; do
./scripts/glibc-check.sh $filename ./scripts/glibc-check.sh $filename
done done
env:
MAX_VER: 2.31 # bullseye-era glibc
build:
needs: hak
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: webapp
- name: Load .hak
id: cache
uses: actions/cache/restore@v4
with:
key: ${{ needs.hak.outputs.cache-key }}
fail-on-cache-miss: true
path: |
./.hak
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "yarn"
env:
# Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --frozen-lockfile"
- name: "[Nightly] Resolve version"
if: inputs.version != ''
run: |
echo "ED_NIGHTLY=${{ inputs.version }}" >> $GITHUB_ENV
- name: Generate debian files and arguments - name: Generate debian files and arguments
run: | run: |
@ -188,8 +129,19 @@ jobs:
echo "ED_DEBIAN_CHANGELOG=changelog.Debian" >> $GITHUB_ENV echo "ED_DEBIAN_CHANGELOG=changelog.Debian" >> $GITHUB_ENV
fi fi
# Workaround for https://github.com/electron-userland/electron-builder/issues/6116
- name: Install fpm
if: inputs.arch == 'arm64'
run: |
sudo apt-get install ruby-dev build-essential
sudo gem install fpm
echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV
- name: Build App - name: Build App
run: yarn build --publish never -l ${{ needs.hak.outputs.build-args }} run: yarn build --publish never -l ${{ steps.config.outputs.build-args }}
env:
# Only set for Nightly builds
ED_NIGHTLY: ${{ inputs.version }}
- name: Check native libraries - name: Check native libraries
run: | run: |
@ -217,7 +169,7 @@ jobs:
./scripts/glibc-check.sh dist/linux-*unpacked/element-desktop* ./scripts/glibc-check.sh dist/linux-*unpacked/element-desktop*
env: env:
ARCH: ${{ needs.hak.outputs.arch }} ARCH: ${{ steps.config.outputs.arch }}
# We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions # We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions
- name: Upload Artifacts - name: Upload Artifacts
@ -228,3 +180,10 @@ jobs:
dist dist
!dist/*-unpacked/** !dist/*-unpacked/**
retention-days: 1 retention-days: 1
- name: Assert all required files are present
run: |
test -f ./dist/element-desktop*$ARCH.deb
test -f ./dist/element-desktop*.tar.gz
env:
ARCH: ${{ inputs.arch }}

View File

@ -27,6 +27,7 @@ on:
type: string type: string
required: false required: false
description: "The URL to which the output will be deployed." description: "The URL to which the output will be deployed."
permissions: {} # No permissions required
jobs: jobs:
build: build:
runs-on: macos-14 # M1 runs-on: macos-14 # M1
@ -64,7 +65,6 @@ jobs:
node-version-file: package.json node-version-file: package.json
cache: "yarn" cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "yarn install --frozen-lockfile"
@ -75,11 +75,6 @@ jobs:
pip3 install setuptools pip3 install setuptools
yarn build:native:universal yarn build:native:universal
- name: "[Nightly] Resolve version"
if: inputs.version != ''
run: |
echo "ED_NIGHTLY=${{ inputs.version }}" >> $GITHUB_ENV
# We split these because electron-builder gets upset if we set CSC_LINK even to an empty string # We split these because electron-builder gets upset if we set CSC_LINK even to an empty string
- name: "[Signed] Build App" - name: "[Signed] Build App"
if: inputs.sign != '' if: inputs.sign != ''
@ -108,6 +103,8 @@ jobs:
yarn build:universal --publish never yarn build:universal --publish never
env: env:
CSC_IDENTITY_AUTO_DISCOVERY: false CSC_IDENTITY_AUTO_DISCOVERY: false
# Only set for Nightly builds
ED_NIGHTLY: ${{ inputs.version }}
- name: Generate releases.json - name: Generate releases.json
if: inputs.base-url if: inputs.base-url
@ -144,3 +141,8 @@ jobs:
dist dist
!dist/mac-universal/** !dist/mac-universal/**
retention-days: 1 retention-days: 1
- name: Assert all required files are present
run: |
test -f ./dist/Element*.dmg
test -f ./dist/Element*-mac.zip

View File

@ -41,11 +41,14 @@ on:
deploy: deploy:
description: "The relative path to the config file for this run" description: "The relative path to the config file for this run"
value: ${{ inputs.deploy }} value: ${{ inputs.deploy }}
permissions: {}
jobs: jobs:
prepare: prepare:
name: Prepare name: Prepare
environment: ${{ inputs.nightly && 'packages.element.io' || '' }} environment: ${{ inputs.nightly && 'packages.element.io' || '' }}
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
permissions:
contents: read
outputs: outputs:
nightly-version: ${{ steps.versions.outputs.nightly }} nightly-version: ${{ steps.versions.outputs.nightly }}
steps: steps:
@ -90,6 +93,8 @@ jobs:
env: env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
# Workaround for https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj
AWS_REQUEST_CHECKSUM_CALCULATION: when_required
R2_BUCKET: ${{ vars.R2_BUCKET }} R2_BUCKET: ${{ vars.R2_BUCKET }}
R2_URL: ${{ vars.CF_R2_S3_API }} R2_URL: ${{ vars.CF_R2_S3_API }}

View File

@ -3,6 +3,8 @@
# the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch. # the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch.
# Windows GHA runner by default uses the pwsh shell which breaks codeSigningCert in the workflow # Windows GHA runner by default uses the pwsh shell which breaks codeSigningCert in the workflow
# We always sign using eSignerCKA to ensure it keeps working, but aside from release & nightlies we use demo credentials
# which do not yield trusted signatures.
defaults: defaults:
run: run:
shell: powershell shell: powershell
@ -28,6 +30,7 @@ on:
type: string type: string
required: false required: false
description: "Whether to sign & notarise the build, requires 'packages.element.io' environment" description: "Whether to sign & notarise the build, requires 'packages.element.io' environment"
permissions: {} # No permissions required
jobs: jobs:
build: build:
runs-on: windows-2022 runs-on: windows-2022
@ -71,11 +74,6 @@ jobs:
path: | path: |
./.hak ./.hak
- name: Set up build tools
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
arch: ${{ steps.config.outputs.arch || inputs.arch }}
# ActiveTCL package on choco is from 2015, # ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need # this one is newer but includes more than we need
- name: Choco install tclsh - name: Choco install tclsh
@ -104,10 +102,21 @@ jobs:
node-version-file: package.json node-version-file: package.json
cache: "yarn" cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps - name: Install Deps
run: "yarn install --frozen-lockfile" run: "yarn install --frozen-lockfile"
- name: Set up sqlcipher macros
if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm')
shell: pwsh
run: |
echo "NCC=${{ github.workspace }}\scripts\cl.bat" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Set up build tools
if: steps.cache.outputs.cache-hit != 'true'
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
arch: ${{ steps.config.outputs.arch || inputs.arch }}
- name: Build Natives - name: Build Natives
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: | run: |
@ -115,7 +124,6 @@ jobs:
yarn build:native --target ${{ steps.config.outputs.target }} yarn build:native --target ${{ steps.config.outputs.target }}
- name: Install and configure eSigner CKA - name: Install and configure eSigner CKA
if: inputs.sign
run: | run: |
Set-StrictMode -Version 'Latest' Set-StrictMode -Version 'Latest'
@ -133,8 +141,13 @@ jobs:
$LogConfig[0] = '<log4net threshold="OFF">' $LogConfig[0] = '<log4net threshold="OFF">'
$LogConfig | Set-Content -Path ${{ env.INSTALL_DIR }}/log4net.config $LogConfig | Set-Content -Path ${{ env.INSTALL_DIR }}/log4net.config
# Configure # Configure - default credentials from https://www.ssl.com/guide/esigner-demo-credentials-and-certificates/
${{ env.INSTALL_DIR }}/eSignerCKATool.exe config -mode product -user "${{ secrets.ESIGNER_USER_NAME }}" -pass "${{ secrets.ESIGNER_USER_PASSWORD }}" -totp "${{ secrets.ESIGNER_USER_TOTP }}" -key "${{ env.MASTER_KEY_FILE }}" -r ${{ env.INSTALL_DIR }}/eSignerCKATool.exe config `
-mode ${{ vars.ESIGNER_MODE || 'sandbox' }} `
-user "${{ secrets.ESIGNER_USER_NAME || 'esigner_demo' }}" `
-pass "${{ secrets.ESIGNER_USER_PASSWORD || 'esignerDemo#1' }}" `
-totp "${{ secrets.ESIGNER_USER_TOTP || 'RDXYgV9qju+6/7GnMf1vCbKexXVJmUVr+86Wq/8aIGg=' }}" `
-key "${{ env.MASTER_KEY_FILE }}" -r
${{ env.INSTALL_DIR }}/eSignerCKATool.exe unload ${{ env.INSTALL_DIR }}/eSignerCKATool.exe unload
${{ env.INSTALL_DIR }}/eSignerCKATool.exe load ${{ env.INSTALL_DIR }}/eSignerCKATool.exe load
@ -153,24 +166,25 @@ jobs:
INSTALL_DIR: C:\Users\runneradmin\eSignerCKA INSTALL_DIR: C:\Users\runneradmin\eSignerCKA
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
- name: "[Nightly] Resolve version"
if: inputs.version != ''
shell: bash
run: |
echo "ED_NIGHTLY=${{ inputs.version }}" >> $GITHUB_ENV
# XXX: For whatever reason if we use `yarn build ...` it freezes, but splitting it into parts it is fine
- run: yarn run build:ts
- run: yarn run build:res
- name: Build App - name: Build App
run: yarn build --publish never -w ${{ steps.config.outputs.build-args }}
env:
# Only set for Nightly builds
ED_NIGHTLY: ${{ inputs.version }}
- name: Trust eSigner sandbox cert
if: inputs.sign == ''
run: | run: |
yarn electron-builder --publish never -w ${{ steps.config.outputs.build-args }} Set-StrictMode -Version 'Latest'
Import-Certificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath .github/SSLcom-sandbox.crt
- name: Check app was signed successfully - name: Check app was signed successfully
if: inputs.sign != ''
run: | run: |
. "$env:SIGNTOOL_PATH" verify /pa (get-item ./dist/squirrel-windows*/*.exe) Set-StrictMode -Version 'Latest'
Get-ChildItem `
-Recurse dist `
-Include *.exe, *.msi `
| ForEach-Object -Process {. $env:SIGNTOOL_PATH verify /pa $_.FullName; if(!$?) { throw }}
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -179,3 +193,11 @@ jobs:
path: | path: |
dist dist
retention-days: 1 retention-days: 1
- name: Assert all required files are present
run: |
Test-Path './dist/win-*unpacked/Element*.exe'
Test-Path './dist/squirrel-windows*/Element Setup*.exe'
Test-Path './dist/squirrel-windows*/element-desktop-*-full.nupkg'
Test-Path './dist/squirrel-windows*/RELEASES'
Test-Path './dist/Element*.msi'

View File

@ -5,10 +5,12 @@ on:
branches: [master, staging, develop] branches: [master, staging, develop]
paths: paths:
- "dockerbuild/**" - "dockerbuild/**"
pull_request:
concurrency: ${{ github.workflow }}-${{ github.ref_name }} concurrency: ${{ github.workflow }}-${{ github.ref_name }}
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-dockerbuild IMAGE_NAME: ${{ github.repository }}-dockerbuild
permissions: {}
jobs: jobs:
build: build:
name: Docker Build name: Docker Build
@ -20,15 +22,28 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3
with: with:
install: true install: true
- name: Build test image
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
with:
context: dockerbuild
push: false
load: true
tags: element-desktop-dockerbuild
platforms: linux/amd64
- name: Test image
run: docker run -v $PWD:/project element-desktop-dockerbuild yarn install
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@06895751d15a223ec091bea144ad5c7f50d228d0 uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
if: github.event_name != 'pull_request'
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@ -36,14 +51,17 @@ jobs:
- name: Extract metadata for Docker - name: Extract metadata for Docker
id: meta id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5 if: github.event_name != 'pull_request'
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6 if: github.event_name != 'pull_request'
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
with: with:
context: dockerbuild context: dockerbuild
push: true push: true

View File

@ -3,6 +3,8 @@ on:
workflow_dispatch: {} workflow_dispatch: {}
schedule: schedule:
- cron: "0 6 * * 1,3,5" # Every Monday, Wednesday and Friday at 6am UTC - cron: "0 6 * * 1,3,5" # Every Monday, Wednesday and Friday at 6am UTC
permissions:
pull-requests: write # needed to auto-approve PRs
jobs: jobs:
download: download:
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@main uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@main

View File

@ -4,6 +4,7 @@ on:
branches: [develop] branches: [develop]
paths: paths:
- "src/i18n/strings/en_EN.json" - "src/i18n/strings/en_EN.json"
permissions: {} # No permissions needed
jobs: jobs:
upload: upload:
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@main uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@main

View File

@ -2,8 +2,11 @@ name: Pull Request
on: on:
pull_request_target: pull_request_target:
types: [opened, edited, labeled, unlabeled, synchronize] types: [opened, edited, labeled, unlabeled, synchronize]
permissions: {}
jobs: jobs:
action: action:
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
permissions:
pull-requests: write
secrets: secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}

View File

@ -4,8 +4,11 @@ on:
branches: [staging] branches: [staging]
workflow_dispatch: {} workflow_dispatch: {}
concurrency: ${{ github.workflow }} concurrency: ${{ github.workflow }}
permissions: {}
jobs: jobs:
draft: draft:
uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop
permissions:
contents: write
with: with:
include-changes: element-hq/element-web~$VERSION include-changes: element-hq/element-web~$VERSION

View File

@ -4,6 +4,7 @@ on:
push: push:
branches: [master] branches: [master]
concurrency: ${{ github.repository }}-${{ github.workflow }} concurrency: ${{ github.repository }}-${{ github.workflow }}
permissions: {} # Uses ELEMENT_BOT_TOKEN
jobs: jobs:
merge: merge:
uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop

View File

@ -11,9 +11,14 @@ on:
- rc - rc
- final - final
concurrency: ${{ github.workflow }} concurrency: ${{ github.workflow }}
permissions: {}
jobs: jobs:
release: release:
uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop
permissions:
contents: write
issues: write
pull-requests: read
secrets: secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
@ -27,6 +32,8 @@ jobs:
name: Post release checks name: Post release checks
needs: release needs: release
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
permissions:
checks: read
steps: steps:
- name: Wait for desktop packaging - name: Wait for desktop packaging
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
@ -34,5 +41,5 @@ jobs:
ref: master ref: master
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10 wait-interval: 10
check-name: Deploy check-regexp: Prepare|Linux|macOS|Windows|Deploy|deploy
allowed-conclusions: success allowed-conclusions: success

View File

@ -3,6 +3,7 @@ on:
pull_request: {} pull_request: {}
push: push:
branches: [develop, master] branches: [develop, master]
permissions: {} # No permissions needed
jobs: jobs:
ts_lint: ts_lint:
name: "Typescript Syntax Check" name: "Typescript Syntax Check"
@ -25,6 +26,8 @@ jobs:
i18n_lint: i18n_lint:
name: "i18n Check" name: "i18n Check"
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
permissions:
pull-requests: read
with: with:
hardcoded-words: "Element" hardcoded-words: "Element"

View File

@ -8,6 +8,7 @@ on:
- develop - develop
paths: paths:
- .github/labels.yml - .github/labels.yml
permissions: {} # Uses ELEMENT_BOT_TOKEN
jobs: jobs:
sync-labels: sync-labels:
uses: element-hq/element-meta/.github/workflows/sync-labels.yml@develop uses: element-hq/element-meta/.github/workflows/sync-labels.yml@develop

View File

@ -4,6 +4,8 @@ on:
issues: issues:
types: [opened] types: [opened]
permissions: {} # Uses ELEMENT_BOT_TOKEN
jobs: jobs:
automate-project-columns-next: automate-project-columns-next:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04

View File

@ -4,6 +4,8 @@ on:
issues: issues:
types: [labeled] types: [labeled]
permissions: {} # Uses ELEMENT_BOT_TOKEN
jobs: jobs:
call-triage-labelled: call-triage-labelled:
uses: element-hq/element-web/.github/workflows/triage-labelled.yml@develop uses: element-hq/element-web/.github/workflows/triage-labelled.yml@develop

20
.github/workflows/triage-stale.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Close stale PRs
on:
workflow_dispatch: {}
schedule:
- cron: "30 1 * * *"
permissions: {}
jobs:
close:
runs-on: ubuntu-24.04
permissions:
actions: write
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
operations-per-run: 100
days-before-pr-stale: 180
days-before-pr-close: 0
close-pr-message: "This PR has been automatically closed because it has been stale for 180 days. If you wish to continue working on this PR, please ping a maintainer to reopen it."

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged --concurrent false

4
.lintstagedrc Normal file
View File

@ -0,0 +1,4 @@
{
"*": "prettier --write",
"*.(ts|tsx)": ["eslint --fix"]
}

View File

@ -1,3 +1,204 @@
Changes in [1.11.92](https://github.com/element-hq/element-desktop/releases/tag/v1.11.92) (2025-02-11)
======================================================================================================
## ✨ Features
* Enable fuse EnableEmbeddedAsarIntegrityValidation ([#1979](https://github.com/element-hq/element-desktop/pull/1979)). Contributed by @t3chguy.
* Update electron-builder and harden fuse configuration ([#2106](https://github.com/element-hq/element-desktop/pull/2106)). Contributed by @t3chguy.
* [Backport staging] Log when we show, and hide, encryption setup toasts ([#29238](https://github.com/element-hq/element-web/pull/29238)). Contributed by @richvdh.
* Make profile header section match the designs ([#29163](https://github.com/element-hq/element-web/pull/29163)). Contributed by @MidhunSureshR.
* Always show back button in the right panel ([#29128](https://github.com/element-hq/element-web/pull/29128)). Contributed by @MidhunSureshR.
* Schedule dehydration on reload if the dehydration key is already cached locally ([#29021](https://github.com/element-hq/element-web/pull/29021)). Contributed by @uhoreg.
* update to twemoji 15.1.0 ([#29115](https://github.com/element-hq/element-web/pull/29115)). Contributed by @ara4n.
* Update matrix-widget-api ([#29112](https://github.com/element-hq/element-web/pull/29112)). Contributed by @toger5.
* Allow navigating through the memberlist using up/down keys ([#28949](https://github.com/element-hq/element-web/pull/28949)). Contributed by @MidhunSureshR.
* Style room header icons and facepile for toggled state ([#28968](https://github.com/element-hq/element-web/pull/28968)). Contributed by @MidhunSureshR.
* Move threads header below base card header ([#28969](https://github.com/element-hq/element-web/pull/28969)). Contributed by @MidhunSureshR.
* Add `Advanced` section to the user settings encryption tab ([#28804](https://github.com/element-hq/element-web/pull/28804)). Contributed by @florianduros.
* Fix outstanding UX issues with replies/mentions/keyword notifs ([#28270](https://github.com/element-hq/element-web/pull/28270)). Contributed by @taffyko.
* Distinguish room state and timeline events when dealing with widgets ([#28681](https://github.com/element-hq/element-web/pull/28681)). Contributed by @robintown.
* Switch OIDC primarily to new `/auth_metadata` API ([#29019](https://github.com/element-hq/element-web/pull/29019)). Contributed by @t3chguy.
* More memberlist changes ([#29069](https://github.com/element-hq/element-web/pull/29069)). Contributed by @MidhunSureshR.
## 🐛 Bug Fixes
* [Backport staging] Wire up the "Forgot recovery key" button for the "Key storage out of sync" toast ([#29190](https://github.com/element-hq/element-web/pull/29190)). Contributed by @RiotRobot.
* Encryption tab: hide `Advanced` section when the key storage is out of sync ([#29129](https://github.com/element-hq/element-web/pull/29129)). Contributed by @florianduros.
* Fix share button in discovery settings being disabled incorrectly ([#29151](https://github.com/element-hq/element-web/pull/29151)). Contributed by @t3chguy.
* Ensure switching rooms does not wrongly focus timeline search ([#29153](https://github.com/element-hq/element-web/pull/29153)). Contributed by @t3chguy.
* Stop showing a dialog prompting the user to enter an old recovery key ([#29143](https://github.com/element-hq/element-web/pull/29143)). Contributed by @richvdh.
* Make themed widgets reflect the effective theme ([#28342](https://github.com/element-hq/element-web/pull/28342)). Contributed by @robintown.
* support non-VS16 emoji ligatures in TwemojiMozilla ([#29100](https://github.com/element-hq/element-web/pull/29100)). Contributed by @ara4n.
* e2e test: Verify session with the encryption tab instead of the security \& privacy tab ([#29090](https://github.com/element-hq/element-web/pull/29090)). Contributed by @florianduros.
* Work around cloudflare R2 / aws client incompatability ([#29086](https://github.com/element-hq/element-web/pull/29086)). Contributed by @dbkr.
* Fix identity server settings visibility ([#29083](https://github.com/element-hq/element-web/pull/29083)). Contributed by @dbkr.
Changes in [1.11.91](https://github.com/element-hq/element-desktop/releases/tag/v1.11.91) (2025-01-28)
======================================================================================================
## ✨ Features
* Implement changes to memberlist from feedback ([#29029](https://github.com/element-hq/element-web/pull/29029)). Contributed by @MidhunSureshR.
* Add toast for recovery keys being out of sync ([#28946](https://github.com/element-hq/element-web/pull/28946)). Contributed by @dbkr.
* Refactor LegacyCallHandler event emitter to use TypedEventEmitter ([#29008](https://github.com/element-hq/element-web/pull/29008)). Contributed by @t3chguy.
* Add `Recovery` section in the new user settings `Encryption` tab ([#28673](https://github.com/element-hq/element-web/pull/28673)). Contributed by @florianduros.
* Retry loading chunks to make the app more resilient ([#29001](https://github.com/element-hq/element-web/pull/29001)). Contributed by @t3chguy.
* Clear account idb table on logout ([#28996](https://github.com/element-hq/element-web/pull/28996)). Contributed by @t3chguy.
* Implement new memberlist design with MVVM architecture ([#28874](https://github.com/element-hq/element-web/pull/28874)). Contributed by @MidhunSureshR.
## 🐛 Bug Fixes
* [Backport staging] Switch to secure random strings ([#29035](https://github.com/element-hq/element-web/pull/29035)). Contributed by @RiotRobot.
* React to MatrixEvent sender/target being updated for rendering state events ([#28947](https://github.com/element-hq/element-web/pull/28947)). Contributed by @t3chguy.
Changes in [1.11.90](https://github.com/element-hq/element-desktop/releases/tag/v1.11.90) (2025-01-14)
======================================================================================================
## ✨ Features
* Docker: run as non-root ([#28849](https://github.com/element-hq/element-web/pull/28849)). Contributed by @richvdh.
* Docker: allow configuration of HTTP listen port via env var ([#28840](https://github.com/element-hq/element-web/pull/28840)). Contributed by @richvdh.
* Update matrix-wysiwyg to consume WASM asset ([#28838](https://github.com/element-hq/element-web/pull/28838)). Contributed by @t3chguy.
* OIDC settings tweaks ([#28787](https://github.com/element-hq/element-web/pull/28787)). Contributed by @t3chguy.
* Delabs native OIDC support ([#28615](https://github.com/element-hq/element-web/pull/28615)). Contributed by @t3chguy.
* Move room header info button to right-most position ([#28754](https://github.com/element-hq/element-web/pull/28754)). Contributed by @t3chguy.
* Enable key backup by default ([#28691](https://github.com/element-hq/element-web/pull/28691)). Contributed by @dbkr.
## 🐛 Bug Fixes
* Fix building the automations mermaid diagram ([#28881](https://github.com/element-hq/element-web/pull/28881)). Contributed by @dbkr.
* Playwright: wait for the network listener on the postgres db ([#28808](https://github.com/element-hq/element-web/pull/28808)). Contributed by @dbkr.
Changes in [1.11.89](https://github.com/element-hq/element-desktop/releases/tag/v1.11.89) (2024-12-18)
======================================================================================================
* No changes
## 🐛 Bug Fixes
* Upgrade matrix-sdk-crypto-wasm to 1.11.0 (https://github.com/matrix-org/matrix-js-sdk/pull/4593)
* Fix url preview display ([#28766](https://github.com/element-hq/element-web/pull/28766)).
Changes in [1.11.88](https://github.com/element-hq/element-desktop/releases/tag/v1.11.88) (2024-12-17)
======================================================================================================
## ✨ Features
* Allow trusted Element Call widget to send and receive media encryption key to-device messages ([#28316](https://github.com/element-hq/element-web/pull/28316)). Contributed by @hughns.
* increase ringing timeout from 10 seconds to 90 seconds ([#28630](https://github.com/element-hq/element-web/pull/28630)). Contributed by @fkwp.
* Add `Close` tooltip to dialog ([#28617](https://github.com/element-hq/element-web/pull/28617)). Contributed by @florianduros.
* New UX for Share dialog ([#28598](https://github.com/element-hq/element-web/pull/28598)). Contributed by @florianduros.
* Improve performance of RoomContext in RoomHeader ([#28574](https://github.com/element-hq/element-web/pull/28574)). Contributed by @t3chguy.
* Remove `Features.RustCrypto` flag ([#28582](https://github.com/element-hq/element-web/pull/28582)). Contributed by @florianduros.
* Add Modernizr warning when running in non-secure context ([#28581](https://github.com/element-hq/element-web/pull/28581)). Contributed by @t3chguy.
## 🐛 Bug Fixes
* Fix secret storage not being used due to bad import ([#2029](https://github.com/element-hq/element-desktop/pull/2029)). Contributed by @t3chguy.
* Fix inability to click on non-logged-in modals on macOS ([#2025](https://github.com/element-hq/element-desktop/pull/2025)). Contributed by @t3chguy.
* Fix jumpy timeline when the pinned message banner is displayed ([#28654](https://github.com/element-hq/element-web/pull/28654)). Contributed by @florianduros.
* Fix font \& spaces in settings subsection ([#28631](https://github.com/element-hq/element-web/pull/28631)). Contributed by @florianduros.
* Remove manual device verification which is not supported by the new cryptography stack ([#28588](https://github.com/element-hq/element-web/pull/28588)). Contributed by @florianduros.
* Fix code block highlighting not working reliably with many code blocks ([#28613](https://github.com/element-hq/element-web/pull/28613)). Contributed by @t3chguy.
* Remove remaining reply fallbacks code ([#28610](https://github.com/element-hq/element-web/pull/28610)). Contributed by @t3chguy.
* Provide a way to activate GIFs via the keyboard for a11y ([#28611](https://github.com/element-hq/element-web/pull/28611)). Contributed by @t3chguy.
* Fix format bar position ([#28591](https://github.com/element-hq/element-web/pull/28591)). Contributed by @florianduros.
* Fix room taking long time to load ([#28579](https://github.com/element-hq/element-web/pull/28579)). Contributed by @florianduros.
* Show the correct shield status in tooltip for more conditions ([#28476](https://github.com/element-hq/element-web/pull/28476)). Contributed by @uhoreg.
Changes in [1.11.87](https://github.com/element-hq/element-desktop/releases/tag/v1.11.87) (2024-12-03)
======================================================================================================
## ✨ Features
* Send and respect MSC4230 is\_animated flag ([#28513](https://github.com/element-hq/element-web/pull/28513)). Contributed by @t3chguy.
* Display a warning when an unverified user's identity changes ([#28211](https://github.com/element-hq/element-web/pull/28211)). Contributed by @uhoreg.
* Swap out Twitter link for Mastodon on auth footer ([#28508](https://github.com/element-hq/element-web/pull/28508)). Contributed by @t3chguy.
* Consider `org.matrix.msc3417.call` as video room in create room dialog ([#28497](https://github.com/element-hq/element-web/pull/28497)). Contributed by @t3chguy.
* Standardise icons using Compound Design Tokens ([#28217](https://github.com/element-hq/element-web/pull/28217)). Contributed by @t3chguy.
* Start sending stable `m.marked_unread` events ([#28478](https://github.com/element-hq/element-web/pull/28478)). Contributed by @tulir.
* Upgrade to compound-design-tokens v2 ([#28471](https://github.com/element-hq/element-web/pull/28471)). Contributed by @t3chguy.
* Standardise icons using Compound Design Tokens ([#28286](https://github.com/element-hq/element-web/pull/28286)). Contributed by @t3chguy.
* Remove reply fallbacks as per merged MSC2781 ([#28406](https://github.com/element-hq/element-web/pull/28406)). Contributed by @t3chguy.
* Use React Suspense when rendering async modals ([#28386](https://github.com/element-hq/element-web/pull/28386)). Contributed by @t3chguy.
## 🐛 Bug Fixes
* Add spinner when room encryption is loading in room settings ([#28535](https://github.com/element-hq/element-web/pull/28535)). Contributed by @florianduros.
* Fix getOidcCallbackUrl for Element Desktop ([#28521](https://github.com/element-hq/element-web/pull/28521)). Contributed by @t3chguy.
* Filter out redacted poll votes to avoid crashing the Poll widget ([#28498](https://github.com/element-hq/element-web/pull/28498)). Contributed by @t3chguy.
* Fix force tab complete not working since switching to React 18 createRoot API ([#28505](https://github.com/element-hq/element-web/pull/28505)). Contributed by @t3chguy.
* Fix media captions in bubble layout ([#28480](https://github.com/element-hq/element-web/pull/28480)). Contributed by @tulir.
* Reset cross-signing before backup when resetting both ([#28402](https://github.com/element-hq/element-web/pull/28402)). Contributed by @uhoreg.
* Listen to events so that encryption icon updates when status changes ([#28407](https://github.com/element-hq/element-web/pull/28407)). Contributed by @uhoreg.
* Check that the file the user chose has a MIME type of `image/*` ([#28467](https://github.com/element-hq/element-web/pull/28467)). Contributed by @t3chguy.
* Fix download button size in message action bar ([#28472](https://github.com/element-hq/element-web/pull/28472)). Contributed by @t3chguy.
* Allow tab completing users in brackets ([#28460](https://github.com/element-hq/element-web/pull/28460)). Contributed by @t3chguy.
* Fix React 18 strict mode breaking spotlight dialog ([#28452](https://github.com/element-hq/element-web/pull/28452)). Contributed by @MidhunSureshR.
Changes in [1.11.86](https://github.com/element-hq/element-desktop/releases/tag/v1.11.86) (2024-11-19)
======================================================================================================
## ✨ Features
* Deduplicate icons using Compound Design Tokens ([#28419](https://github.com/element-hq/element-web/pull/28419)). Contributed by @t3chguy.
* Let widget driver send error details ([#28357](https://github.com/element-hq/element-web/pull/28357)). Contributed by @AndrewFerr.
* Deduplicate icons using Compound Design Tokens ([#28381](https://github.com/element-hq/element-web/pull/28381)). Contributed by @t3chguy.
* Auto approvoce `io.element.call.reaction` capability for element call widgets ([#28401](https://github.com/element-hq/element-web/pull/28401)). Contributed by @toger5.
* Show message type prefix in thread root \& reply previews ([#28361](https://github.com/element-hq/element-web/pull/28361)). Contributed by @t3chguy.
* Support sending encrypted to device messages from widgets ([#28315](https://github.com/element-hq/element-web/pull/28315)). Contributed by @hughns.
## 🐛 Bug Fixes
* Feed events to widgets as they are decrypted (even if out of order) ([#28376](https://github.com/element-hq/element-web/pull/28376)). Contributed by @robintown.
* Handle authenticated media when downloading from ImageView ([#28379](https://github.com/element-hq/element-web/pull/28379)). Contributed by @t3chguy.
* Ignore `m.3pid_changes` for Identity service 3PID changes ([#28375](https://github.com/element-hq/element-web/pull/28375)). Contributed by @t3chguy.
* Fix markdown escaping wrongly passing html through ([#28363](https://github.com/element-hq/element-web/pull/28363)). Contributed by @t3chguy.
* Remove "Upgrade your encryption" flow in `CreateSecretStorageDialog` ([#28290](https://github.com/element-hq/element-web/pull/28290)). Contributed by @florianduros.
Changes in [1.11.85](https://github.com/element-hq/element-desktop/releases/tag/v1.11.85) (2024-11-12)
======================================================================================================
# Security
- Fixes for [CVE-2024-51750](https://www.cve.org/CVERecord?id=CVE-2024-51750) / [GHSA-w36j-v56h-q9pc](https://github.com/element-hq/element-web/security/advisories/GHSA-w36j-v56h-q9pc)
- Fixes for [CVE-2024-51749](https://www.cve.org/CVERecord?id=CVE-2024-51749) / [GHSA-5486-384g-mcx2](https://github.com/element-hq/element-web/security/advisories/GHSA-5486-384g-mcx2)
- Update JS SDK with the fixes for [CVE-2024-50336](https://www.cve.org/CVERecord?id=CVE-2024-50336) / [GHSA-xvg8-m4x3-w6xr](https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-xvg8-m4x3-w6xr)
Changes in [1.11.84](https://github.com/element-hq/element-desktop/releases/tag/v1.11.84) (2024-11-05)
======================================================================================================
## ✨ Features
* Support specifying the config location manually (outside of the user's profile) ([#1921](https://github.com/element-hq/element-desktop/pull/1921)). Contributed by @Half-Shot.
* Remove abandoned MSC3886, MSC3903, MSC3906 implementations ([#28274](https://github.com/element-hq/element-web/pull/28274)). Contributed by @t3chguy.
* Update to React 18 ([#24763](https://github.com/element-hq/element-web/pull/24763)). Contributed by @t3chguy.
* Deduplicate icons using Compound ([#28239](https://github.com/element-hq/element-web/pull/28239)). Contributed by @t3chguy.
* Replace legacy Tooltips with Compound tooltips ([#28231](https://github.com/element-hq/element-web/pull/28231)). Contributed by @t3chguy.
* Deduplicate icons using Compound Design Tokens ([#28219](https://github.com/element-hq/element-web/pull/28219)). Contributed by @t3chguy.
* Add reactions to html export ([#28210](https://github.com/element-hq/element-web/pull/28210)). Contributed by @langleyd.
* Remove feature\_dehydration ([#28173](https://github.com/element-hq/element-web/pull/28173)). Contributed by @florianduros.
## 🐛 Bug Fixes
* Improve seshat deleteContents ([#1916](https://github.com/element-hq/element-desktop/pull/1916)). Contributed by @langleyd.
* Remove upgrade encryption in `DeviceListener` and `SetupEncryptionToast` ([#28299](https://github.com/element-hq/element-web/pull/28299)). Contributed by @florianduros.
* Fix 'remove alias' button in room settings ([#28269](https://github.com/element-hq/element-web/pull/28269)). Contributed by @Dev-Gurjar.
* Add back unencrypted path in `StopGapWidgetDriver.sendToDevice` ([#28295](https://github.com/element-hq/element-web/pull/28295)). Contributed by @florianduros.
* Fix other devices not being decorated as such ([#28279](https://github.com/element-hq/element-web/pull/28279)). Contributed by @t3chguy.
* Fix pill contrast in invitation dialog ([#28250](https://github.com/element-hq/element-web/pull/28250)). Contributed by @florianduros.
* Close right panel chat when minimising maximised voip widget ([#28241](https://github.com/element-hq/element-web/pull/28241)). Contributed by @t3chguy.
* Fix develop changelog parsing ([#28232](https://github.com/element-hq/element-web/pull/28232)). Contributed by @t3chguy.
* Fix Ctrl+F shortcut not working with minimised room summary card ([#28223](https://github.com/element-hq/element-web/pull/28223)). Contributed by @t3chguy.
* Fix network dropdown missing checkbox \& aria-checked ([#28220](https://github.com/element-hq/element-web/pull/28220)). Contributed by @t3chguy.
Changes in [1.11.83](https://github.com/element-hq/element-desktop/releases/tag/v1.11.83) (2024-10-29) Changes in [1.11.83](https://github.com/element-hq/element-desktop/releases/tag/v1.11.83) (2024-10-29)
====================================================================================================== ======================================================================================================
## ✨ Features ## ✨ Features

View File

@ -1,5 +1,5 @@
# Contributing code to element-desktop # Contributing code to element-desktop
Everyone is welcome to contribute code to element-desktop, provided that they are willing to license their contributions to Element under a [Contributor License Agreement](https://cla-assistant.io/element-hq/element-desktop) (CLA). This ensures that their contribution will be made available under an OSI-approved open-source license, currently licensed under Affero General Public License v3 (AGPLv3) or General Public License v3 (GPLv3) at your choice. Everyone is welcome to contribute code to element-desktop, provided that they are willing to license their contributions to Element under a [Contributor License Agreement](https://cla-assistant.io/element-hq/element-desktop) (CLA). This ensures that their contribution will be made available under an approved licence(as described in the [README](/README.md#copyright--license)).
element-desktop follows the same pattern as element-web, please find more contributing guidelines at https://github.com/vector-im/element-web/blob/develop/CONTRIBUTING.md element-desktop follows the same pattern as element-web, please find more contributing guidelines at https://github.com/vector-im/element-web/blob/develop/CONTRIBUTING.md

6
LICENSE-COMMERCIAL Normal file
View File

@ -0,0 +1,6 @@
Licensees holding a valid commercial license with Element may use this
software in accordance with the terms contained in a written agreement
between you and Element.
To purchase a commercial license please contact our sales team at
licensing@element.io

View File

@ -101,9 +101,6 @@ After running, the packages should be in `dist/`.
If you'd just like to run the electron app locally for development: If you'd just like to run the electron app locally for development:
``` ```
# Install electron - we don't normally need electron itself as it's provided
# by electron-builder when building packages
yarn add electron
yarn start yarn start
``` ```
@ -158,3 +155,20 @@ For a developer guide, see the [translating dev doc](https://github.com/vector-i
If you run into any bugs or have feedback you'd like to share, please let us know on GitHub. If you run into any bugs or have feedback you'd like to share, please let us know on GitHub.
To help avoid duplicate issues, please [view existing issues](https://github.com/vector-im/element-web/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc) first (and add a +1) or [create a new issue](https://github.com/vector-im/element-web/issues/new/choose) if you can't find it. Please note that this issue tracker is associated with the [element-web](https://github.com/vector-im/element-web) repo, but is also applied to the code in this repo as well. To help avoid duplicate issues, please [view existing issues](https://github.com/vector-im/element-web/issues?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc) first (and add a +1) or [create a new issue](https://github.com/vector-im/element-web/issues/new/choose) if you can't find it. Please note that this issue tracker is associated with the [element-web](https://github.com/vector-im/element-web) repo, but is also applied to the code in this repo as well.
## Copyright & License
Copyright (c) 2016-2017 OpenMarket Ltd
Copyright (c) 2017 Vector Creations Ltd
Copyright (c) 2017-2025 New Vector Ltd
This software is multi licensed by New Vector Ltd (Element). It can be used either:
(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR
(2) for free under the terms of the GNU General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR
(3) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).
Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.

View File

@ -21,7 +21,7 @@ ENV FORCE_COLOR true
WORKDIR /project WORKDIR /project
ENV NODE_VERSION 20.15.1 ENV NODE_VERSION 20.18.2
ARG TARGETOS ARG TARGETOS
ARG TARGETARCH ARG TARGETARCH
COPY setup.sh /setup.sh COPY setup.sh /setup.sh

View File

@ -12,6 +12,13 @@ If you want to build native modules, make sure that the following tools are inst
- [Strawberry Perl](https://strawberryperl.com/) - [Strawberry Perl](https://strawberryperl.com/)
- [Rustup](https://rustup.rs/) - [Rustup](https://rustup.rs/)
- [NASM](https://www.nasm.us/) - [NASM](https://www.nasm.us/)
You can install the above tools using [Chocolatey](https://chocolatey.org/install):
```cmd
choco install --no-progress -y git nodejs-lts yarn python StrawberryPerl rustup.install nasm magicsplat-tcl-tk
```
- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration: - [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with the following configuration:
- On the Workloads tab: - On the Workloads tab:
- Desktop & Mobile -> C++ build tools - Desktop & Mobile -> C++ build tools

View File

@ -1,8 +1,10 @@
import * as os from "os"; import * as os from "node:os";
import * as fs from "fs"; import * as fs from "node:fs";
import * as path from "path"; import * as path from "node:path";
import { Arch, Configuration as BaseConfiguration, AfterPackContext } from "electron-builder"; import * as plist from "plist";
import { flipFuses, FuseVersion, FuseV1Options } from "@electron/fuses"; import { AfterPackContext, Arch, Configuration as BaseConfiguration, Platform } from "electron-builder";
import { computeData } from "app-builder-lib/out/asar/integrity";
import { readFile, writeFile } from "node:fs/promises";
/** /**
* This script has different outputs depending on your os platform. * This script has different outputs depending on your os platform.
@ -10,7 +12,7 @@ import { flipFuses, FuseVersion, FuseV1Options } from "@electron/fuses";
* On Windows: * On Windows:
* Prefixes the nightly version with `0.0.1-nightly.` as it breaks if it is not semver * Prefixes the nightly version with `0.0.1-nightly.` as it breaks if it is not semver
* Passes $ED_SIGNTOOL_THUMBPRINT and $ED_SIGNTOOL_SUBJECT_NAME to * Passes $ED_SIGNTOOL_THUMBPRINT and $ED_SIGNTOOL_SUBJECT_NAME to
* build.win.signingHashAlgorithms and build.win.certificateSubjectName respectively if specified. * build.win.signtoolOptions.signingHashAlgorithms and build.win.signtoolOptions.certificateSubjectName respectively if specified.
* *
* On Linux: * On Linux:
* Replaces spaces in the product name with dashes as spaces in paths can cause issues * Replaces spaces in the product name with dashes as spaces in paths can cause issues
@ -47,49 +49,52 @@ interface Configuration extends BaseConfiguration {
} & BaseConfiguration["deb"]; } & BaseConfiguration["deb"];
} }
async function injectAsarIntegrity(context: AfterPackContext) {
const packager = context.packager;
// We only need to re-generate asar on universal Mac builds, due to https://github.com/electron/universal/issues/116
if (packager.platform !== Platform.MAC || context.arch !== Arch.universal) return;
const resourcesPath = packager.getResourcesDir(context.appOutDir);
const asarIntegrity = await computeData({
resourcesPath,
resourcesRelativePath: "Resources",
resourcesDestinationPath: resourcesPath,
extraResourceMatchers: [],
});
const plistPath = path.join(resourcesPath, "..", "Info.plist");
const data = plist.parse(await readFile(plistPath, "utf8")) as unknown as Writable<plist.PlistObject>;
data["ElectronAsarIntegrity"] = asarIntegrity as unknown as Writable<plist.PlistValue>;
await writeFile(plistPath, plist.build(data));
}
/** /**
* @type {import('electron-builder').Configuration} * @type {import('electron-builder').Configuration}
* @see https://www.electron.build/configuration/configuration * @see https://www.electron.build/configuration/configuration
*/ */
const config: Writable<Configuration> = { const config: Omit<Writable<Configuration>, "electronFuses"> & {
// Make all fuses required to ensure they are all explicitly specified
electronFuses: Required<Configuration["electronFuses"]>;
} = {
appId: "im.riot.app", appId: "im.riot.app",
asarUnpack: "**/*.node", asarUnpack: "**/*.node",
electronFuses: {
enableCookieEncryption: true,
onlyLoadAppFromAsar: true,
grantFileProtocolExtraPrivileges: false,
runAsNode: false,
enableNodeOptionsEnvironmentVariable: false,
enableNodeCliInspectArguments: false,
// We need to reset the signature if we are not signing on darwin otherwise it won't launch
resetAdHocDarwinSignature: !process.env.APPLE_TEAM_ID,
loadBrowserProcessSpecificV8Snapshot: false,
enableEmbeddedAsarIntegrityValidation: true,
},
afterPack: async (context: AfterPackContext) => { afterPack: async (context: AfterPackContext) => {
if (context.electronPlatformName !== "darwin" || context.arch === Arch.universal) { await injectAsarIntegrity(context);
// Burn in electron fuses for proactive security hardening.
// On macOS, we only do this for the universal package, as the constituent arm64 and amd64 packages are embedded within.
const ext = (<Record<string, string>>{
darwin: ".app",
win32: ".exe",
linux: "",
})[context.electronPlatformName];
let executableName = context.packager.appInfo.productFilename;
if (context.electronPlatformName === "linux") {
// Linux uses the package name as the executable name
executableName = context.packager.appInfo.name;
}
const electronBinaryPath = path.join(context.appOutDir, `${executableName}${ext}`);
console.log(`Flipping fuses for: ${electronBinaryPath}`);
await flipFuses(electronBinaryPath, {
version: FuseVersion.V1,
resetAdHocDarwinSignature: context.electronPlatformName === "darwin" && context.arch === Arch.universal,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
// Mac app crashes on arm for us when `LoadBrowserProcessSpecificV8Snapshot` is enabled
[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: false,
// https://github.com/electron/fuses/issues/7
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: false,
});
}
}, },
files: [ files: [
"package.json", "package.json",
@ -147,12 +152,17 @@ const config: Writable<Configuration> = {
darkModeSupport: true, darkModeSupport: true,
hardenedRuntime: true, hardenedRuntime: true,
gatekeeperAssess: true, gatekeeperAssess: true,
// XXX: we cannot specify this due to https://github.com/electron/osx-sign/issues/344
// strictVerify: true,
entitlements: "./build/entitlements.mac.plist", entitlements: "./build/entitlements.mac.plist",
icon: "build/icons/icon.icns", icon: "build/icons/icon.icns",
mergeASARs: true,
}, },
win: { win: {
target: ["squirrel", "msi"], target: ["squirrel", "msi"],
signtoolOptions: {
signingHashAlgorithms: ["sha256"], signingHashAlgorithms: ["sha256"],
},
icon: "build/icons/icon.ico", icon: "build/icons/icon.ico",
}, },
msi: { msi: {
@ -175,8 +185,8 @@ const config: Writable<Configuration> = {
* @param {string} process.env.ED_SIGNTOOL_THUMBPRINT * @param {string} process.env.ED_SIGNTOOL_THUMBPRINT
*/ */
if (process.env.ED_SIGNTOOL_SUBJECT_NAME && process.env.ED_SIGNTOOL_THUMBPRINT) { if (process.env.ED_SIGNTOOL_SUBJECT_NAME && process.env.ED_SIGNTOOL_THUMBPRINT) {
config.win.certificateSubjectName = process.env.ED_SIGNTOOL_SUBJECT_NAME; config.win.signtoolOptions!.certificateSubjectName = process.env.ED_SIGNTOOL_SUBJECT_NAME;
config.win.certificateSha1 = process.env.ED_SIGNTOOL_THUMBPRINT; config.win.signtoolOptions!.certificateSha1 = process.env.ED_SIGNTOOL_THUMBPRINT;
} }
/** /**

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020, 2021 The Matrix.org Foundation C.I.C. Copyright 2020, 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020, 2021 The Matrix.org Foundation C.I.C. Copyright 2020, 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -7,11 +7,10 @@ export default {
// Brought in via hak scripts // Brought in via hak scripts
"keytar", "keytar",
"matrix-seshat", "matrix-seshat",
// Needed by `electron-builder`
"electron-builder-squirrel-windows",
"@types/yargs",
// Required for `action-validator` // Required for `action-validator`
"@action-validator/*", "@action-validator/*",
// Used for git pre-commit hooks
"husky",
], ],
ignoreBinaries: ["jq", "scripts/in-docker.sh"], ignoreBinaries: ["jq", "scripts/in-docker.sh"],
} satisfies KnipConfig; } satisfies KnipConfig;

View File

@ -3,15 +3,15 @@
"productName": "Element", "productName": "Element",
"main": "lib/electron-main.js", "main": "lib/electron-main.js",
"exports": "./lib/electron-main.js", "exports": "./lib/electron-main.js",
"version": "1.11.83", "version": "1.11.91",
"description": "A feature-rich client for Matrix.org", "description": "Element: the future of secure communication",
"author": "Element", "author": "Element",
"homepage": "https://element.io", "homepage": "https://element.io",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/vector-im/element-desktop" "url": "https://github.com/vector-im/element-desktop"
}, },
"license": "AGPL-3.0-only OR GPL-3.0-only", "license": "SEE LICENSE IN README.md",
"type": "module", "type": "module",
"files": [], "files": [],
"engines": { "engines": {
@ -57,9 +57,9 @@
}, },
"dependencies": { "dependencies": {
"@sentry/electron": "^5.0.0", "@sentry/electron": "^5.0.0",
"@standardnotes/electron-clear-data": "^1.0.5",
"auto-launch": "^5.0.5", "auto-launch": "^5.0.5",
"counterpart": "^0.18.6", "counterpart": "^0.18.6",
"electron-clear-data": "^1.0.5",
"electron-store": "^10.0.0", "electron-store": "^10.0.0",
"electron-window-state": "^5.0.3", "electron-window-state": "^5.0.3",
"minimist": "^1.2.6", "minimist": "^1.2.6",
@ -72,50 +72,50 @@
"@babel/core": "^7.18.10", "@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10", "@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@electron/asar": "3.2.15", "@electron/asar": "3.3.1",
"@electron/fuses": "^1.7.0", "@playwright/test": "1.50.1",
"@mapbox/node-pre-gyp": "^1.0.11", "@stylistic/eslint-plugin": "^3.0.0",
"@playwright/test": "1.48.2",
"@stylistic/eslint-plugin": "^2.9.0",
"@types/auto-launch": "^5.0.1", "@types/auto-launch": "^5.0.1",
"@types/counterpart": "^0.18.1", "@types/counterpart": "^0.18.1",
"@types/minimist": "^1.2.1", "@types/minimist": "^1.2.1",
"@types/node": "18.19.59", "@types/node": "18.19.76",
"@types/pacote": "^11.1.1", "@types/pacote": "^11.1.1",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^8.0.0", "@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0", "@typescript-eslint/parser": "^8.0.0",
"app-builder-lib": "25.1.8", "app-builder-lib": "26.0.7",
"chokidar": "^4.0.0", "chokidar": "^4.0.0",
"detect-libc": "^2.0.0", "detect-libc": "^2.0.0",
"electron": "^33.0.0", "electron": "34.2.0",
"electron-builder": "25.1.8", "electron-builder": "26.0.7",
"electron-builder-squirrel-windows": "25.1.8", "electron-builder-squirrel-windows": "26.0.7",
"electron-devtools-installer": "^3.2.0", "electron-devtools-installer": "^4.0.0",
"eslint": "^8.26.0", "eslint": "^8.26.0",
"eslint-config-google": "^0.14.0", "eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^10.0.0",
"eslint-plugin-import": "^2.25.4", "eslint-plugin-import": "^2.25.4",
"eslint-plugin-matrix-org": "^2.0.1", "eslint-plugin-matrix-org": "^2.0.1",
"eslint-plugin-n": "^17.12.0", "eslint-plugin-n": "^17.12.0",
"eslint-plugin-unicorn": "^56.0.0", "eslint-plugin-unicorn": "^56.0.0",
"glob": "^11.0.0", "glob": "^11.0.0",
"husky": "^9.1.6",
"knip": "^5.0.0", "knip": "^5.0.0",
"lint-staged": "^15.2.10",
"matrix-web-i18n": "^3.2.1", "matrix-web-i18n": "^3.2.1",
"mkdirp": "^3.0.0", "mkdirp": "^3.0.0",
"pacote": "^20.0.0", "pacote": "^21.0.0",
"plist": "^3.1.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"rimraf": "^6.0.0", "rimraf": "^6.0.0",
"tar": "^7.0.0", "tar": "^7.0.0",
"tsx": "^4.19.2", "tsx": "^4.19.2",
"typescript": "5.5.4" "typescript": "5.7.3"
}, },
"hakDependencies": { "hakDependencies": {
"matrix-seshat": "^4.0.0", "matrix-seshat": "^4.0.1",
"keytar": "^7.9.0" "keytar": "^7.9.0"
}, },
"resolutions": { "resolutions": {
"@types/node": "18.19.59", "@types/node": "18.19.76",
"config-file-ts": "0.2.8-rc1" "config-file-ts": "0.2.8-rc1"
} }
} }

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2023 The Matrix.org Foundation C.I.C. Copyright 2023 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/playwright:v1.48.2-jammy FROM mcr.microsoft.com/playwright:v1.50.1-jammy
WORKDIR /work/element-desktop WORKDIR /work/element-desktop

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,10 +2,12 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2022, 2023 The Matrix.org Foundation C.I.C. Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { platform } from "node:os";
import { test, expect } from "../../element-desktop-test.js"; import { test, expect } from "../../element-desktop-test.js";
declare global { declare global {
@ -17,6 +19,7 @@ declare global {
supportsEventIndexing(): Promise<boolean>; supportsEventIndexing(): Promise<boolean>;
} }
| undefined; | undefined;
createPickleKey(userId: string, deviceId: string): Promise<string | null>;
}; };
}; };
} }
@ -24,17 +27,32 @@ declare global {
test.describe("App launch", () => { test.describe("App launch", () => {
test.slow(); test.slow();
test("should launch and render the welcome view successfully and support seshat", async ({ page }) => {
test.beforeEach(async ({ page }) => {
await page.locator("#matrixchat").waitFor(); await page.locator("#matrixchat").waitFor();
await page.locator(".mx_Welcome").waitFor(); await page.locator(".mx_Welcome").waitFor();
});
test("should launch and render the welcome view successfully", async ({ page }) => {
await expect(page).toHaveURL("vector://vector/webapp/#/welcome"); await expect(page).toHaveURL("vector://vector/webapp/#/welcome");
await expect(page).toHaveScreenshot(); await expect(page).toHaveScreenshot();
const supported = await page.evaluate<boolean>(async () => {
const indexManager = window.mxPlatformPeg.get()?.getEventIndexingManager();
return await indexManager?.supportsEventIndexing();
}); });
expect(supported).toBe(true); test("should launch and render the welcome view successfully and support seshat", async ({ page }) => {
await expect(
page.evaluate<boolean>(async () => {
return window.mxPlatformPeg.get().getEventIndexingManager()?.supportsEventIndexing();
}),
).resolves.toBeTruthy();
});
test("should launch and render the welcome view successfully and support keytar", async ({ page }) => {
test.skip(platform() === "linux", "This test does not yet support Linux");
await expect(
page.evaluate<string | null>(async () => {
return await window.mxPlatformPeg.get().createPickleKey("@user:server", "ABCDEF");
}),
).resolves.not.toBeNull();
}); });
}); });

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2023 The Matrix.org Foundation C.I.C. Copyright 2023 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
@ -53,6 +53,13 @@ export const test = base.extend<Fixtures>({
app.process().stderr.pipe(process.stderr); app.process().stderr.pipe(process.stderr);
await app.firstWindow(); await app.firstWindow();
// Block matrix.org access to ensure consistent tests
const context = app.context();
await context.route("https://matrix.org/**", async (route) => {
await route.abort();
});
await use(app); await use(app);
}, },
page: async ({ app }, use) => { page: async ({ app }, use) => {

View File

@ -1,11 +0,0 @@
/*
Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
declare module "@mapbox/node-pre-gyp/lib/util/versioning" {
// eslint-disable-next-line @typescript-eslint/naming-convention
export function get_runtime_abi(runtime: string, version: string): string;
}

7
scripts/cl.bat Normal file
View File

@ -0,0 +1,7 @@
REM Batch file to aid in cross-compiling sqlcipher for Windows ARM64
REM Full path should be passed to Makefile.msc as NCC env var
setlocal
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VSCMD_ARG_HOST_ARCH%
cl.exe %*
endlocal

View File

@ -12,9 +12,9 @@ const argv = parseArgs(process.argv.slice(2), {});
const watch = argv.w; const watch = argv.w;
const verbose = argv.v; const verbose = argv.v;
function errCheck(err?: Error): void { function errCheck(err: unknown): void {
if (err) { if (err) {
console.error(err.message); console.error(err instanceof Error ? err.message : err);
process.exit(1); process.exit(1);
} }
} }

View File

@ -3,7 +3,7 @@
# Source https://gist.github.com/vladimyr/9a03481154cd3048a486bdf71e5e1535/57e57a6ace6fb2c8bba948bce726df7a96c3f99f # Source https://gist.github.com/vladimyr/9a03481154cd3048a486bdf71e5e1535/57e57a6ace6fb2c8bba948bce726df7a96c3f99f
# This scripts lets you check which minimum GLIBC version an executable requires. # This scripts lets you check which minimum GLIBC version an executable requires.
# Simply run './glibc-check.sh path/to/your/binary' # Simply run './glibc-check.sh path/to/your/binary'
MAX_VER="${MAX_VER:-2.28}" MAX_GLIBC="${MAX_GLIBC:-2.28}"
BINARY="$1" BINARY="$1"
@ -39,10 +39,10 @@ IFS="
VERS=$(objdump -T "$BINARY" | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -u) VERS=$(objdump -T "$BINARY" | grep GLIBC_ | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -u)
for VER in $VERS; do for VER in $VERS; do
vercomp "$VER" "$MAX_VER" vercomp "$VER" "$MAX_GLIBC"
COMP=$? COMP=$?
if [[ $COMP -eq 1 ]]; then if [[ $COMP -eq 1 ]]; then
echo "Error! ${BINARY} requests GLIBC ${VER}, which is higher than target ${MAX_VER}" echo "Error! ${BINARY} requests GLIBC ${VER}, which is higher than target ${MAX_GLIBC}"
echo "Affected symbols:" echo "Affected symbols:"
objdump -T "$BINARY" | grep -F "GLIBC_${VER}" objdump -T "$BINARY" | grep -F "GLIBC_${VER}"
echo "Looking for symbols in libraries..." echo "Looking for symbols in libraries..."

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020, 2021 The Matrix.org Foundation C.I.C. Copyright 2020, 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C. Copyright 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,37 +2,30 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020, 2021 The Matrix.org Foundation C.I.C. Copyright 2020, 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import path from "node:path"; import path from "node:path";
import os from "node:os"; import os from "node:os";
import nodePreGypVersioning from "@mapbox/node-pre-gyp/lib/util/versioning";
import { getElectronVersionFromInstalled } from "app-builder-lib/out/electron/electronVersion.js"; import { getElectronVersionFromInstalled } from "app-builder-lib/out/electron/electronVersion.js";
import childProcess, { SpawnOptions } from "node:child_process"; import childProcess, { type SpawnOptions } from "node:child_process";
import { Arch, Target, TARGETS, getHost, isHostId, TargetId } from "./target.js"; import { type Arch, type Target, TARGETS, getHost, isHostId, type TargetId } from "./target.js";
async function getRuntime(projectRoot: string): Promise<string> {
const electronVersion = await getElectronVersionFromInstalled(projectRoot);
return electronVersion ? "electron" : "node-webkit";
}
async function getRuntimeVersion(projectRoot: string): Promise<string> { async function getRuntimeVersion(projectRoot: string): Promise<string> {
const electronVersion = await getElectronVersionFromInstalled(projectRoot); const electronVersion = await getElectronVersionFromInstalled(projectRoot);
if (electronVersion) { if (!electronVersion) {
return electronVersion; throw new Error("Can't determine Electron version");
} else {
return process.version.substr(1);
} }
return electronVersion;
} }
export type Tool = [cmd: string, ...args: string[]]; export type Tool = [cmd: string, ...args: string[]];
export default class HakEnv { export default class HakEnv {
public readonly target: Target; public readonly target: Target;
public runtime?: string; public runtime: string = "electron";
public runtimeVersion?: string; public runtimeVersion?: string;
public dotHakDir: string; public dotHakDir: string;
@ -50,19 +43,9 @@ export default class HakEnv {
} }
public async init(): Promise<void> { public async init(): Promise<void> {
this.runtime = await getRuntime(this.projectRoot);
this.runtimeVersion = await getRuntimeVersion(this.projectRoot); this.runtimeVersion = await getRuntimeVersion(this.projectRoot);
} }
public getRuntimeAbi(): string {
return nodePreGypVersioning.get_runtime_abi(this.runtime!, this.runtimeVersion!);
}
// {node_abi}-{platform}-{arch}
public getNodeTriple(): string {
return this.getRuntimeAbi() + "-" + this.target.platform + "-" + this.target.arch;
}
public getTargetId(): TargetId { public getTargetId(): TargetId {
return this.target.id; return this.target.id;
} }

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020, 2021 The Matrix.org Foundation C.I.C. Copyright 2020, 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
@ -15,8 +15,6 @@ import type { DependencyInfo } from "./dep.js";
import { loadJsonFile } from "../../src/utils.js"; import { loadJsonFile } from "../../src/utils.js";
import packageJson from "../../package.json"; import packageJson from "../../package.json";
const GENERALCOMMANDS = ["target"];
// These can only be run on specific modules // These can only be run on specific modules
const MODULECOMMANDS = ["check", "fetch", "link", "build", "copy", "clean"]; const MODULECOMMANDS = ["check", "fetch", "link", "build", "copy", "clean"];
@ -90,7 +88,8 @@ async function main(): Promise<void> {
for (const s of HAKSCRIPTS) { for (const s of HAKSCRIPTS) {
if (hakJson.scripts?.[s]) { if (hakJson.scripts?.[s]) {
const scriptModule = await import(path.join("file://", prefix, "hak", dep, hakJson.scripts[s])); // Shockingly, using path.join and backslashes here doesn't work on Windows
const scriptModule = await import(`../../hak/${dep}/${hakJson.scripts[s]}`);
if (scriptModule.default) { if (scriptModule.default) {
deps[dep].scripts[s] = scriptModule.default; deps[dep].scripts[s] = scriptModule.default;
} else { } else {
@ -119,13 +118,6 @@ async function main(): Promise<void> {
if (modules.length === 0) modules = Object.keys(deps); if (modules.length === 0) modules = Object.keys(deps);
for (const cmd of cmds) { for (const cmd of cmds) {
if (GENERALCOMMANDS.includes(cmd)) {
if (cmd === "target") {
console.log(hakEnv.getNodeTriple());
}
return;
}
if (!MODULECOMMANDS.includes(cmd)) { if (!MODULECOMMANDS.includes(cmd)) {
console.error("Unknown command: " + cmd); console.error("Unknown command: " + cmd);
console.log("Commands I know about:"); console.log("Commands I know about:");

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
@ -10,8 +10,8 @@ import path from "node:path";
import os from "node:os"; import os from "node:os";
import fsProm from "node:fs/promises"; import fsProm from "node:fs/promises";
import HakEnv from "./hakEnv.js"; import type HakEnv from "./hakEnv.js";
import { DependencyInfo } from "./dep.js"; import { type DependencyInfo } from "./dep.js";
export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> { export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const yarnrc = path.join(hakEnv.projectRoot, ".yarnrc"); const yarnrc = path.join(hakEnv.projectRoot, ".yarnrc");

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C. Copyright 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,18 +0,0 @@
/*
Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
// import "electron-devtools-installer";
declare module "electron-devtools-installer" {
interface ExtensionReference {
id: string;
electron: string;
}
export const REACT_DEVELOPER_TOOLS: ExtensionReference;
export default function install(extension: ExtensionReference): Promise<string>;
}

View File

@ -1,15 +1,15 @@
/* /*
Copyright 2021-2024 New Vector Ltd. Copyright 2021-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { BrowserWindow } from "electron"; import { type BrowserWindow } from "electron";
import Store from "electron-store";
import AutoLaunch from "auto-launch";
import { AppLocalization } from "../language-helper.js"; import type Store from "electron-store";
import type AutoLaunch from "auto-launch";
import { type AppLocalization } from "../language-helper.js";
// global type extensions need to use var for whatever reason // global type extensions need to use var for whatever reason
/* eslint-disable no-var */ /* eslint-disable no-var */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2023, 2024 New Vector Ltd. Copyright 2023, 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -4,13 +4,13 @@ Copyright 2017-2019 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2016 Aviral Dasgupta Copyright 2016 Aviral Dasgupta
Copyright 2016 OpenMarket Ltd Copyright 2016 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
// Squirrel on windows starts the app with various flags as hooks to tell us when we've been installed/uninstalled etc. // Squirrel on windows starts the app with various flags as hooks to tell us when we've been installed/uninstalled etc.
import "./squirrelhooks.js"; import "./squirrelhooks.js";
import { app, BrowserWindow, Menu, autoUpdater, protocol, dialog, Input, Event, session } from "electron"; import { app, BrowserWindow, Menu, autoUpdater, protocol, dialog, type Input, type Event, session } from "electron";
// eslint-disable-next-line n/file-extension-in-import // eslint-disable-next-line n/file-extension-in-import
import * as Sentry from "@sentry/electron/main"; import * as Sentry from "@sentry/electron/main";
import AutoLaunch from "auto-launch"; import AutoLaunch from "auto-launch";
@ -376,9 +376,9 @@ app.on("ready", async () => {
if (argv["devtools"]) { if (argv["devtools"]) {
try { try {
const { default: installExt, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer"); const { installExtension, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer");
installExt(REACT_DEVELOPER_TOOLS) installExtension(REACT_DEVELOPER_TOOLS)
.then((name: string) => console.log(`Added Extension: ${name}`)) .then((ext) => console.log(`Added Extension: ${ext.name}`))
.catch((err: unknown) => console.log("An error occurred: ", err)); .catch((err: unknown) => console.log("An error occurred: ", err));
} catch (e) { } catch (e) {
console.log(e); console.log(e);

63
src/i18n/strings/cy.json Normal file
View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "Diddymu",
"close": "Cau",
"close_brand": "Cau %(brand)s",
"copy": "Copïo",
"cut": "Torri",
"delete": "Dileu",
"edit": "Golygu",
"minimise": "Lleihau",
"paste": "Gludo",
"paste_match_style": "Gludo a Chyfateb Arddull",
"quit": "Gadael",
"redo": "Ail-wneud",
"select_all": "Dewis y Cyfan",
"show_hide": "Dangos/Cuddio",
"undo": "Dadwneud",
"zoom_in": "Chwyddo i Mewn",
"zoom_out": "Chwyddo Allan"
},
"common": {
"about": "Ynghylch",
"brand_help": "%(brand)s Cymorth",
"help": "Cymorth",
"preferences": "Dewisiadau"
},
"confirm_quit": "Ydych chi'n siŵr eich bod am roi'r gorau iddi?",
"edit_menu": {
"speech": "Lleferydd",
"speech_start_speaking": "Cychwyn Llefaru",
"speech_stop_speaking": "Peidio Llefaru"
},
"file_menu": {
"label": "Ffeil"
},
"menu": {
"hide": "Cuddio",
"hide_others": "Cuddio'r Gweddill",
"services": "Gwasanaethau",
"unhide": "Datguddio"
},
"right_click_menu": {
"add_to_dictionary": "Ychwanegu i'r Geiriadur",
"copy_email": "Copïo cyfeiriad e-bost",
"copy_image": "Copïo delwedd",
"copy_image_url": "Copïo cyfeiriad delwedd",
"copy_link_url": "Copïo cyfeiriad y ddolen",
"save_image_as": "Cadw delwedd fel...",
"save_image_as_error_description": "Methodd y ddelwedd â chadw",
"save_image_as_error_title": "Wedi methu cadw'r ddelwedd"
},
"view_menu": {
"actual_size": "Maint Gwirioneddol",
"toggle_developer_tools": "Toggle Developer Tools",
"toggle_full_screen": "Toglo Sgrin Lawn",
"view": "Golwg"
},
"window_menu": {
"bring_all_to_front": "Popeth i'r Blaen",
"label": "Ffenestr",
"zoom": "Chwyddo"
}
}

View File

@ -22,7 +22,7 @@
"about": "Über", "about": "Über",
"brand_help": "%(brand)s Hilfe", "brand_help": "%(brand)s Hilfe",
"help": "Hilfe", "help": "Hilfe",
"preferences": "Einstellungen" "preferences": "Präferenzen"
}, },
"confirm_quit": "Wirklich beenden?", "confirm_quit": "Wirklich beenden?",
"edit_menu": { "edit_menu": {

View File

@ -20,6 +20,7 @@
}, },
"common": { "common": {
"about": "Tietoa", "about": "Tietoa",
"brand_help": "%(brand)s-tuki",
"help": "Ohje", "help": "Ohje",
"preferences": "Valinnat" "preferences": "Valinnat"
}, },

View File

@ -2,7 +2,7 @@
"action": { "action": {
"cancel": "Mégse", "cancel": "Mégse",
"close": "Bezárás", "close": "Bezárás",
"close_brand": "%(brand)s bezárása", "close_brand": "Az %(brand)s bezárása",
"copy": "Másolás", "copy": "Másolás",
"cut": "Kivágás", "cut": "Kivágás",
"delete": "Törlés", "delete": "Törlés",
@ -56,7 +56,7 @@
"view": "Megtekintés" "view": "Megtekintés"
}, },
"window_menu": { "window_menu": {
"bring_all_to_front": "Mindent előtérbe hoz", "bring_all_to_front": "Minden előtérbe hozása",
"label": "Ablak", "label": "Ablak",
"zoom": "Nagyítás" "zoom": "Nagyítás"
} }

63
src/i18n/strings/ka.json Normal file
View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "გაუქმება",
"close": "დახურვა",
"close_brand": "დახურვა %(brand)s",
"copy": "კოპირება",
"cut": "მოჭრა",
"delete": "წაშალეთ",
"edit": "რედაქტირება",
"minimise": "შეამცირეთ",
"paste": "პასტა",
"paste_match_style": "ჩასვით და მატჩის სტილი",
"quit": "თავი დაანებე",
"redo": "რედო",
"select_all": "აირჩიეთ ყველა",
"show_hide": "ჩვენება/დამალვა",
"undo": "გაუქმება",
"zoom_in": "გაზარდოთ",
"zoom_out": "გაფართოება"
},
"common": {
"about": "შესახებ",
"brand_help": "%(brand)sდახმარება",
"help": "დახმარება",
"preferences": "პრეფერენციები"
},
"confirm_quit": "დარწმუნებული ხართ, რომ გსურთ დატოვება?",
"edit_menu": {
"speech": "გამოსვლა",
"speech_start_speaking": "დაიწყეთ საუბარი",
"speech_stop_speaking": "შეწყვიტე ლაპარ"
},
"file_menu": {
"label": "ფაილი"
},
"menu": {
"hide": "დამალვა",
"hide_others": "სხვების დამალვა",
"services": "მომსახურება",
"unhide": "გამოხატე"
},
"right_click_menu": {
"add_to_dictionary": "ლექსიკონში დამატება",
"copy_email": "ელ. ფოსტის მისამართის",
"copy_image": "სურათის დაკოპირება",
"copy_image_url": "გამოსახულების მისამართის კოპირ",
"copy_link_url": "ბმულის მისამართის კოპირება",
"save_image_as": "შეინახეთ სურათი როგორც...",
"save_image_as_error_description": "სურათის შენახვა ვერ შეძლო",
"save_image_as_error_title": "სურათის შენახვა ვერ შეძლ"
},
"view_menu": {
"actual_size": "რეალური ზომა",
"toggle_developer_tools": "დეველოპერის ინსტრუმენტების",
"toggle_full_screen": "სრული ეკრანის გადართვა",
"view": "ნახვა"
},
"window_menu": {
"bring_all_to_front": "ყველაფერი წინ წამოიყვანეთ",
"label": "ფანჯარა",
"zoom": "გაზუსტება"
}
}

63
src/i18n/strings/lv.json Normal file
View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "Atcelt",
"close": "Aizvērt",
"close_brand": "Aizvērt %(brand)s",
"copy": "Kopēt",
"cut": "Izgriezt",
"delete": "Dzēst",
"edit": "Labot",
"minimise": "Samazināt",
"paste": "Ielīmēt",
"paste_match_style": "Ielīmēt un pielāgot stilu",
"quit": "Iziet",
"redo": "Atatsaukt",
"select_all": "Atzīmēt visu",
"show_hide": "Parādīt/paslēpt",
"undo": "Atsaukt",
"zoom_in": "Tuvināt",
"zoom_out": "Tālināt"
},
"common": {
"about": "Par",
"brand_help": "%(brand)s palīdzība",
"help": "Palīdzība",
"preferences": "Iestatījumi"
},
"confirm_quit": "Vai tiešām iziet?",
"edit_menu": {
"speech": "Runa",
"speech_start_speaking": "Uzsākt runāšanu",
"speech_stop_speaking": "Pārtraukt runāšanu"
},
"file_menu": {
"label": "Datne"
},
"menu": {
"hide": "Paslēpt",
"hide_others": "Paslēpt citus",
"services": "Pakalpojumi",
"unhide": "Rādīt"
},
"right_click_menu": {
"add_to_dictionary": "Pievienot vārdnīcai",
"copy_email": "Ievietot e-pasta adresi starpliktuvē",
"copy_image": "Ievietot attēlu starpliktuvē",
"copy_image_url": "Ievietot attēla adresi starpliktuvē",
"copy_link_url": "Ievietot saites adresi starpliktuvē",
"save_image_as": "Saglabāt attēlu kā...",
"save_image_as_error_description": "Attēlu neizdevās saglabāt",
"save_image_as_error_title": "Neizdevās saglabāt attēlu"
},
"view_menu": {
"actual_size": "Īstais izmērs",
"toggle_developer_tools": "Pārslēgt izstrādātāja rīkus",
"toggle_full_screen": "Pārslēgt pilnekrānu",
"view": "Skats"
},
"window_menu": {
"bring_all_to_front": "Iznest visu priekšplānā",
"label": "Logs",
"zoom": "Tālummaiņa"
}
}

View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "Hanafoana",
"close": "Akatona",
"close_brand": "Anakatona%(brand)s",
"copy": "Dika Mitovy",
"cut": "Tapaina",
"delete": "Fafaina",
"edit": "Anova",
"minimise": "Manamaivana",
"paste": "Koba",
"paste_match_style": "Mametaka sy Mampifanandrify ny fomba",
"quit": "Mialà",
"redo": "Averina atao",
"select_all": "Isafidy ny rehetra",
"show_hide": "Aneho/Anafina",
"undo": "Ravao",
"zoom_in": "Angedao",
"zoom_out": "Hahelezo"
},
"common": {
"about": "Mombamomba",
"brand_help": "%(marques)Fanampiana",
"help": "Fanampiana",
"preferences": "Safidy manokana"
},
"confirm_quit": "Azo Antoka ve fa tena hiala ianao",
"edit_menu": {
"speech": "Fitenenana",
"speech_start_speaking": "Atomboy ny resaka/Manomboha fitenenena",
"speech_stop_speaking": "Atsaharo ny fitenenana"
},
"file_menu": {
"label": "Manapetraka/apetrao"
},
"menu": {
"hide": "Afeno",
"hide_others": "Afeno ny hafa",
"services": "Tolotra",
"unhide": "Asehoy"
},
"right_click_menu": {
"add_to_dictionary": "Ampio ao amin'ny rakibolana",
"copy_email": "Adikao ny adiresy imailaka",
"copy_image": "Andika ny sary",
"copy_image_url": "Adikao ny adiresin'ny sary",
"copy_link_url": "Adikao ny adiresy rohy",
"save_image_as": "Hitahiry ny sary ho",
"save_image_as_error_description": "Tsy voatahiry ilay sary",
"save_image_as_error_title": "Tsy nahahomby ny fitahirizana an'ilay sary"
},
"view_menu": {
"actual_size": "Habe Ankehitriny",
"toggle_developer_tools": "Amadika fitaovana fampandrosoana",
"toggle_full_screen": "Hamadika amin'ny efijery feno",
"view": "Hijery"
},
"window_menu": {
"bring_all_to_front": "Ataovy aloha ny zava-drehetra",
"label": "Varavarankely",
"zoom": "Anakaiky fahitana"
}
}

View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "Avbryt",
"close": "Lukk",
"close_brand": "Avslutt %(brand)s",
"copy": "Kopier",
"cut": "Klipp",
"delete": "Slett",
"edit": "Rediger",
"minimise": "Minimere",
"paste": "Lim inn",
"paste_match_style": "Lim inn og match stil",
"quit": "Avslutt",
"redo": "Gjør om",
"select_all": "Velg alle",
"show_hide": "Vis/Skjul",
"undo": "Angre",
"zoom_in": "Zoom inn",
"zoom_out": "Zoom ut"
},
"common": {
"about": "Om",
"brand_help": "%(brand)s Hjelp",
"help": "Hjelp",
"preferences": "Brukervalg"
},
"confirm_quit": "Er du sikker på at du vil slutte?",
"edit_menu": {
"speech": "Tale",
"speech_start_speaking": "Begynn å snakke",
"speech_stop_speaking": "Slutt å snakke"
},
"file_menu": {
"label": "Fil"
},
"menu": {
"hide": "Skjul",
"hide_others": "Skjul andre",
"services": "Tjenester",
"unhide": "Slutt å skjule"
},
"right_click_menu": {
"add_to_dictionary": "Legg til i ordbok",
"copy_email": "Kopier e-postadressen",
"copy_image": "Kopier bildet",
"copy_image_url": "Kopier bildeadresse",
"copy_link_url": "Kopier link adresse",
"save_image_as": "Lagre bildet som...",
"save_image_as_error_description": "Bildet kunne ikke lagres",
"save_image_as_error_title": "Kunne ikke lagre bildet"
},
"view_menu": {
"actual_size": "Faktisk størrelse",
"toggle_developer_tools": "Veksle Utvikleralternativer",
"toggle_full_screen": "Veksle Fullskjerm",
"view": "Vis"
},
"window_menu": {
"bring_all_to_front": "Flytt Alt Frem",
"label": "Vindu",
"zoom": "Forstørr"
}
}

63
src/i18n/strings/pt.json Normal file
View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "Cancelar",
"close": "Fechar",
"close_brand": "Fecha %(brand)s",
"copy": "Copiar",
"cut": "Cortar",
"delete": "Apagar",
"edit": "Editar",
"minimise": "Minimizar",
"paste": "Colar",
"paste_match_style": "Colar e combinar o estilo",
"quit": "Desistir",
"redo": "Refazer",
"select_all": "Selecionar tudo",
"show_hide": "Mostrar/ocultar",
"undo": "Desfazer",
"zoom_in": "Ampliar",
"zoom_out": "Reduzir"
},
"common": {
"about": "Sobre",
"brand_help": "%(brand)s Ajuda",
"help": "Ajuda",
"preferences": "Preferências"
},
"confirm_quit": "Tens a certeza de que queres desistir?",
"edit_menu": {
"speech": "Discurso",
"speech_start_speaking": "Começa a falar",
"speech_stop_speaking": "Pára de falar"
},
"file_menu": {
"label": "Ficheiro"
},
"menu": {
"hide": "Ocultar",
"hide_others": "Ocultar Outros",
"services": "Serviços",
"unhide": "Mostrar"
},
"right_click_menu": {
"add_to_dictionary": "Adicionar ao dicionário",
"copy_email": "Copiar endereço de e-mail",
"copy_image": "Copiar imagem",
"copy_image_url": "Copiar endereço da imagem",
"copy_link_url": "Copiar endereço do link",
"save_image_as": "Salvar imagem como...",
"save_image_as_error_description": "A imagem não foi salva",
"save_image_as_error_title": "Falha ao salvar a imagem"
},
"view_menu": {
"actual_size": "Tamanho original",
"toggle_developer_tools": "Alternar ferramentas de desenvolvedor",
"toggle_full_screen": "Alternar ecrã inteiro",
"view": "Ver"
},
"window_menu": {
"bring_all_to_front": "Traz tudo para a frente",
"label": "Janela",
"zoom": "Ampliação"
}
}

View File

@ -20,6 +20,7 @@
}, },
"common": { "common": {
"about": "Sobre", "about": "Sobre",
"brand_help": "%(brand)s Ajuda",
"help": "Ajuda", "help": "Ajuda",
"preferences": "Preferências" "preferences": "Preferências"
}, },
@ -56,6 +57,7 @@
}, },
"window_menu": { "window_menu": {
"bring_all_to_front": "Trazer Todas Para Frente", "bring_all_to_front": "Trazer Todas Para Frente",
"label": "Janela" "label": "Janela",
"zoom": "Zoom"
} }
} }

63
src/i18n/strings/tr.json Normal file
View File

@ -0,0 +1,63 @@
{
"action": {
"cancel": "İptal",
"close": "Kapat",
"close_brand": "Kapat %(brand)s",
"copy": "Kopyala",
"cut": "Kes",
"delete": "Sil",
"edit": "Düzenle",
"minimise": "Küçült",
"paste": "Yapıştır",
"paste_match_style": "Stili Yapıştır ve Eşleştir",
"quit": ık",
"redo": "Yeniden yap",
"select_all": "Tümünü seç",
"show_hide": "Göster/Gizle",
"undo": "Geri al",
"zoom_in": "Yakınlaştır",
"zoom_out": "Uzaklaştır"
},
"common": {
"about": "Hakkında",
"brand_help": "%(brand)s Yardım",
"help": "Yardım",
"preferences": "Tercihler"
},
"confirm_quit": ıkmak istediğinizden emin misiniz?",
"edit_menu": {
"speech": "Konuşma",
"speech_start_speaking": "Konuşmaya başla",
"speech_stop_speaking": "Konuşmayı durdur"
},
"file_menu": {
"label": "Dosya"
},
"menu": {
"hide": "Gizle",
"hide_others": "Diğerlerini gizle",
"services": "Hizmetler",
"unhide": "Göster"
},
"right_click_menu": {
"add_to_dictionary": "Sözlüğe ekle",
"copy_email": "E-posta adresini kopyala",
"copy_image": "Resmi kopyala",
"copy_image_url": "Görsel adresini kopyala",
"copy_link_url": "Bağlantılı adresi kopyala",
"save_image_as": "Resmi farklı kaydet...",
"save_image_as_error_description": "Görüntü kaydedilemedi",
"save_image_as_error_title": "Resim kaydedilemedi"
},
"view_menu": {
"actual_size": "Gerçek boyut",
"toggle_developer_tools": "Geliştirici araçları",
"toggle_full_screen": "Tam ekran",
"view": "Görüntüle"
},
"window_menu": {
"bring_all_to_front": "Hepsini öne getir",
"label": "Pencere",
"zoom": "Yaklaştır"
}
}

View File

@ -1,12 +1,12 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { app, autoUpdater, desktopCapturer, ipcMain, powerSaveBlocker, TouchBar, nativeImage } from "electron"; import { app, autoUpdater, desktopCapturer, ipcMain, powerSaveBlocker, TouchBar, nativeImage } from "electron";
import { relaunchApp } from "electron-clear-data"; import { relaunchApp } from "@standardnotes/electron-clear-data";
import IpcMainEvent = Electron.IpcMainEvent; import IpcMainEvent = Electron.IpcMainEvent;
import { recordSSOSession } from "./protocol.js"; import { recordSSOSession } from "./protocol.js";
@ -157,7 +157,9 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
case "createPickleKey": case "createPickleKey":
try { try {
const pickleKey = await randomArray(32); const pickleKey = await randomArray(32);
await keytar?.setPassword("element.io", `${args[0]}|${args[1]}`, pickleKey); // We purposefully throw if keytar is not available so the caller can handle it
// rather than sending them a pickle key we did not store on their behalf.
await keytar!.setPassword("element.io", `${args[0]}|${args[1]}`, pickleKey);
ret = pickleKey; ret = pickleKey;
} catch { } catch {
ret = null; ret = null;

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
@ -9,7 +9,7 @@ import type * as Keytar from "keytar"; // Hak dependency type
let keytar: typeof Keytar | undefined; let keytar: typeof Keytar | undefined;
try { try {
keytar = await import("keytar"); ({ default: keytar } = await import("keytar"));
} catch (e) { } catch (e) {
if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") { if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") {
console.log("Keytar isn't installed; secure key storage is disabled."); console.log("Keytar isn't installed; secure key storage is disabled.");

View File

@ -1,12 +1,12 @@
/* /*
Copyright 2021-2024 New Vector Ltd. Copyright 2021-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import counterpart from "counterpart"; import counterpart from "counterpart";
import { TranslationKey as TKey } from "matrix-web-i18n"; import { type TranslationKey as TKey } from "matrix-web-i18n";
import { dirname } from "node:path"; import { dirname } from "node:path";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2023, 2024 New Vector Ltd. Copyright 2023, 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
@ -93,7 +93,8 @@ export function setupMacosTitleBar(window: BrowserWindow): void {
.mx_LeftPanel, .mx_LeftPanel,
.mx_RoomView, .mx_RoomView,
.mx_SpaceRoomView, .mx_SpaceRoomView,
.mx_AccessibleButton { .mx_AccessibleButton,
.mx_Dialog {
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
} }
/* Exclude context menus and their backgrounds */ /* Exclude context menus and their backgrounds */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2018, 2019 , 2021 New Vector Ltd Copyright 2018, 2019 , 2021 New Vector Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C. Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,7 +2,7 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2017 OpenMarket Ltd Copyright 2017 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -3,7 +3,7 @@ Copyright 2024 New Vector Ltd.
Copyright 2017 Karl Glatz <karl@glatz.biz> Copyright 2017 Karl Glatz <karl@glatz.biz>
Copyright 2017 OpenMarket Ltd Copyright 2017 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2016-2024 New Vector Ltd. Copyright 2016-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2022-2024 New Vector Ltd. Copyright 2022-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */

View File

@ -2,11 +2,11 @@
Copyright 2024 New Vector Ltd. Copyright 2024 New Vector Ltd.
Copyright 2016 OpenMarket Ltd Copyright 2016 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
import { app, shell, Menu, MenuItem, MenuItemConstructorOptions } from "electron"; import { app, shell, Menu, type MenuItem, type MenuItemConstructorOptions } from "electron";
import { _t } from "./language-helper.js"; import { _t } from "./language-helper.js";

View File

@ -1,7 +1,7 @@
/* /*
Copyright 2021-2024 New Vector Ltd. Copyright 2021-2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details. Please see LICENSE files in the repository root for full details.
*/ */
@ -13,13 +13,13 @@ import {
shell, shell,
dialog, dialog,
ipcMain, ipcMain,
NativeImage, type NativeImage,
WebContents, type WebContents,
ContextMenuParams, type ContextMenuParams,
DownloadItem, type DownloadItem,
MenuItemConstructorOptions, type MenuItemConstructorOptions,
IpcMainEvent, type IpcMainEvent,
Event, type Event,
} from "electron"; } from "electron";
import url from "node:url"; import url from "node:url";
import fs from "node:fs"; import fs from "node:fs";

3027
yarn.lock

File diff suppressed because it is too large Load Diff