Compare commits

..

1 Commits

Author SHA1 Message Date
Michael Telatynski
f3c125483b Bump Electron to 38.4.0 to pick up Wayland change
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-10-22 14:46:13 +01:00
56 changed files with 7856 additions and 10335 deletions

2
.github/CODEOWNERS vendored
View File

@@ -1,5 +1,5 @@
* @element-hq/element-web-reviewers
/.github/workflows/** @element-hq/element-web-team
/package.json @element-hq/element-web-team
/pnpm-lock.yaml @element-hq/element-web-team
/yarn.lock @element-hq/element-web-team
/src/i18n/strings

View File

@@ -56,21 +56,6 @@ jobs:
CF_R2_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
CF_R2_TOKEN: ${{ secrets.CF_R2_TOKEN }}
trigger-pro-pipeline:
name: Trigger Pro pipeline
needs: prepare
runs-on: ubuntu-24.04
steps:
- uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
with:
repository: element-hq/element-web-pro
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
event-type: trigger-pipeline
client-payload: |-
{
"base-ref": "${{ github.ref_name }}"
}
windows:
if: github.event_name != 'workflow_dispatch' || inputs.windows
needs: prepare
@@ -122,11 +107,11 @@ jobs:
environment: ${{ needs.prepare.outputs.deploy == 'true' && 'packages.element.io' || '' }}
steps:
- name: Download artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
- name: Prepare artifacts for deployment
run: |
set -ex
set -x
# Windows
for arch in x64 arm64
@@ -161,25 +146,25 @@ jobs:
- name: "[Nightly] Strip version from installer file"
if: needs.prepare.outputs.nightly-version != ''
run: |
set -ex
set -x
# Windows
for arch in x64 arm64
do
if [ -d "win-$arch" ]; then mv packages.element.io/install/win32/$arch/{*,"Element Nightly Setup"}.exe; fi
[ -d "win-$arch" ] && mv packages.element.io/install/win32/$arch/{*,"Element Nightly Setup"}.exe
done
# macOS
if [ -d macos ]; then mv packages.element.io/install/macos/{*,"Element Nightly"}.dmg; fi
[ -d macos ] && mv packages.element.io/install/macos/{*,"Element Nightly"}.dmg
# Linux
if [ -d linux-amd64-sqlcipher-static ]; then mv packages.element.io/install/linux/glibc-x86-64/{*,element-desktop-nightly}.tar.gz; fi
if [ -d linux-arm64-sqlcipher-static ]; then mv packages.element.io/install/linux/glibc-aarch64/{*,element-desktop-nightly}.tar.gz; fi
[ -d linux-amd64-sqlcipher-static ] && mv packages.element.io/install/linux/glibc-x86-64/{*,element-desktop-nightly}.tar.gz
[ -d linux-arm64-sqlcipher-static ] && mv packages.element.io/install/linux/glibc-aarch64/{*,element-desktop-nightly}.tar.gz
- name: "[Release] Prepare release latest symlink"
if: needs.prepare.outputs.nightly-version == ''
run: |
set -ex
set -x
# Windows
for arch in x64 arm64
@@ -212,7 +197,7 @@ jobs:
- name: Stash packages.element.io
if: needs.prepare.outputs.deploy == 'false'
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: packages.element.io
path: packages.element.io
@@ -231,7 +216,7 @@ jobs:
- name: Notify packages.element.io of new files
if: needs.prepare.outputs.deploy == 'true'
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
uses: peter-evans/repository-dispatch@5fc4efd1a4797ddb68ffd0714a238564e4cc0e6f # v4
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
repository: element-hq/packages.element.io
@@ -250,7 +235,7 @@ jobs:
- name: Stash debs
if: needs.prepare.outputs.deploy == 'false' && needs.linux.result == 'success'
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: debs
path: |
@@ -289,14 +274,14 @@ jobs:
id-token: write # This is required for requesting the JWT
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5
with:
role-to-assume: arn:aws:iam::264135176173:role/Push-ElementDesktop-MSI
role-session-name: githubaction-run-${{ github.run_id }}
aws-region: ${{ env.AWS_REGION }}
- name: Download artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
pattern: win-*

View File

@@ -53,30 +53,29 @@ jobs:
runs-on: ubuntu-24.04
if: ${{ !cancelled() }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
cache: "pnpm"
cache: "yarn"
node-version: "lts/*"
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: yarn install --frozen-lockfile
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
pattern: blob-report-*
path: all-blob-reports
merge-multiple: true
- name: Merge into HTML Report
run: pnpm playwright merge-reports -c ./playwright.config.ts --reporter=html ./all-blob-reports
run: yarn playwright merge-reports -c ./playwright.config.ts --reporter=html ./all-blob-reports
- name: Upload HTML report
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: html-report
path: playwright-report

View File

@@ -77,9 +77,7 @@ jobs:
steps:
- name: Resolve docker image tag for push
if: github.event_name == 'push'
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$REF" >> $GITHUB_ENV
env:
REF: ${{ inputs.ref || github.ref_name }}
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$GITHUB_REF_NAME" >> $GITHUB_ENV
- name: Resolve docker image tag for release
if: github.event_name == 'release'
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:staging" >> $GITHUB_ENV
@@ -105,34 +103,33 @@ jobs:
}
}
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
repository: element-hq/element-desktop
ref: ${{ inputs.ref }}
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: ${{ inputs.prepare-artifact-name }}
- name: Cache .hak
id: cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
key: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }}
path: |
./.hak
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: .node-version
cache: "pnpm"
cache: "yarn"
env:
# Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0
- name: Install Deps
run: pnpm install --frozen-lockfile
run: "yarn install --frozen-lockfile"
- name: "Get modified files"
id: changed_files
@@ -158,18 +155,11 @@ jobs:
docker run \
-v ${{ github.workspace }}:/work -w /work \
-e SQLCIPHER_BUNDLED \
-e CI=1 \
$HAK_DOCKER_IMAGE \
pnpm build:native
yarn build:native
- name: Fix permissions
run: |
# For .hak
sudo chown -R $USER:$USER .hak
# DEBUG
ls -lah node_modules/7zip-bin/linux/*/7za
# For node_modules pnpm strict security
sudo chmod +x node_modules/7zip-bin/linux/*/7za
- name: Fix permissions on .hak
run: sudo chown -R $USER:$USER .hak
- name: Check native libraries in hak dependencies
run: |
@@ -185,8 +175,15 @@ jobs:
echo "ED_DEBIAN_CHANGELOG=changelog.Debian" >> $GITHUB_ENV
fi
# Workaround for https://github.com/electron-userland/electron-builder/issues/6116
# and https://github.com/electron-userland/electron-builder/issues/5721
- name: Install fpm
run: |
sudo gem install fpm
echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV
- name: Build App
run: pnpm build --publish never ${{ steps.config.outputs.build-args }} -l ${{ inputs.targets }}
run: yarn build --publish never ${{ steps.config.outputs.build-args }} -l ${{ inputs.targets }}
env:
VARIANT_PATH: variant.json
# Only set for Nightly builds
@@ -222,7 +219,7 @@ jobs:
# We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions
- name: Upload Artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
path: |

View File

@@ -72,25 +72,21 @@ permissions: {} # No permissions required
jobs:
build:
name: Build macOS Universal
runs-on: macos-15 # M1
runs-on: macos-14 # M1
environment: ${{ inputs.sign && 'packages.element.io' || '' }}
steps:
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1
with:
xcode-version: latest-stable
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
repository: element-hq/element-desktop
ref: ${{ inputs.ref }}
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: ${{ inputs.prepare-artifact-name }}
- name: Cache .hak
id: cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
key: ${{ runner.os }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: |
@@ -105,32 +101,31 @@ jobs:
rustup target add x86_64-apple-darwin
# M1 macos-14 comes without Python preinstalled
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
with:
python-version: "3.13"
# Install Quartz for DMG badges
# https://github.com/electron-userland/electron-builder/issues/9511#issuecomment-3774092888
- run: sudo pip3 install pyobjc-framework-Quartz
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: .node-version
cache: "pnpm"
cache: "yarn"
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
# Python 3.12 drops distutils which keytar relies on
- name: Install setuptools
run: pip3 install setuptools
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
run: pnpm build:native:universal
run: yarn build:native:universal
# We split these because electron-builder gets upset if we set CSC_LINK even to an empty string
- name: "[Signed] Build App"
if: inputs.sign != ''
run: |
pnpm build:universal --publish never -m ${{ inputs.targets }}
yarn build:universal --publish never -m ${{ inputs.targets }}
env:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
@@ -152,7 +147,7 @@ jobs:
- name: "[Unsigned] Build App"
if: inputs.sign == ''
run: |
pnpm build:universal --publish never -m ${{ inputs.targets }}
yarn build:universal --publish never -m ${{ inputs.targets }}
env:
CSC_IDENTITY_AUTO_DISCOVERY: false
VARIANT_PATH: variant.json
@@ -185,7 +180,7 @@ jobs:
# We exclude mac-universal as the unpacked app takes forever to upload and zip and dmg already contains it
- name: Upload Artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ inputs.artifact-prefix }}macos
path: |

View File

@@ -54,16 +54,15 @@ jobs:
outputs:
nightly-version: ${{ steps.versions.outputs.nightly }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: .node-version
cache: "pnpm"
cache: "yarn"
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- name: Fetch Element Web (matching branch)
id: branch-matching
@@ -72,10 +71,10 @@ jobs:
run: |
scripts/branch-match.sh
cp "$CONFIG_DIR/config.json" element-web/
pnpm --cwd element-web install --frozen-lockfile
pnpm --cwd element-web run build
yarn --cwd element-web install --frozen-lockfile
yarn --cwd element-web run build
mv element-web/webapp .
pnpm asar-webapp
yarn asar-webapp
env:
# These must be set for branch-match.sh to get the right branch
REPOSITORY: ${{ github.repository }}
@@ -84,7 +83,7 @@ jobs:
- name: Fetch Element Web (${{ inputs.version }})
if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped'
run: pnpm run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
- name: Copy variant config
run: cp "$CONFIG_DIR/build.json" variant.json
@@ -94,9 +93,8 @@ jobs:
# We split this out to save the build_* scripts having to do it to make use of `hashFiles` in the cache action
- name: Generate cache hash files
run: |
set -ex
# Add --no-sandbox as otherwise it fails because the helper isn't setuid root. It's only getting the version.
pnpm --silent electron --no-sandbox --version > electronVersion
yarn run --silent electron --no-sandbox --version > electronVersion
cat package.json | jq -c .hakDependencies | sha1sum > hakHash
find hak -type f -print0 | xargs -0 sha1sum >> hakHash
find scripts/hak -type f -print0 | xargs -0 sha1sum >> hakHash
@@ -167,7 +165,7 @@ jobs:
echo "| Element Web | [$WEB_VERSION](https://github.com/element-hq/element-web/commit/$WEB_VERSION) |" >> $GITHUB_STEP_SUMMARY
echo "| JS SDK | [$JS_VERSION](https://github.com/matrix-org/matrix-js-sdk/commit/$JS_VERSION) |" >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: webapp
retention-days: 1

View File

@@ -36,20 +36,19 @@ jobs:
name: Test ${{ inputs.project }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-desktop' || github.repository }}
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: .node-version
cache: "pnpm"
cache: "yarn"
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: ${{ inputs.artifact }}
path: dist
@@ -81,13 +80,13 @@ jobs:
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
timeout-minutes: 20
with:
run: pnpm test --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
run: yarn test --project=${{ inputs.project }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }} ${{ inputs.args }}
env:
ELEMENT_DESKTOP_EXECUTABLE: ${{ steps.executable.outputs.path }}
- name: Upload blob report
if: always() && inputs.blob_report
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: blob-report-${{ inputs.artifact }}
path: blob-report
@@ -95,7 +94,7 @@ jobs:
- name: Upload HTML report
if: always() && inputs.blob_report == false
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ inputs.artifact }}-test
path: playwright-report

View File

@@ -108,18 +108,18 @@ jobs:
}
}
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
repository: element-hq/element-desktop
ref: ${{ inputs.ref }}
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
- uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
with:
name: ${{ inputs.prepare-artifact-name }}
- name: Cache .hak
id: cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
path: |
@@ -148,28 +148,27 @@ jobs:
rustup default stable
rustup target add ${{ steps.config.outputs.target }}
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: .node-version
cache: "pnpm"
cache: "yarn"
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- name: Insert config snippet
if: steps.config.outputs.extra_config != ''
shell: bash
run: |
mkdir config-edit
pnpm asar extract webapp.asar config-edit
yarn asar extract webapp.asar config-edit
cd config-edit
mv config.json old-config.json
echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json
rm old-config.json
cd ..
rm webapp.asar
pnpm asar pack config-edit/ webapp.asar
yarn asar pack config-edit/ webapp.asar
- name: Set up sqlcipher macros
if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm')
@@ -187,7 +186,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: |
refreshenv
pnpm build:native --target ${{ steps.config.outputs.target }}
yarn build:native --target ${{ steps.config.outputs.target }}
- name: Install and configure eSigner CKA
run: |
@@ -233,7 +232,7 @@ jobs:
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
- name: Build App
run: pnpm build --publish never ${{ steps.config.outputs.build-args }} -w ${{ inputs.targets }}
run: yarn build --publish never ${{ steps.config.outputs.build-args }} -w ${{ inputs.targets }}
env:
VARIANT_PATH: variant.json
# Only set for Nightly builds
@@ -259,7 +258,7 @@ jobs:
| ForEach-Object -Process {. $env:SIGNTOOL_PATH verify /pa $_.FullName; if(!$?) { throw }}
- name: Upload Artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }}
path: |

View File

@@ -19,13 +19,13 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
with:
install: true
@@ -39,10 +39,10 @@ jobs:
platforms: linux/amd64
- name: Test image
run: docker run -v $PWD:/project element-desktop-dockerbuild pnpm install
run: docker run -v $PWD:/project element-desktop-dockerbuild yarn install
- name: Log in to the Container registry
uses: docker/login-action@3227f5311cb93ffd14d13e65d8cc400d30f4dd8a
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
@@ -52,7 +52,7 @@ jobs:
- name: Extract metadata for Docker
id: meta
if: github.event_name != 'pull_request'
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |

View File

@@ -9,82 +9,77 @@ jobs:
name: "Typescript Syntax Check"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: package.json
cache: "pnpm"
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- name: Typecheck
run: "pnpm run lint:types"
run: "yarn run lint:types"
i18n_lint:
name: "i18n Check"
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@3673fd3abbf8dfae1de849c6cd3e69e24ed7a766
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
permissions:
pull-requests: read
with:
hardcoded-words: "Element"
packageManager: pnpm
js_lint:
name: "ESLint"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: package.json
cache: "pnpm"
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- name: Run Linter
run: "pnpm run lint:js"
run: "yarn run lint:js"
workflow_lint:
name: "Workflow Lint"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: package.json
cache: "pnpm"
cache: "yarn"
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- name: Run Linter
run: "pnpm lint:workflows"
run: "yarn lint:workflows"
analyse_dead_code:
name: "Analyse Dead Code"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version-file: package.json
cache: "pnpm"
cache: "yarn"
- name: Install Deps
run: "pnpm install --frozen-lockfile"
run: "yarn install --frozen-lockfile"
- name: Run linter
run: "pnpm run lint:knip"
run: "yarn run lint:knip"

View File

@@ -12,7 +12,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10
with:
operations-per-run: 250
days-before-issue-stale: -1

1
.gitignore vendored
View File

@@ -18,4 +18,3 @@ yarn-error.log
/hak/**/*.js
/scripts/hak/**/*.js
.DS_Store
/playwright-report

View File

@@ -1 +1 @@
24.13.0
22.20.0

View File

@@ -7,7 +7,7 @@
/src/i18n/strings
/CHANGELOG.md
/package-lock.json
/pnpm-lock.yaml
/yarn.lock
/playwright/html-report
/playwright/test-results

View File

@@ -1,241 +1,3 @@
Changes in [1.12.9](https://github.com/element-hq/element-desktop/releases/tag/v1.12.9) (2026-01-27)
====================================================================================================
## ✨ Features
* Update macOS icon to use Icon Composer format ([#2791](https://github.com/element-hq/element-desktop/pull/2791)). Contributed by @t3chguy.
* Update macOS icon ([#2787](https://github.com/element-hq/element-desktop/pull/2787)). Contributed by @t3chguy.
* Update app icons ([#2778](https://github.com/element-hq/element-desktop/pull/2778)). Contributed by @t3chguy.
* Allow local log downloads when a rageshake URL is not configured. ([#31716](https://github.com/element-hq/element-web/pull/31716)). Contributed by @Half-Shot.
* Improve icon rendering accessibility ([#31776](https://github.com/element-hq/element-web/pull/31776)). Contributed by @t3chguy.
* Show "Bob shared this message" on messages shared via MSC4268 ([#31684](https://github.com/element-hq/element-web/pull/31684)). Contributed by @richvdh.
* Update the way we render icons for accessibility ([#31731](https://github.com/element-hq/element-web/pull/31731)). Contributed by @t3chguy.
* Switch from css masks to rendering svg ([#31681](https://github.com/element-hq/element-web/pull/31681)). Contributed by @t3chguy.
* Support for stable MSC4191 account management action parameter ([#31701](https://github.com/element-hq/element-web/pull/31701)). Contributed by @hughns.
* Support for stable m.oauth UIA stage from MSC4312 ([#31704](https://github.com/element-hq/element-web/pull/31704)). Contributed by @hughns.
* Switch to Compound icons to replace old icons ([#31667](https://github.com/element-hq/element-web/pull/31667)). Contributed by @t3chguy.
* Switch from svg masks to svg rendering in more places ([#31652](https://github.com/element-hq/element-web/pull/31652)). Contributed by @t3chguy.
* Switch from svg masks to svg rendering in more places ([#31650](https://github.com/element-hq/element-web/pull/31650)). Contributed by @t3chguy.
* Update notification icons using Compound icons ([#31671](https://github.com/element-hq/element-web/pull/31671)). Contributed by @t3chguy.
* Memoise ListView context ([#31668](https://github.com/element-hq/element-web/pull/31668)). Contributed by @t3chguy.
* Switch emoji picker to use emoji for header icons ([#31645](https://github.com/element-hq/element-web/pull/31645)). Contributed by @t3chguy.
* Replace icons with Compound alternatives ([#31642](https://github.com/element-hq/element-web/pull/31642)). Contributed by @t3chguy.
## 🐛 Bug Fixes
* Update macOS icon to use Icon Composer format ([#2791](https://github.com/element-hq/element-desktop/pull/2791)). Contributed by @t3chguy.
* Fix not starting on linux when user is not in /etc/passwd ([#2783](https://github.com/element-hq/element-desktop/pull/2783)). Contributed by @nim65s.
* Fix avatar decorations in thread activity centre not being atop avatar ([#31789](https://github.com/element-hq/element-web/pull/31789)). Contributed by @t3chguy.
* Fix room settings roles tab getting confused if power level change fails ([#31768](https://github.com/element-hq/element-web/pull/31768)). Contributed by @t3chguy.
* Custom themes now import highlights in css ([#31758](https://github.com/element-hq/element-web/pull/31758)). Contributed by @Philldomd.
* Use correct translation for url preview settings ([#31740](https://github.com/element-hq/element-web/pull/31740)). Contributed by @florianduros.
* Fix error shown if accepting a 3pid invite ([#31735](https://github.com/element-hq/element-web/pull/31735)). Contributed by @dbkr.
* Ensure correct focus configuration for Element Call before allowing users to call. ([#31490](https://github.com/element-hq/element-web/pull/31490)). Contributed by @Half-Shot.
* Fix emoji font in emoji picker header buttons ([#31679](https://github.com/element-hq/element-web/pull/31679)). Contributed by @t3chguy.
* fix flaky test by waiting for chat panel before counting messages ([#31633](https://github.com/element-hq/element-web/pull/31633)). Contributed by @BillCarsonFr.
Changes in [1.12.8](https://github.com/element-hq/element-desktop/releases/tag/v1.12.8) (2026-01-13)
====================================================================================================
## 🦖 Deprecations
* Remove `element_call.participant_limit` config and associated code. ([#31638](https://github.com/element-hq/element-web/pull/31638)). Contributed by @Half-Shot.
## ✨ Features
* Switch to rendering svg icons rather than masking them ([#31557](https://github.com/element-hq/element-web/pull/31557)). Contributed by @t3chguy.
* Update history visibility UX ([#31635](https://github.com/element-hq/element-web/pull/31635)). Contributed by @langleyd.
* Show correct call icon for joining a call. ([#31489](https://github.com/element-hq/element-web/pull/31489)). Contributed by @Half-Shot.
* Update StopGapWidgetDriver to support sticky events ([#31205](https://github.com/element-hq/element-web/pull/31205)). Contributed by @Half-Shot.
* Remove release announcements for new sounds \& room list ([#31544](https://github.com/element-hq/element-web/pull/31544)). Contributed by @t3chguy.
* Add button to restore from backup into /devtools ([#31581](https://github.com/element-hq/element-web/pull/31581)). Contributed by @mxandreas.
* Switch to non-solid compound icons for room settings \& composer ([#31561](https://github.com/element-hq/element-web/pull/31561)). Contributed by @t3chguy.
* Support encrypted state events MSC4362 ([#31513](https://github.com/element-hq/element-web/pull/31513)). Contributed by @andybalaam.
* Update prop type \& documentation for HistoryVisibleBanner and VM. ([#31545](https://github.com/element-hq/element-web/pull/31545)). Contributed by @kaylendog.
* Switch to Compound icons in more places ([#31560](https://github.com/element-hq/element-web/pull/31560)). Contributed by @t3chguy.
* Switch to rendering svg icons rather than masking them ([#31550](https://github.com/element-hq/element-web/pull/31550)). Contributed by @t3chguy.
* Make AccessibleButton contrast control compatible ([#31308](https://github.com/element-hq/element-web/pull/31308)). Contributed by @t3chguy.
* Switch to compound-design-tokens for platform icons ([#31543](https://github.com/element-hq/element-web/pull/31543)). Contributed by @t3chguy.
* Switch to rendering svg icons rather than masking them ([#31531](https://github.com/element-hq/element-web/pull/31531)). Contributed by @t3chguy.
* Switch to rendering svg icons rather than css masking ([#31517](https://github.com/element-hq/element-web/pull/31517)). Contributed by @t3chguy.
* Auto approve matrix rtc member event (`m.rtc.member`) (sticky events) ([#31452](https://github.com/element-hq/element-web/pull/31452)). Contributed by @toger5.
* Size Autocomplete relative to the RoomView height rather than the viewport height ([#31425](https://github.com/element-hq/element-web/pull/31425)). Contributed by @langleyd.
* Implement UI for history visibility acknowledgement. ([#31156](https://github.com/element-hq/element-web/pull/31156)). Contributed by @kaylendog.
* Export disposing hook from package ([#31498](https://github.com/element-hq/element-web/pull/31498)). Contributed by @MidhunSureshR.
* Change `header-panel-bg-hover` to use `var(--cpd-color-bg-action-secondary-hovered)` for better custom theming ([#31457](https://github.com/element-hq/element-web/pull/31457)). Contributed by @th0mcat.
* Improve icon rendering in iconized context menu ([#31458](https://github.com/element-hq/element-web/pull/31458)). Contributed by @t3chguy.
## 🐛 Bug Fixes
* Fix `Ctrl+Q` not closing the app ([#2749](https://github.com/element-hq/element-desktop/pull/2749)). Contributed by @MidhunSureshR.
* [Backport staging] Fix space settings visibility tab crashing ([#31705](https://github.com/element-hq/element-web/pull/31705)). Contributed by @RiotRobot.
* Fix expand/collapse reply preview not showing in some cases ([#31639](https://github.com/element-hq/element-web/pull/31639)). Contributed by @t3chguy.
* Fix bundled font or custom font not applied after theme switch ([#31591](https://github.com/element-hq/element-web/pull/31591)). Contributed by @florianduros.
* Add ol override CSS for markdown-body ([#31618](https://github.com/element-hq/element-web/pull/31618)). Contributed by @niamu.
* Fix reaction left margin in timeline card ([#31625](https://github.com/element-hq/element-web/pull/31625)). Contributed by @t3chguy.
* Open right panel timeline when jumping to event with maximised widget ([#31626](https://github.com/element-hq/element-web/pull/31626)). Contributed by @t3chguy.
* Fix Compound Link elements not having an underline. ([#31583](https://github.com/element-hq/element-web/pull/31583)). Contributed by @Half-Shot.
* Recalculate mentions metadata of forwarded messages based on message body ([#31193](https://github.com/element-hq/element-web/pull/31193)). Contributed by @twassman.
* Fix Room Preview Card Layout ([#31611](https://github.com/element-hq/element-web/pull/31611)). Contributed by @germain-gg.
* Fix: WidgetMessaging not properly closed causing side effects and bugs ([#31598](https://github.com/element-hq/element-web/pull/31598)). Contributed by @BillCarsonFr.
* Handle cross-signing keys missing locally and/or from secret storage ([#31367](https://github.com/element-hq/element-web/pull/31367)). Contributed by @uhoreg.
* fix: Allow wrapping in `Banner` component. ([#31532](https://github.com/element-hq/element-web/pull/31532)). Contributed by @kaylendog.
* Update algorithm for history visible banner. ([#31577](https://github.com/element-hq/element-web/pull/31577)). Contributed by @kaylendog.
* Fix styling issue when using EW modules ([#31533](https://github.com/element-hq/element-web/pull/31533)). Contributed by @florianduros.
* Prevent history visible banner from displaying in threads. ([#31535](https://github.com/element-hq/element-web/pull/31535)). Contributed by @kaylendog.
* Make the feedback icon be the right color in dark theme ([#31527](https://github.com/element-hq/element-web/pull/31527)). Contributed by @robintown.
Changes in [1.12.7](https://github.com/element-hq/element-desktop/releases/tag/v1.12.7) (2025-12-16)
====================================================================================================
## ✨ Features
* Replace legacy icons with compound ([#31424](https://github.com/element-hq/element-web/pull/31424)). Contributed by @t3chguy.
* Update polls UX to match EX Mobile and improve accessibility ([#31245](https://github.com/element-hq/element-web/pull/31245)). Contributed by @langleyd.
* Add option to enable read receipt and marker when user interact with UI ([#31353](https://github.com/element-hq/element-web/pull/31353)). Contributed by @florianduros.
* Introduce a hook to auto dispose view models ([#31178](https://github.com/element-hq/element-web/pull/31178)). Contributed by @MidhunSureshR.
* Update settings toggles to use consistent design across app. ([#30169](https://github.com/element-hq/element-web/pull/30169)). Contributed by @Half-Shot.
* Add ability to the room view to hide widgets ([#31400](https://github.com/element-hq/element-web/pull/31400)). Contributed by @langleyd.
* call: Pass the echo cancellation and noise suppression settings to EC ([#31317](https://github.com/element-hq/element-web/pull/31317)). Contributed by @BillCarsonFr.
* Tweak rendering of icons for a11y ([#31358](https://github.com/element-hq/element-web/pull/31358)). Contributed by @t3chguy.
* Implement new `renderNotificationDecoration` from module API ([#31389](https://github.com/element-hq/element-web/pull/31389)). Contributed by @MidhunSureshR.
* Replace more icons with compound ([#31381](https://github.com/element-hq/element-web/pull/31381)). Contributed by @t3chguy.
* Replace more icons with compound ([#31378](https://github.com/element-hq/element-web/pull/31378)). Contributed by @t3chguy.
* `<Banner/>`: Hide `Dismiss` button if `onClose` handler is not provided. ([#31362](https://github.com/element-hq/element-web/pull/31362)). Contributed by @kaylendog.
* Replace batch of legacy icons with compound design tokens ([#31360](https://github.com/element-hq/element-web/pull/31360)). Contributed by @t3chguy.
* MSC4380: Invite blocking ([#31268](https://github.com/element-hq/element-web/pull/31268)). Contributed by @richvdh.
* Tweak rendering of icons for accessibility ([#31346](https://github.com/element-hq/element-web/pull/31346)). Contributed by @t3chguy.
* Implement a shared `Banner` component. ([#31266](https://github.com/element-hq/element-web/pull/31266)). Contributed by @kaylendog.
* Allow the Login screen to use the dark theme ([#31293](https://github.com/element-hq/element-web/pull/31293)). Contributed by @richvdh.
## 🐛 Bug Fixes
* [Backport staging] Amend e2e normal icon from lock-solid to info ([#31559](https://github.com/element-hq/element-web/pull/31559)). Contributed by @t3chguy.
* [Backport staging] Fix CSS specificity causing icon issues in e2e verification ([#31548](https://github.com/element-hq/element-web/pull/31548)). Contributed by @RiotRobot.
* [Backport staging] Fix e2e icons in CompleteSecurity \& SetupEncryptionBody ([#31522](https://github.com/element-hq/element-web/pull/31522)). Contributed by @RiotRobot.
* [Backport staging] Remove an extra paragraph in advanced room settings ([#31511](https://github.com/element-hq/element-web/pull/31511)). Contributed by @RiotRobot.
* [Backport staging] Don't show the key storage out of sync toast when backup disabled ([#31507](https://github.com/element-hq/element-web/pull/31507)). Contributed by @RiotRobot.
* Fix composer button visibility in contrast colour mode ([#31255](https://github.com/element-hq/element-web/pull/31255)). Contributed by @t3chguy.
* Ensure correct room version is used and permissions are appropriately sert when creating rooms ([#31464](https://github.com/element-hq/element-web/pull/31464)). Contributed by @Half-Shot.
* Fix e2e icon rendering ([#31454](https://github.com/element-hq/element-web/pull/31454)). Contributed by @t3chguy.
* EventIndexer: ensure we add initial checkpoints when the db is first opened ([#31448](https://github.com/element-hq/element-web/pull/31448)). Contributed by @richvdh.
* Fix `/join <alias>` command failing due to race condition ([#31433](https://github.com/element-hq/element-web/pull/31433)). Contributed by @MidhunSureshR.
* MessageEventIndexDialog: distinguish indexed rooms ([#31436](https://github.com/element-hq/element-web/pull/31436)). Contributed by @richvdh.
* Move `EditInPlace` out of `Form` (Fixes: reloading EW on EC url update) ([#31434](https://github.com/element-hq/element-web/pull/31434)). Contributed by @toger5.
* Fixes issue where cursor would jump to the beginning of the input field after converting Japanese text and pressing Tab ([#31432](https://github.com/element-hq/element-web/pull/31432)). Contributed by @shinaoka.
* Fix widgets getting stuck in loading states ([#31314](https://github.com/element-hq/element-web/pull/31314)). Contributed by @robintown.
* Room list: fix room options remaining on room item after mouse leaving ([#31414](https://github.com/element-hq/element-web/pull/31414)). Contributed by @florianduros.
* Make `RoomList.showMessagePreview` configurable by `config.json` ([#31419](https://github.com/element-hq/element-web/pull/31419)). Contributed by @florianduros.
* Fix bug which caused app not to load correctly when `force_verification` is enabled ([#31265](https://github.com/element-hq/element-web/pull/31265)). Contributed by @richvdh.
* Room list: display the menu option on the room list item when clicked/opened ([#31380](https://github.com/element-hq/element-web/pull/31380)). Contributed by @florianduros.
* Fix handling of SVGs ([#31359](https://github.com/element-hq/element-web/pull/31359)). Contributed by @t3chguy.
* Fix word wrapping in expanded left panel buttons ([#31377](https://github.com/element-hq/element-web/pull/31377)). Contributed by @t3chguy.
* Fix aspect ratio on error view background ([#31361](https://github.com/element-hq/element-web/pull/31361)). Contributed by @t3chguy.
* Fix failure to request persistent storage perms ([#31299](https://github.com/element-hq/element-web/pull/31299)). Contributed by @richvdh.
* Fix calls sometimes not knowing that they're presented ([#31313](https://github.com/element-hq/element-web/pull/31313)). Contributed by @robintown.
Changes in [1.12.6](https://github.com/element-hq/element-desktop/releases/tag/v1.12.6) (2025-12-03)
====================================================================================================
This release fixes a bug where 1:1 calling was incorrectly not available if no Element Call focus was set.
## 🐛 Bug Fixes
* Add option to pick call options for voice calls. ([#31413](https://github.com/element-hq/element-web/pull/31413)).
Changes in [1.12.5](https://github.com/element-hq/element-desktop/releases/tag/v1.12.5) (2025-12-02)
====================================================================================================
## ✨ Features
* Update Emojibase to v17 ([#31307](https://github.com/element-hq/element-web/pull/31307)). Contributed by @t3chguy.
* Adds tooltip for compose menu ([#31122](https://github.com/element-hq/element-web/pull/31122)). Contributed by @byteplow.
* Add option to hide pinned message banner in room view ([#31296](https://github.com/element-hq/element-web/pull/31296)). Contributed by @florianduros.
* update twemoji to not monochromise emoji with BLACK in their name ([#31281](https://github.com/element-hq/element-web/pull/31281)). Contributed by @ara4n.
* upgrade to twemoji 17.0.2 and fix #14695 ([#31267](https://github.com/element-hq/element-web/pull/31267)). Contributed by @ara4n.
* Add options to hide right panel in room view ([#31252](https://github.com/element-hq/element-web/pull/31252)). Contributed by @florianduros.
* Delayed event management: split endpoints, no auth ([#31183](https://github.com/element-hq/element-web/pull/31183)). Contributed by @AndrewFerr.
* Support using Element Call for voice calls in DMs ([#30817](https://github.com/element-hq/element-web/pull/30817)). Contributed by @Half-Shot.
* Improve screen reader accessibility of auth pages ([#31236](https://github.com/element-hq/element-web/pull/31236)). Contributed by @t3chguy.
* Add posthog tracking for key backup toasts ([#31195](https://github.com/element-hq/element-web/pull/31195)). Contributed by @Half-Shot.
## 🐛 Bug Fixes
* Return to using Fira Code as the default monospace font ([#31302](https://github.com/element-hq/element-web/pull/31302)). Contributed by @ara4n.
* Fix case of home screen being displayed erroneously ([#31301](https://github.com/element-hq/element-web/pull/31301)). Contributed by @langleyd.
* Fix message edition and reply when multiple rooms at displayed the same moment ([#31280](https://github.com/element-hq/element-web/pull/31280)). Contributed by @florianduros.
* Key storage out of sync: reset key backup when needed ([#31279](https://github.com/element-hq/element-web/pull/31279)). Contributed by @uhoreg.
* Fix invalid events crashing entire room rather than just their tile ([#31256](https://github.com/element-hq/element-web/pull/31256)). Contributed by @t3chguy.
* Fix expand button of space panel getting cut off at the edges ([#31259](https://github.com/element-hq/element-web/pull/31259)). Contributed by @MidhunSureshR.
* Fix pill buttons in dialogs ([#31246](https://github.com/element-hq/element-web/pull/31246)). Contributed by @dbkr.
* Fix blank sections at the top and bottom of the member list when scrolling ([#31198](https://github.com/element-hq/element-web/pull/31198)). Contributed by @langleyd.
* Fix emoji category selection with keyboard ([#31162](https://github.com/element-hq/element-web/pull/31162)). Contributed by @langleyd.
Changes in [1.12.4](https://github.com/element-hq/element-desktop/releases/tag/v1.12.4) (2025-11-18)
====================================================================================================
## ✨ Features
* Update nightly and release builds to use the dedicated subdomain for 'bug\_report\_endpoint\_url' ([#2677](https://github.com/element-hq/element-desktop/pull/2677)). Contributed by @benbz.
* Apply aria-hidden to emoji in SAS verification ([#31204](https://github.com/element-hq/element-web/pull/31204)). Contributed by @t3chguy.
* Add options to hide header and composer of room view for the module api ([#31095](https://github.com/element-hq/element-web/pull/31095)). Contributed by @florianduros.
* Experimental Module API Additions ([#30863](https://github.com/element-hq/element-web/pull/30863)). Contributed by @dbkr.
* Change polls to use fieldset/legend markup ([#31160](https://github.com/element-hq/element-web/pull/31160)). Contributed by @langleyd.
* Use compound Button styles for Jitsi button ([#31159](https://github.com/element-hq/element-web/pull/31159)). Contributed by @Half-Shot.
* Add FocusLock to emoji picker ([#31146](https://github.com/element-hq/element-web/pull/31146)). Contributed by @langleyd.
* Move room name, avatar, and topic to IOpts. ([#30981](https://github.com/element-hq/element-web/pull/30981)). Contributed by @kaylendog.
* Add a devtool for looking at users and their devices ([#30983](https://github.com/element-hq/element-web/pull/30983)). Contributed by @uhoreg.
## 🐛 Bug Fixes
* Fix room list handling of membership changes ([#31197](https://github.com/element-hq/element-web/pull/31197)). Contributed by @t3chguy.
* Fix room list unable to be resized when displayed after a module ([#31186](https://github.com/element-hq/element-web/pull/31186)). Contributed by @florianduros.
* Inhibit keyboard highlights in dialogs when effector is not in focus ([#31181](https://github.com/element-hq/element-web/pull/31181)). Contributed by @t3chguy.
* Strip mentions from forwarded messages ([#30884](https://github.com/element-hq/element-web/pull/30884)). Contributed by @twassman.
* Don't allow pin or edit of messages with a send status ([#31158](https://github.com/element-hq/element-web/pull/31158)). Contributed by @langleyd.
* Hide room header buttons if the room hasn't been created yet. ([#31092](https://github.com/element-hq/element-web/pull/31092)). Contributed by @Half-Shot.
* Fix screen readers not indicating the emoji picker search field is focused. ([#31128](https://github.com/element-hq/element-web/pull/31128)). Contributed by @langleyd.
* Fix emoji picker highlight missing when not active element ([#31148](https://github.com/element-hq/element-web/pull/31148)). Contributed by @t3chguy.
* Add relevant aria attribute for selected emoji in the emoji picker ([#31125](https://github.com/element-hq/element-web/pull/31125)). Contributed by @t3chguy.
* Fix tooltips within context menu portals being unreliable ([#31129](https://github.com/element-hq/element-web/pull/31129)). Contributed by @t3chguy.
* Avoid excessive re-render of room list and member list ([#31131](https://github.com/element-hq/element-web/pull/31131)). Contributed by @florianduros.
* Make emoji picker height responsive. ([#31130](https://github.com/element-hq/element-web/pull/31130)). Contributed by @langleyd.
* Emoji Picker: Focused emoji does not move with the arrow keys ([#30893](https://github.com/element-hq/element-web/pull/30893)). Contributed by @langleyd.
* Fix audio player seek bar position ([#31127](https://github.com/element-hq/element-web/pull/31127)). Contributed by @florianduros.
* Add aria label to emoji picker search ([#31126](https://github.com/element-hq/element-web/pull/31126)). Contributed by @langleyd.
Changes in [1.12.3](https://github.com/element-hq/element-desktop/releases/tag/v1.12.3) (2025-11-04)
====================================================================================================
## 🦖 Deprecations
* Remove allowVoipWithNoMedia feature flag ([#31087](https://github.com/element-hq/element-web/pull/31087)). Contributed by @Half-Shot.
## ✨ Features
* Change module API to be an instance getter ([#31025](https://github.com/element-hq/element-web/pull/31025)). Contributed by @dbkr.
## 🐛 Bug Fixes
* Wait for Electron to be ready before we fire syntax error dialog ([#2659](https://github.com/element-hq/element-desktop/pull/2659)). Contributed by @t3chguy.
* Show hover elements when keyboard focus is within an event tile ([#31078](https://github.com/element-hq/element-web/pull/31078)). Contributed by @t3chguy.
* Ensure toolbar navigation pattern works in MessageActionBar ([#31080](https://github.com/element-hq/element-web/pull/31080)). Contributed by @t3chguy.
* Ensure sent markers are hidden when showing thread summary. ([#31076](https://github.com/element-hq/element-web/pull/31076)). Contributed by @Half-Shot.
* Fix translation in dev mode ([#31045](https://github.com/element-hq/element-web/pull/31045)). Contributed by @florianduros.
* Fix sort order in space hierarchy ([#30975](https://github.com/element-hq/element-web/pull/30975)). Contributed by @t3chguy.
* New Room list: don't display message preview of thread ([#31043](https://github.com/element-hq/element-web/pull/31043)). Contributed by @florianduros.
* Revert "A11y: move focus to right panel when opened" ([#30999](https://github.com/element-hq/element-web/pull/30999)). Contributed by @florianduros.
* Fix highlights in messages (or search results) breaking links ([#30264](https://github.com/element-hq/element-web/pull/30264)). Contributed by @bojidar-bg.
* Add prepare script ([#31030](https://github.com/element-hq/element-web/pull/31030)). Contributed by @dbkr.
* Fix html exports by adding SDKContext ([#30987](https://github.com/element-hq/element-web/pull/30987)). Contributed by @t3chguy.
Changes in [1.12.2](https://github.com/element-hq/element-desktop/releases/tag/v1.12.2) (2025-10-21)
====================================================================================================
## ✨ Features

View File

@@ -14,7 +14,7 @@ Element Desktop is a Matrix client for desktop platforms with Element Web at its
Before you do anything else, fetch the dependencies:
```
pnpm install
yarn install
```
# Fetching Element
@@ -26,7 +26,7 @@ so the first step is to get a working copy of Element Web. There are a few ways
# Fetch the prebuilt release Element package from the element-web GitHub releases page. The version
# fetched will be the same as the local element-desktop package.
# We're explicitly asking for no config, so the packaged Element will have no config.json.
pnpm run fetch --noverify --cfgdir ""
yarn run fetch --noverify --cfgdir ""
```
...or if you'd like to use GPG to verify the downloaded package:
@@ -35,9 +35,9 @@ pnpm run fetch --noverify --cfgdir ""
# Fetch the Element public key from the element.io web server over a secure connection and import
# it into your local GPG keychain (you'll need GPG installed). You only need to to do this
# once.
pnpm run fetch --importkey
yarn run fetch --importkey
# Fetch the package and verify the signature
pnpm run fetch --cfgdir ""
yarn run fetch --cfgdir ""
```
...or either of the above, but fetching a specific version of Element:
@@ -45,16 +45,14 @@ pnpm run fetch --cfgdir ""
```
# Fetch the prebuilt release Element package from the element-web GitHub releases page. The version
# fetched will be the same as the local element-desktop package.
pnpm run fetch --noverify --cfgdir "" v1.5.6
yarn run fetch --noverify --cfgdir "" v1.5.6
```
If you only want to run the app locally and don't need to build packages, you can
provide the `webapp` directory directly:
```
# Assuming you've checked out and built a copy of element-web in ../element-web.
# Note that you will not be able to `pnpm build` after this, but `pnpm start`
# will work fine.
# Assuming you've checked out and built a copy of element-web in ../element-web
ln -s ../element-web/webapp ./
```
@@ -72,7 +70,7 @@ which include support for searching in encrypted rooms and secure storage. Skipp
Then, run
```
pnpm run build
yarn run build
```
This will do a couple of things:
@@ -88,12 +86,12 @@ Alternatively, you can also build using docker, which will always produce the li
```
# Run this once to make the docker image
pnpm run docker:setup
yarn run docker:setup
pnpm run docker:install
yarn run docker:install
# if you want to build the native modules (this will take a while)
pnpm run docker:build:native
pnpm run docker:build
yarn run docker:build:native
yarn run docker:build
```
After running, the packages should be in `dist/`.
@@ -103,19 +101,19 @@ After running, the packages should be in `dist/`.
If you'd just like to run the electron app locally for development:
```
pnpm start
yarn start
```
# Config
If you'd like the packaged Element to have a configuration file, you can create a
config directory and place `config.json` in there, then specify this directory
with the `--cfgdir` option to `pnpm run fetch`, eg:
with the `--cfgdir` option to `yarn run fetch`, eg:
```
mkdir myconfig
cp /path/to/my/config.json myconfig/
pnpm run fetch --cfgdir myconfig
yarn run fetch --cfgdir myconfig
```
The config dir for the official Element app is in `element.io`. If you use this,

BIN
build/icon.icns Normal file
View File

Binary file not shown.

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

View File

@@ -1,29 +0,0 @@
{
"fill" : "automatic",
"groups" : [
{
"layers" : [
{
"glass" : false,
"image-name" : "element.png",
"name" : "element"
}
],
"name" : "Figma",
"shadow" : {
"kind" : "none",
"opacity" : 0.5
},
"specular" : false,
"translucency" : {
"enabled" : false,
"value" : 0.5
}
}
],
"supported-platforms" : {
"squares" : [
"macOS"
]
}
}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -1,13 +1,16 @@
# Docker image to facilitate building Element Desktop's native bits using a glibc version (2.31)
# with broader compatibility, down to Debian bullseye & Ubuntu focal.
FROM rust:bullseye@sha256:3ebcc2d6d71fb93a2967e35723902c51dd87dbb36f66f795a58d7921553fbcd4
FROM rust:bullseye@sha256:d7cb9ffcc56d9f1a6334f54aae6614efe2814516db17e3acd4b88293dd8dc31c
ENV DEBIAN_FRONTEND=noninteractive
RUN curl --proto "=https" -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-* /yarn && ln -s /yarn/bin/yarn /usr/bin/yarn
RUN apt-get -qq update && apt-get -y -qq dist-upgrade && \
apt-get -y -qq install --no-install-recommends \
# tclsh is required for building SQLite as part of SQLCipher
tcl \
# libsecret-1-dev is required even for prebuild keytar
libsecret-1-dev \
# Used by seshat (when not SQLCIPHER_STATIC) \
libsqlcipher-dev && \
apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*

View File

@@ -9,4 +9,3 @@ ARCH="${archMap["$TARGETARCH"]}"
NODE_VERSION=$(cat /.node-version | sed -e 's/^v//')
curl --proto "=https" -L "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md
corepack enable

View File

@@ -13,9 +13,10 @@ you will need debug symbols.
2. Figure out which version of Electron your Element-Desktop is based on. The
best way to do this is to figure out the version of Element-Desktop, then
look at
[`package.json`](https://github.com/element-hq/element-desktop/blob/develop/package.json)
for the corresponding version. There will be an entry within `dependencies` of
`electron`: the value will tell you the version of Electron that was used for that version of Element-Desktop.
[`yarn.lock`](https://github.com/element-hq/element-desktop/blob/develop/yarn.lock)
for the corresponding version. There should be an entry starting
`electron@`, and under it a `version` line: this will tell you the version
of Electron that was used for that version of Element-Desktop.
3. Go to [Electron's releases page](https://github.com/electron/electron/releases/)
and find the version you just identified. Under "Assets", download

View File

@@ -13,34 +13,12 @@ custom build of Element without installing the various build tools required.
The process is automated by [vector-im/element-builder](https://github.com/vector-im/element-builder)
when releasing.
## Use docker
If you are building for Linux, you can build the native modules with:
```
pnpm docker:setup
pnpm docker:install
INDOCKER_SQLCIPHER_BUNDLED=1 pnpm docker:build:native
```
The above will build `matrix-seshat` in
`docker/node_modules/matrix-seshat`. You can then either run `pnpm docker:build`
to build the app inside docker, or:
```
pnpm link docker/node_modules/matrix-seshat
```
... and build the app with `pnpm build` or run it with `pnpm start`.
(See also https://github.com/element-hq/element-desktop#docker.)
## Building
Install the pre-requisites for your system:
- [Windows pre-requisites](https://github.com/vector-im/element-desktop/blob/develop/docs/windows-requirements.md)
- Linux: TODO. Using the docker environment as above is recommended.
- Linux: TODO
- OS X: TODO
Then optionally, [add seshat and dependencies to support search in E2E rooms](#adding-seshat-for-search-in-e2e-encrypted-rooms).
@@ -48,7 +26,7 @@ Then optionally, [add seshat and dependencies to support search in E2E rooms](#a
Then, to build for an architecture selected automatically based on your system (recommended), run:
```
pnpm run build:native
yarn run build:native
```
If you need to build for a specific architecture, see [here](#compiling-for-specific-architectures).
@@ -66,20 +44,19 @@ Seshat also depends on the SQLCipher library to store its data in encrypted form
on disk. You'll need to install it via your OS package manager.
After installing the Rust compiler and SQLCipher, Seshat support can be added
using pnpm at the root of this project:
using yarn at the root of this project:
pnpm add matrix-seshat
yarn add matrix-seshat
You will have to rebuild the native libraries against electron's version
of node rather than your system node, using the `electron-build-env` tool.
This is also needed to when pulling in changes to Seshat using `pnpm link`.
This is also needed to when pulling in changes to Seshat using `yarn link`.
pnpm add electron-build-env
yarn add electron-build-env
Recompiling Seshat itself can be done like so:
ELECTRON_VERSION=$(electron --version)
pnpm electron-build-env -- --electron ${ELECTRON_VERSION#v} -- neon build matrix-seshat --release
yarn run electron-build-env -- --electron 6.1.1 -- neon build matrix-seshat --release
Please make sure to include all the `--` as well as the `--release` command line
switch at the end. Modify your electron version accordingly depending on the
@@ -88,7 +65,7 @@ version that is installed on your system.
After this is done the Electron version of Element can be run from the main folder
as usual using:
pnpm start
yarn start
### Statically linking libsqlcipher
@@ -108,26 +85,26 @@ and https://github.com/vector-im/element-web/issues/20926.
On macOS, you can build universal native modules too:
```
pnpm run build:native:universal
yarn run build:native:universal
```
...or you can build for a specific architecture:
```
pnpm run build:native --target x86_64-apple-darwin
yarn run build:native --target x86_64-apple-darwin
```
or
```
pnpm run build:native --target aarch64-apple-darwin
yarn run build:native --target aarch64-apple-darwin
```
You'll then need to create a built bundle with the same architecture.
To bundle a universal build for macOS, run:
```
pnpm run build:universal
yarn run build:universal
```
### Windows
@@ -135,13 +112,13 @@ pnpm run build:universal
If you're on Windows, you can choose to build specifically for 32 or 64 bit:
```
pnpm run build:32
yarn run build:32
```
or
```
pnpm run build:64
yarn run build:64
```
### Cross compiling
@@ -155,19 +132,19 @@ at this time.
The native module build system keeps the different architectures
separate, so you can keep native modules for several architectures at the same
time and switch which are active using a `pnpm run hak copy` command, passing
time and switch which are active using a `yarn run hak copy` command, passing
the appropriate architectures. This will error if you haven't yet built those
architectures. eg:
```
pnpm run build:native --target x86_64-apple-darwin
yarn run build:native --target x86_64-apple-darwin
# We've now built & linked into place native modules for Intel
pnpm run build:native --target aarch64-apple-darwin
yarn run build:native --target aarch64-apple-darwin
# We've now built Apple Silicon modules too, and linked them into place as the active ones
pnpm run hak copy --target x86_64-apple-darwin
yarn run hak copy --target x86_64-apple-darwin
# We've now switched back to our Intel modules
pnpm run hak copy --target x86_64-apple-darwin --target aarch64-apple-darwin
yarn run hak copy --target x86_64-apple-darwin --target aarch64-apple-darwin
# Now our native modules are universal x86_64+aarch64 binaries
```

View File

@@ -16,7 +16,7 @@ If you want to build native modules, make sure that the following tools are inst
You can install the above tools using [Chocolatey](https://chocolatey.org/install):
```cmd
choco install --no-progress -y git nodejs-lts pnpm python StrawberryPerl rustup.install nasm magicsplat-tcl-tk
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:

View File

@@ -158,13 +158,10 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
gatekeeperAssess: true,
strictVerify: true,
entitlements: "./build/entitlements.mac.plist",
icon: "build/icon.icon",
icon: "build/icon.icns",
mergeASARs: true,
x64ArchFiles: "**/matrix-seshat/*.node", // hak already runs lipo
},
dmg: {
badgeIcon: "build/icon.icon",
},
win: {
target: ["squirrel", "msi"],
signtoolOptions: {

View File

@@ -19,7 +19,7 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://rageshakes.element.io/api/submit",
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"show_labs_settings": true,
"room_directory": {

View File

@@ -19,7 +19,7 @@
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://rageshakes.element.io/api/submit",
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"room_directory": {
"servers": ["matrix.org", "gitter.im"]

View File

@@ -3,7 +3,7 @@
"productName": "Element",
"main": "lib/electron-main.js",
"exports": "./lib/electron-main.js",
"version": "1.12.9",
"version": "1.12.2",
"description": "Element: the future of secure communication",
"author": {
"name": "Element",
@@ -21,43 +21,43 @@
"node": ">=18.0.0"
},
"scripts": {
"i18n": "matrix-gen-i18n && pnpm i18n:sort && pnpm i18n:lint",
"i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json",
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint",
"i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json",
"i18n:lint": "prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && pnpm i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
"mkdirs": "mkdirp packages deploys",
"fetch": "pnpm run mkdirs && tsx scripts/fetch-package.ts",
"fetch": "yarn run mkdirs && tsx scripts/fetch-package.ts",
"asar-webapp": "asar p webapp webapp.asar",
"start": "pnpm run build:ts && pnpm run build:res && electron .",
"lint": "pnpm lint:types && pnpm lint:js && pnpm lint:workflows",
"start": "yarn run build:ts && yarn run build:res && electron .",
"lint": "yarn lint:types && yarn lint:js && yarn lint:workflows",
"lint:js": "eslint --max-warnings 0 src hak playwright scripts && prettier --check .",
"lint:js-fix": "eslint --fix --max-warnings 0 src hak playwright scripts && prettier --log-level=warn --write .",
"lint:types": "pnpm lint:types:src && pnpm lint:types:test && pnpm lint:types:scripts && pnpm lint:types:hak",
"lint:types": "yarn lint:types:src && yarn lint:types:test && yarn lint:types:scripts && yarn lint:types:hak",
"lint:types:src": "tsc --noEmit",
"lint:types:test": "tsc --noEmit -p playwright/tsconfig.json",
"lint:types:scripts": "tsc --noEmit -p scripts/tsconfig.json",
"lint:types:hak": "tsc --noEmit -p hak/tsconfig.json",
"lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'",
"lint:knip": "knip",
"build:native": "pnpm run hak",
"build:native:universal": "pnpm run hak --target x86_64-apple-darwin fetchandbuild && pnpm run hak --target aarch64-apple-darwin fetchandbuild && pnpm run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
"build:32": "pnpm run build:ts && pnpm run build:res && electron-builder --ia32",
"build:64": "pnpm run build:ts && pnpm run build:res && electron-builder --x64",
"build:universal": "pnpm run build:ts && pnpm run build:res && electron-builder --universal",
"build": "pnpm run build:ts && pnpm run build:res && electron-builder",
"build:native": "yarn run hak",
"build:native:universal": "yarn run hak --target x86_64-apple-darwin fetchandbuild && yarn run hak --target aarch64-apple-darwin fetchandbuild && yarn run hak --target x86_64-apple-darwin --target aarch64-apple-darwin copyandlink",
"build:32": "yarn run build:ts && yarn run build:res && electron-builder --ia32",
"build:64": "yarn run build:ts && yarn run build:res && electron-builder --x64",
"build:universal": "yarn run build:ts && yarn run build:res && electron-builder --universal",
"build": "yarn run build:ts && yarn run build:res && electron-builder",
"build:ts": "tsc",
"build:res": "tsx scripts/copy-res.ts",
"docker:setup": "docker build --platform linux/amd64 -t element-desktop-dockerbuild -f dockerbuild/Dockerfile .",
"docker:build:native": "scripts/in-docker.sh pnpm run hak",
"docker:build": "scripts/in-docker.sh pnpm run build",
"docker:install": "scripts/in-docker.sh pnpm install",
"docker:build:native": "scripts/in-docker.sh yarn run hak",
"docker:build": "scripts/in-docker.sh yarn run build",
"docker:install": "scripts/in-docker.sh yarn install",
"clean": "rimraf webapp.asar dist packages deploys lib",
"hak": "tsx scripts/hak/index.ts",
"test": "playwright test",
"test:open": "pnpm test --ui",
"test:open": "yarn test --ui",
"test:screenshots:build": "docker build playwright -t element-desktop-playwright --platform linux/amd64",
"test:screenshots:run": "docker run --rm --network host -v $(pwd):/work/element-desktop -v element-desktop-playwright:/work/element-desktop/node_modules -v /var/run/docker.sock:/var/run/docker.sock --platform linux/amd64 -it element-desktop-playwright",
"postinstall": "electron-builder install-app-deps"
"test:screenshots:run": "docker run --rm --network host -v $(pwd):/work/element-desktop -v /var/run/docker.sock:/var/run/docker.sock --platform linux/amd64 -it element-desktop-playwright",
"postinstall": "patch-package && electron-builder install-app-deps"
},
"dependencies": {
"@sentry/electron": "^7.0.0",
@@ -65,6 +65,7 @@
"counterpart": "^0.18.6",
"electron-store": "^11.0.0",
"electron-window-state": "^5.0.3",
"keytar-forked": "7.10.0",
"minimist": "^1.2.6",
"png-to-ico": "^3.0.0",
"uuid": "^13.0.0"
@@ -76,7 +77,7 @@
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@electron/asar": "4.0.1",
"@playwright/test": "1.58.1",
"@playwright/test": "1.56.0",
"@stylistic/eslint-plugin": "^5.0.0",
"@types/auto-launch": "^5.0.1",
"@types/counterpart": "^0.18.1",
@@ -85,14 +86,13 @@
"@types/pacote": "^11.1.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"app-builder-lib": "26.6.0",
"chokidar": "^5.0.0",
"app-builder-lib": "26.1.0",
"chokidar": "^4.0.0",
"detect-libc": "^2.0.0",
"electron": "40.1.0",
"electron-builder": "26.6.0",
"electron-builder-squirrel-windows": "26.6.0",
"electron": "38.4.0",
"electron-builder": "26.1.0",
"electron-builder-squirrel-windows": "26.1.0",
"electron-devtools-installer": "^4.0.0",
"electron-playwright-helpers": "^2.1.0",
"eslint": "^8.26.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^10.0.0",
@@ -100,13 +100,15 @@
"eslint-plugin-matrix-org": "^3.0.0",
"eslint-plugin-n": "^17.12.0",
"eslint-plugin-unicorn": "^56.0.0",
"glob": "^13.0.0",
"glob": "^11.0.0",
"husky": "^9.1.6",
"knip": "^5.0.0",
"lint-staged": "^16.0.0",
"matrix-web-i18n": "3.6.0",
"matrix-web-i18n": "^3.2.1",
"mkdirp": "^3.0.0",
"pacote": "^21.0.0",
"patch-package": "^8.0.1",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.0.0",
"rimraf": "^6.0.0",
"tar": "^7.0.0",
@@ -117,27 +119,8 @@
"matrix-seshat": "^4.0.1"
},
"resolutions": {
"atomically": "2.1.0",
"@types/node": "18.19.130",
"config-file-ts": "0.2.8-rc1",
"node-abi": "4.26.0",
"@types/pg-pool": "2.0.7"
},
"pnpm": {
"onlyBuiltDependencies": [
"electron"
],
"patchedDependencies": {
"@types/auto-launch": "patches/@types__auto-launch.patch"
},
"peerDependencyRules": {
"allowedVersions": {
"eslint": "8"
}
},
"allowedDeprecatedVersions": {
"eslint": "8"
}
},
"packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264"
"node-abi": "4.14.0"
}
}

View File

@@ -1,7 +1,7 @@
diff --git a/index.d.ts b/index.d.ts
diff --git a/node_modules/@types/auto-launch/index.d.ts b/node_modules/@types/auto-launch/index.d.ts
index a30a77c..e512ce1 100644
--- a/index.d.ts
+++ b/index.d.ts
--- a/node_modules/@types/auto-launch/index.d.ts
+++ b/node_modules/@types/auto-launch/index.d.ts
@@ -25,6 +25,13 @@ interface AutoLaunchOptions {
declare class AutoLaunch {
constructor(options: AutoLaunchOptions);

View File

@@ -1,11 +1,8 @@
FROM mcr.microsoft.com/playwright:v1.58.1-jammy@sha256:1b52a0833ae13c3bb16f728eec5f9216db29f3cd5eec21a9cbd33e7623723c0e
FROM mcr.microsoft.com/playwright:v1.56.0-jammy@sha256:0ff863c1700afc42fb0964275e64e4980d539d999303e37cdacb52e9b73af9e3
WORKDIR /work/element-desktop
RUN apt-get update && apt-get -y install xvfb dbus-x11 && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
# Create node_modules & dist dirs so that the volumes have the correct permissions
RUN mkdir node_modules dist && chown 1000:1000 node_modules dist
RUN apt-get update && apt-get -y install xvfb && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
USER 1000:1000

View File

@@ -8,11 +8,4 @@ sleep 2
export DISPLAY=:99
pnpm install --frozen-lockfile
pnpm build -l --dir
PLAYWRIGHT_HTML_OPEN=never ELEMENT_DESKTOP_EXECUTABLE="./dist/linux-unpacked/element-desktop" \
npx playwright test --update-snapshots --reporter line,html "$1"
# Clean up
rm -R core qemu_* || exit 0
npx playwright test --update-snapshots --reporter line $1

View File

@@ -6,6 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import keytar from "keytar-forked";
import { test, expect } from "../../element-desktop-test.js";
declare global {
@@ -59,6 +61,34 @@ test.describe("App launch", () => {
),
).resolves.not.toBeNull();
});
test.describe("migrate from keytar", () => {
test.skip(
process.env.GITHUB_ACTIONS && ["linux", "darwin"].includes(process.platform),
"GitHub Actions hosted runner are not a compatible environment for this test",
);
const pickleKey = "DEADBEEF1234";
const keytarService = "element.io";
const keytarKey = `${userId}|${deviceId}`;
test.beforeAll(async () => {
await keytar.setPassword(keytarService, keytarKey, pickleKey);
await expect(keytar.getPassword(keytarService, keytarKey)).resolves.toBe(pickleKey);
});
test.afterAll(async () => {
await keytar.deletePassword(keytarService, keytarKey);
});
test("should migrate successfully", async ({ page }) => {
await expect(
page.evaluate(
([userId, deviceId]) => window.mxPlatformPeg.get().getPickleKey(userId, deviceId),
[userId, deviceId],
),
).resolves.toBe(pickleKey);
});
});
});
test.describe("--no-update", () => {

View File

@@ -12,7 +12,6 @@ import path, { dirname } from "node:path";
import os from "node:os";
import { fileURLToPath } from "node:url";
import { PassThrough } from "node:stream";
import { stubDialog } from "electron-playwright-helpers";
/**
* A PassThrough stream that captures all data written to it.
@@ -85,7 +84,7 @@ export const test = base.extend<Fixtures>({
args.unshift(path.join(__dirname, "..", "lib", "electron-main.js"));
}
console.log(`Launching '${executablePath || "electron"}' with args ${args.join(" ")}`);
console.log(`Launching '${executablePath}' with args ${args.join(" ")}`);
const app = await electron.launch({
env: {
@@ -112,8 +111,6 @@ export const test = base.extend<Fixtures>({
page: async ({ app }, use) => {
const window = await app.firstWindow();
await use(window);
// EW may be configured to ask for confirmation before the app exits.
await stubDialog(app, "showMessageBoxSync", 1);
await app.close().catch((e) => {
console.error(e);
});

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

9416
pnpm-lock.yaml generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
nodeLinker: hoisted

View File

@@ -18,7 +18,7 @@ but should work equally well for building modules for normal node.
# Running
Hak is invoked with a command and a dependency, eg. `pnpm run hak fetch matrix-seshat`.
Hak is invoked with a command and a dependency, eg. `yarn run hak fetch matrix-seshat`.
If no dependencies are given, hak runs the command on all dependencies.
# Files
@@ -37,15 +37,15 @@ There are a lot of files involved:
Hak works around native node modules that try to fetch or build their native component in
the npm 'install' phase - modules that do this will typically end up with native components
targeted to the build platform and the node that npm/pnpm is using, which is no good for an
targeted to the build platform and the node that npm/yarn is using, which is no good for an
electron app.
It does this by installing it with `--ignore-scripts` and then using `pnpm link` to keep the
dependency module separate so pnpm doesn't try to run its install / postinstall script
at other points (eg. whenever you `pnpm add` a random other dependency).
It does this by installing it with `--ignore-scripts` and then using `yarn link` to keep the
dependency module separate so yarn doesn't try to run its install / postinstall script
at other points (eg. whenever you `yarn add` a random other dependency).
This also means that the dependencies cannot be listed in `dependencies` or
`devDependencies` in the project, since this would cause pnpm to install them and
`devDependencies` in the project, since this would cause npm / yarn to install them and
try to fetch their native parts. Instead, they are listed in `hakDependencies` which
hak reads to install them for you.
@@ -53,6 +53,9 @@ Hak will _not_ install dependencies for the copy of the module it links into you
project, so if your native module has javascript dependencies that are actually needed at
runtime (and not just to fetch / build the native parts), it won't work.
Hak will generate a `.yarnrc` in the project directory to set the link directory to its
own in the .hak directory (unless one already exists, in which case this is your problem).
# Lifecycle
Hak is divided into lifecycle stages, in order:

View File

@@ -8,7 +8,6 @@ Please see LICENSE files in the repository root for full details.
import fsProm from "node:fs/promises";
import pacote from "pacote";
import path from "node:path";
import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.js";
@@ -31,13 +30,6 @@ export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo):
packumentCache,
});
// Workaround for us switching to pnpm but matrix-seshat still using yarn classic
const packageJsonPath = path.join(moduleInfo.moduleBuildDir, "package.json");
const packageJson = await fsProm.readFile(packageJsonPath, "utf-8");
const packageJsonData = JSON.parse(packageJson);
packageJsonData["packageManager"] = "yarn@1.22.22";
await fsProm.writeFile(packageJsonPath, JSON.stringify(packageJsonData, null, 2), "utf-8");
console.log("Running yarn install in " + moduleInfo.moduleBuildDir);
await hakEnv.spawn("yarn", ["install", "--ignore-scripts"], {
cwd: moduleInfo.moduleBuildDir,

View File

@@ -6,11 +6,42 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import path from "node:path";
import os from "node:os";
import fsProm from "node:fs/promises";
import type HakEnv from "./hakEnv.js";
import { type DependencyInfo } from "./dep.js";
export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await hakEnv.spawn("pnpm", ["link", moduleInfo.moduleOutDir], {
const yarnrc = path.join(hakEnv.projectRoot, ".yarnrc");
// this is fairly terrible but it's reasonably clunky to either parse a yarnrc
// properly or get yarn to do it, so this will probably suffice for now.
// We just check to see if there is a local .yarnrc at all, and assume that
// if you've put one there yourself, you probably know what you're doing and
// we won't meddle with it.
// Also we do this for each module which is unnecessary, but meh.
try {
await fsProm.stat(yarnrc);
} catch {
await fsProm.writeFile(
yarnrc,
// XXX: 1. This must be absolute, as yarn will resolve link directories
// relative to the closest project root, which means when we run it
// in the dependency project, it will put the link directory in its
// own project folder rather than the main project.
// 2. The parser gets very confused by strings with colons in them
// (ie. Windows absolute paths) but strings in quotes get parsed as
// JSON so need to be valid JSON encoded strings (ie. have the
// backslashes escaped). JSON.stringify will add quotes and escape.
"--link-folder " + JSON.stringify(path.join(hakEnv.dotHakDir, "links")) + os.EOL,
);
}
await hakEnv.spawn("yarn", ["link"], {
cwd: moduleInfo.moduleOutDir,
});
await hakEnv.spawn("yarn", ["link", moduleInfo.name], {
cwd: hakEnv.projectRoot,
});
}

View File

@@ -1,19 +1,13 @@
#!/bin/bash
set -e
cd $(dirname "$0")/..
IMAGE=${DOCKER_IMAGE_NAME:-"element-desktop-dockerbuild"}
docker inspect "$IMAGE" 2> /dev/null > /dev/null
if [ $? != 0 ]; then
echo "Docker image $IMAGE not found. Have you run pnpm run docker:setup?"
echo "Docker image $IMAGE not found. Have you run yarn run docker:setup?"
exit 1
fi
mkdir -p docker/node_modules docker/.hak docker/.gnupg
# Taken from https://www.electron.build/multi-platform-build#docker
# Pass through any vars prefixed with INDOCKER_, removing the prefix
docker run --rm -ti \

View File

@@ -14,7 +14,7 @@ export async function versionFromAsar(): Promise<string> {
try {
await fs.stat("webapp.asar");
} catch {
throw new Error("No 'webapp.asar' found. Run 'pnpm run fetch'");
throw new Error("No 'webapp.asar' found. Run 'yarn run fetch'");
}
return asar.extractFile("webapp.asar", "version").toString().trim();
@@ -25,7 +25,7 @@ export async function setPackageVersion(ver: string): Promise<void> {
// all the various version fields
await new Promise<void>((resolve, reject) => {
childProcess.execFile(
process.platform === "win32" ? "pnpm.cmd" : "pnpm",
process.platform === "win32" ? "yarn.cmd" : "yarn",
[
"version",
"-s",

View File

@@ -211,7 +211,6 @@ function loadConfig(): Promise<void> {
global.vectorConfig = Object.assign(global.vectorConfig, localConfig);
} catch (e) {
if (e instanceof SyntaxError) {
await app.whenReady();
void dialog.showMessageBox({
type: "error",
title: `Your ${global.vectorConfig.brand || "Element"} is misconfigured`,
@@ -504,45 +503,11 @@ app.on("ready", async () => {
});
global.mainWindow.webContents.on("before-input-event", (event: Event, input: Input): void => {
const shouldWarnBeforeExit = store.get("warnBeforeExit", true);
const exitShortcutPressed =
input.type === "keyDown" && exitShortcuts.some((shortcutFn) => shortcutFn(input, process.platform));
// Early return if:
// 1. Keys that were pressed are not shortcuts for exiting the app
// 2. Electron mainWindow is null for some reason
// 3. The application is already in the process of quitting
if (!exitShortcutPressed || !global.mainWindow || global.appQuitting) return;
// Prevent the default behaviour
event.preventDefault();
// Check if the user expects us to minimize to tray instead of quitting the app
// Two cases:
// 1. On Linux/Windows, user has enabled "Show tray icon and minimise window to it on close" in settings.
// 2. On Mac, the canonical behaviour is to minimize to tray; this is not configurable.
const shouldMinimize = store.get("minimizeToTray") || process.platform === "darwin";
if (shouldMinimize) {
if (global.mainWindow?.isFullScreen()) {
global.mainWindow.once("leave-full-screen", () => global.mainWindow?.hide());
global.mainWindow.setFullScreen(false);
} else {
global.mainWindow?.hide();
}
return;
}
// Quit the app; rest of the quit logic is on the close event handler below.
app.quit();
});
global.mainWindow.on("closed", () => {
global.mainWindow = null;
});
global.mainWindow.on("close", async (e) => {
// Check if the user expects us to ask for confirmation before quitting the app
const shouldWarnBeforeExit = store.get("warnBeforeExit", true);
if (shouldWarnBeforeExit && global.mainWindow) {
if (shouldWarnBeforeExit && exitShortcutPressed && global.mainWindow) {
const shouldCancelCloseRequest =
dialog.showMessageBoxSync(global.mainWindow, {
type: "question",
@@ -556,14 +521,36 @@ app.on("ready", async () => {
defaultId: 1,
cancelId: 0,
}) === 0;
if (shouldCancelCloseRequest) {
e.preventDefault();
global.appQuitting = false;
return false;
event.preventDefault();
}
}
});
global.mainWindow.on("closed", () => {
global.mainWindow = null;
});
global.mainWindow.on("close", async (e) => {
// If we are not quitting and have a tray icon then minimize to tray
if (!global.appQuitting && (tray.hasTray() || process.platform === "darwin")) {
// On Mac, closing the window just hides it
// (this is generally how single-window Mac apps
// behave, eg. Mail.app)
e.preventDefault();
if (global.mainWindow?.isFullScreen()) {
global.mainWindow.once("leave-full-screen", () => global.mainWindow?.hide());
global.mainWindow.setFullScreen(false);
} else {
global.mainWindow?.hide();
}
return false;
}
});
if (process.platform === "win32") {
// Handle forward/backward mouse buttons in Windows
global.mainWindow.on("app-command", (e, cmd) => {

View File

@@ -35,7 +35,7 @@
"eol": {
"no_more_updates": "Používáte nepodporovanou verzi systému macOS. Prosím upgradujte %(brand)s pro získání aktualizací.",
"title": "Systém není podporován",
"warning": "Používáte nepodporovanou verzi systému macOS. Proveďte prosím upgrade %(brand)s, aby byl stále funkční."
"warning": "Používáte nepodporovanou verzi systému macOS. Proveďte prosím upgrade %(brand)s , aby byl stále funkční."
},
"file_menu": {
"label": "Soubor"

View File

@@ -1,74 +0,0 @@
{
"action": {
"cancel": "Afbryd",
"close": "Luk",
"close_brand": "Luk %(brand)s",
"copy": "Kopiér",
"cut": "Klip",
"delete": "Slet",
"edit": "Rediger",
"minimise": "Minimér",
"paste": "Indsæt",
"paste_match_style": "Indsæt og match stil",
"quit": "Luk",
"redo": "Omgør",
"select_all": "Vælg alle",
"show_hide": "Vis/skjul",
"undo": "Fortryd",
"zoom_in": "Zoom ind",
"zoom_out": "Zoom ud"
},
"common": {
"about": "Om",
"brand_help": "%(brand)sHjælp",
"help": "Hjælp",
"no": "Nej",
"preferences": "Indstillinger",
"yes": "Ja"
},
"confirm_quit": "Er du sikker på, du vil afslutte?",
"edit_menu": {
"speech": "Tale",
"speech_start_speaking": "Begynd at tale",
"speech_stop_speaking": "Stop med at tale"
},
"file_menu": {
"label": "Fil"
},
"icon_overlay": {
"description_error": "Fejl"
},
"menu": {
"hide": "Skjul",
"hide_others": "Skjul andre",
"services": "Tjenester",
"unhide": "Vis"
},
"right_click_menu": {
"add_to_dictionary": "Tilføj til ordbog",
"copy_email": "Kopier e-mailadresse",
"copy_image": "Kopier billede",
"copy_image_url": "Kopier billed-adresse",
"copy_link_url": "Kopier linkadresse",
"save_image_as": "Gem billede som...",
"save_image_as_error_description": "Billedet kunne ikke gemmes",
"save_image_as_error_title": "Kunne ikke gemme billedet"
},
"store": {
"error": {
"backend_no_encryption": "Dit system har en understøttet nøglering, men kryptering er ikke tilgængelig.",
"unsupported_keyring": "Dit system har en ikke-understøttet nøglering, hvilket betyder at databasen ikke kan åbnes."
}
},
"view_menu": {
"actual_size": "Faktisk størrelse",
"toggle_developer_tools": "Skift udviklerværktøjer",
"toggle_full_screen": "Skift fuld skærm",
"view": "Vis"
},
"window_menu": {
"bring_all_to_front": "Bring alt i front",
"label": "Vindue",
"zoom": "Zoom"
}
}

View File

@@ -22,9 +22,7 @@
"about": "Acerca de",
"brand_help": "Ayuda sobre %(brand)s",
"help": "Ayuda",
"no": "No",
"preferences": "Preferencias",
"yes": "Sí"
"preferences": "Preferencias"
},
"confirm_quit": "¿Quieres salir?",
"edit_menu": {
@@ -59,7 +57,6 @@
},
"window_menu": {
"bring_all_to_front": "Traer todas al primer plano",
"label": "Ventana",
"zoom": "Acercamiento"
"label": "Ventana"
}
}

View File

@@ -1,93 +0,0 @@
{
"action": {
"cancel": "Otkazati",
"close": "Zatvori",
"close_brand": "Zatvori %(brand)s",
"copy": "Kopirati",
"cut": "Izrezati",
"delete": "Izbriši",
"edit": "Uredi",
"minimise": "Minimiziraj",
"paste": "Zalijepiti",
"paste_match_style": "Zalijepi i uskladi stil",
"quit": "Prestati",
"redo": "Preurediti",
"select_all": "Odaberi sve",
"show_hide": "Pokaži/sakrij",
"undo": "Poništi",
"zoom_in": "Povećaj",
"zoom_out": "Smanji"
},
"common": {
"about": "Više o",
"brand_help": "%(brand)s pomoć",
"help": "Pomoć",
"no": "Ne",
"preferences": "Preference",
"yes": "Da"
},
"confirm_quit": "Jesi li siguran da želiš odustati?",
"edit_menu": {
"speech": "Govor",
"speech_start_speaking": "Počnite govoriti",
"speech_stop_speaking": "Prestanite govoriti"
},
"eol": {
"no_more_updates": "Upotrebljavate nepodržanu inačicu macOS-a. Nadogradite kako biste primili ažuriranja za %(brand)s.",
"title": "Sustav nije podržan",
"warning": "Upotrebljavate nepodržanu inačicu macOS-a. Nadogradite kako biste osigurali da %(brand)s nastavi s radom."
},
"file_menu": {
"label": "Datoteka"
},
"icon_overlay": {
"description_error": "Pogreška",
"description_notifications": {
"one": "Imate %(count)s nepročitanu obavijest.",
"few": "Imate %(count)s nepročitane obavijesti.",
"other": "Imate %(count)s nepročitanih obavijesti."
}
},
"menu": {
"hide": "Sakrij",
"hide_others": "Sakrij ostale",
"services": "Usluge",
"unhide": "Otkrij"
},
"right_click_menu": {
"add_to_dictionary": "Dodaj u rječnik",
"copy_email": "Kopiraj e-adresu",
"copy_image": "Kopiraj sliku",
"copy_image_url": "Kopiraj adresu slike",
"copy_link_url": "Kopiraj adresu poveznice",
"save_image_as": "Spremi sliku kao...",
"save_image_as_error_description": "Spremanje slike nije uspjelo",
"save_image_as_error_title": "Spremanje slike nije uspjelo"
},
"store": {
"error": {
"backend_changed": "Želite li izbrisati podatke i ponovno učitati?",
"backend_changed_detail": "Nije moguće pristupiti tajnom kodu iz pohrane ključeva sustava, izgleda da je promijenjen.",
"backend_changed_title": "Nije uspjelo učitavanje baze podataka",
"backend_no_encryption": "Vaš sustav ima podržanu pohranu ključeva, ali šifriranje nije dostupno.",
"backend_no_encryption_detail": "Electron je otkrio da šifriranje nije dostupno u vašoj pohrani ključeva %(backend)s. Provjerite imate li instaliranu pohranu ključeva. Ako imate, ponovno pokrenite računalo i pokušajte ponovno. Po želji možete dopustiti da %(brand)s upotrebljava slabiji oblik šifriranja.",
"backend_no_encryption_title": "Nema podrške za šifriranje",
"unsupported_keyring": "Vaš sustav ima nepodržanu pohranu ključeva, što znači da se baza podataka ne može otvoriti.",
"unsupported_keyring_detail": "Electronova detekcija pohrane ključeva nije pronašla podržanu pozadinu. Možete pokušati ručno konfigurirati pozadinu tako da pokrenete %(brand)s s argumentom naredbenog retka, što je potrebno učiniti samo jednom. Pogledajte %(link)s.",
"unsupported_keyring_title": "Sustav nije podržan",
"unsupported_keyring_use_basic_text": "Upotrijebi slabije šifriranje",
"unsupported_keyring_use_plaintext": "Ne upotrebljavaj šifriranje"
}
},
"view_menu": {
"actual_size": "Stvarna veličina",
"toggle_developer_tools": "Uključi/isključi alate za razvojne inženjere",
"toggle_full_screen": "Uključi/isključi prikaz na cijelom zaslonu",
"view": "Prikaz"
},
"window_menu": {
"bring_all_to_front": "Stavi sve u prvi plan",
"label": "Prozor",
"zoom": "Zumiranje"
}
}

View File

@@ -6,7 +6,7 @@
"copy": "Salin",
"cut": "Potong",
"delete": "Hapus",
"edit": "Edit",
"edit": "Sunting",
"minimise": "Minimalkan",
"paste": "Tempel",
"paste_match_style": "Tempel dan Cocokkan Gaya",

View File

@@ -1,91 +0,0 @@
{
"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": "도움말",
"no": "아니오",
"preferences": "환경 설정",
"yes": "예"
},
"confirm_quit": "종료하시겠습니까?",
"edit_menu": {
"speech": "음성",
"speech_start_speaking": "말하기 시작하기",
"speech_stop_speaking": "말하기 중단하기"
},
"eol": {
"no_more_updates": "현재 지원되지 않는 macOS 버전을 사용 중입니다. %(brand)s 업데이트를 계속 받으시려면 운영 체제를 업그레이드해 주세요.",
"title": "시스템이 지원되지 않습니다",
"warning": "현재 지원되지 않는 macOS 버전을 사용 중입니다. %(brand)s을(를) 계속 사용하시려면 운영 체제를 업그레이드해야 합니다."
},
"file_menu": {
"label": "파일"
},
"icon_overlay": {
"description_error": "오류",
"description_notifications": {
"other": "읽지 않은 알림 %(count)s개가 있습니다"
}
},
"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": "이미지 저장 실패"
},
"store": {
"error": {
"backend_changed": "데이터를 지우고 다시 로드하시겠습니까?",
"backend_changed_detail": "시스템 키링에서 비밀에 접근할 수 없습니다. 변경된 것으로 보입니다.",
"backend_changed_title": "데이터베이스 로드에 실패했습니다",
"backend_no_encryption": "시스템에 지원되는 키링이 있지만 암호화를 사용할 수 없습니다.",
"backend_no_encryption_detail": "Electron이 키링 %(backend)s에서 암호화를 사용할 수 없음을 감지했습니다. 키링이 설치되어 있는지 확인하세요. 이미 설치되어 있다면, 시스템을 재부팅한 후 다시 시도해 주세요. 선택적으로 %(brand)s가 약한 형태의 암호화를 사용하도록 허용할 수 있습니다",
"backend_no_encryption_title": "암호화를 지원 안함",
"unsupported_keyring": "시스템에 지원되지 않는 키링이 존재하여 데이터베이스를 열 수 없습니다.",
"unsupported_keyring_detail": "Electron의 키링 감지 기능이 지원되는 백엔드를 찾지 못했습니다. 명령줄 인수를 사용하여 %(brand)s 를 시작함으로써 백엔드를 수동으로 구성해 볼 수 있습니다. 이는 일회성 작업입니다. 자세한 내용은 %(link)s 를 참조하십시오.",
"unsupported_keyring_title": "시스템이 지원되지 않습니다",
"unsupported_keyring_use_basic_text": "암호화 수준 낮게 사용",
"unsupported_keyring_use_plaintext": "암호화를 사용하지 마십시오"
}
},
"view_menu": {
"actual_size": "실제 크기",
"toggle_developer_tools": "개발자 도구 전환",
"toggle_full_screen": "전체 화면으로 전환",
"view": "보기"
},
"window_menu": {
"bring_all_to_front": "모두 맨 앞으로 가져오기",
"label": "창",
"zoom": "확대/축소"
}
}

View File

@@ -73,7 +73,7 @@
"backend_no_encryption_detail": "Elektron wykrył, że szyfrowanie nie jest dostępne w twoim keyring'u %(backend)s. Upewnij się, że keyring został zainstalowany. Jeśli tak, uruchom ponownie urządzenie i spróbuj ponownie. Opcjonalnie, zezwól %(brand)s, aby korzystał ze słabszego szyfrowania.",
"backend_no_encryption_title": "Szyfrowanie nie jest obsługiwane",
"unsupported_keyring": "System zawiera niewspierany keyring, nie można otworzyć bazy danych.",
"unsupported_keyring_detail": "Wykrywanie breloków firmy Electron nie znalazło obsługiwanego zaplecza. Możesz spróbować ręcznie skonfigurować zaplecze, zaczynając od argumentu %(brand)s wiersza polecenia, operacji jednorazowej. Widzieć%(link)s.",
"unsupported_keyring_detail": "Wykrywanie keyringu Electron nie znalazł wspieranego backendu. Możesz spróbować ręcznie ustawić backed, uruchamiając %(brand)s za pomocą wiesza poleceń. Zobacz %(link)s.",
"unsupported_keyring_title": "System niewspierany",
"unsupported_keyring_use_basic_text": "Użyj słabszego szyfrowania",
"unsupported_keyring_use_plaintext": "Nie używaj szyfrowania"

View File

@@ -33,20 +33,13 @@
"speech_stop_speaking": "Перестаньте говорить"
},
"eol": {
"no_more_updates": "Вы используете неподдерживаемую версию macOS. Пожалуйста обновите систему чтобы получать обновления %(brand)s.",
"title": "Система не поддерживается",
"warning": "Вы используете неподдерживаемую версию macOS. Пожалуйста обновите её, чтобы %(brand)s продолжал работать."
"title": "Система не поддерживается"
},
"file_menu": {
"label": "Файл"
},
"icon_overlay": {
"description_error": "Ошибка",
"description_notifications": {
"one": "У вас есть %(count)s непрочитанное уведомление.",
"few": "У вас есть %(count)s непрочитанных уведомления.",
"many": "У вас есть %(count)s непрочитанных уведомлений."
}
"description_error": "Ошибка"
},
"menu": {
"hide": "Скрыть",
@@ -64,21 +57,6 @@
"save_image_as_error_description": "Не удалось сохранить изображение",
"save_image_as_error_title": "Не удалось сохранить изображение"
},
"store": {
"error": {
"backend_changed": "Очистить данные и перезагрузить?",
"backend_changed_detail": "Не удалось получить доступ к секрету из системной связки ключей. Похоже, что она изменилась.",
"backend_changed_title": "Не удалось загрузить базу данных",
"backend_no_encryption": "В вашей системе имеется поддерживаемая связка ключей, но шифрование недоступно.",
"backend_no_encryption_detail": "Electron обнаружил, что шифрование недоступно в вашем хранилище %(backend)s Убедитесь, что у вас установлено связное устройство. Если связное устройство установлено, перезагрузите компьютер и повторите попытку. При желании вы можете разрешить %(brand)s использовать более слабую форму шифрования.",
"backend_no_encryption_title": "Нет поддержки шифрования",
"unsupported_keyring": "Невозможно открыть базу данных, так как в вашей системе установлена неподдерживаемая связка ключей",
"unsupported_keyring_detail": "Функция обнаружения ключей Electron не нашла поддерживаемый сервер. Можно попробовать настроить сервер вручную, запустив %(brand)s с аргументом командной строки, это нужно сделать только один раз. Смотри %(link)s.",
"unsupported_keyring_title": "Система не поддерживается",
"unsupported_keyring_use_basic_text": "Использовать более слабое шифрование",
"unsupported_keyring_use_plaintext": "Не использовать шифрование"
}
},
"view_menu": {
"actual_size": "Фактический размер",
"toggle_developer_tools": "Переключить инструменты разработчика",

View File

@@ -32,11 +32,6 @@
"speech_start_speaking": "Почати говорити",
"speech_stop_speaking": "Припинити говорити"
},
"eol": {
"no_more_updates": "Ви використовуєте непідтримувану версію macOS. Оновіть її, щоб отримати оновлення %(brand)s.",
"title": "Система не підтримується",
"warning": "Ви використовуєте непідтримувану версію macOS. Оновіть систему, щоб забезпечити безперебійну роботу %(brand)s."
},
"file_menu": {
"label": "Файл"
},

View File

@@ -111,7 +111,7 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
try {
ret = await store.getSecret(`${args[0]}|${args[1]}`);
} catch {
// if an error is thrown (e.g. we can't initialise safeStorage),
// if an error is thrown (e.g. keytar can't connect to the keychain),
// then return null, which means the default pickle key will be used
ret = null;
}

View File

@@ -15,10 +15,22 @@ limitations under the License.
*/
import ElectronStore from "electron-store";
import keytar from "keytar-forked";
import { app, safeStorage, dialog, type SafeStorage, type Session } from "electron";
import { _t } from "./language-helper.js";
/**
* Legacy keytar service name for storing secrets.
* @deprecated
*/
const KEYTAR_SERVICE = "element.io";
/**
* Super legacy keytar service name for reading secrets.
* @deprecated
*/
const LEGACY_KEYTAR_SERVICE = "riot.im";
/**
* String union type representing all the safeStorage backends.
* + The "unknown" backend shouldn't exist in practice once the app is ready
@@ -135,7 +147,7 @@ const enum Mode {
/**
* JSON-backed store for settings which need to be accessible by the main process.
* Secrets are stored within the `safeStorage` object, encrypted with safeStorage.
* Any secrets operations are blocked on Electron app ready emit.
* Any secrets operations are blocked on Electron app ready emit, and keytar migration if still needed.
*/
class Store extends ElectronStore<StoreData> {
private static internalInstance?: Store;
@@ -271,6 +283,8 @@ class Store extends ElectronStore<StoreData> {
/**
* Prepare the safeStorage backend for use.
* We don't eagerly import from keytar as that would bring in data for all Element profiles and not just the current one,
* so we import lazily in getSecret.
*
* This will relaunch the app in some cases, in which case it will return false and the caller should abort startup.
*
@@ -448,6 +462,7 @@ class Store extends ElectronStore<StoreData> {
/**
* Get the stored secret for the key.
* Lazily migrates keys from keytar if they are not yet in the store.
*
* @param key The string key name.
*
@@ -455,11 +470,25 @@ class Store extends ElectronStore<StoreData> {
*/
public async getSecret(key: string): Promise<string | undefined> {
await this.safeStorageReady();
return this.secrets!.get(key);
let secret = this.secrets!.get(key);
if (secret) return secret;
try {
secret = await this.getSecretKeytar(key);
} catch (e) {
console.warn(`Failed to read data from keytar with key='${key}'`, e);
}
if (secret) {
console.debug("Migrating secret from keytar", key);
this.secrets!.set(key, secret);
}
return secret;
}
/**
* Add the secret for the key to the keychain.
* We write to both safeStorage & keytar to support downgrading the application.
*
* @param key The string key name.
* @param secret The string password.
@@ -469,16 +498,46 @@ class Store extends ElectronStore<StoreData> {
public async setSecret(key: string, secret: string): Promise<void> {
await this.safeStorageReady();
this.secrets!.set(key, secret);
try {
await keytar.setPassword(KEYTAR_SERVICE, key, secret);
} catch (e) {
console.warn(`Failed to write safeStorage backwards-compatibility key='${key}' data to keytar`, e);
}
}
/**
* Delete the stored password for the key.
* Removes from safeStorage, keytar & keytar legacy.
*
* @param key The string key name.
*/
public async deleteSecret(key: string): Promise<void> {
await this.safeStorageReady();
this.secrets!.delete(key);
try {
await this.deleteSecretKeytar(key);
} catch (e) {
console.warn(`Failed to delete secret with key='${key}' from keytar`, e);
}
}
/**
* @deprecated will be removed in the near future
*/
private async getSecretKeytar(key: string): Promise<string | undefined> {
return (
(await keytar.getPassword(KEYTAR_SERVICE, key)) ??
(await keytar.getPassword(LEGACY_KEYTAR_SERVICE, key)) ??
undefined
);
}
/**
* @deprecated will be removed in the near future
*/
private async deleteSecretKeytar(key: string): Promise<void> {
await keytar.deletePassword(LEGACY_KEYTAR_SERVICE, key);
await keytar.deletePassword(KEYTAR_SERVICE, key);
}
}

7486
yarn.lock Normal file
View File

File diff suppressed because it is too large Load Diff