Compare commits
253 Commits
v1.11.106-
...
d33aceb749
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d33aceb749 | ||
|
|
e63d76558b | ||
|
|
f001663adf | ||
|
|
f2a28e33d7 | ||
|
|
d5e27e5b16 | ||
|
|
17a16d6750 | ||
|
|
a2cc5d6dc5 | ||
|
|
b99964c827 | ||
|
|
fde8bc40c8 | ||
|
|
92ff9d19b1 | ||
|
|
db40cee64e | ||
|
|
3eed0b6d43 | ||
|
|
a219672e88 | ||
|
|
5f1178a834 | ||
|
|
eabdab4db7 | ||
|
|
8499e091c9 | ||
|
|
b17a15882b | ||
|
|
2a6fdd843f | ||
|
|
624dad601e | ||
|
|
3aa30ec18c | ||
|
|
aaf1ace5f3 | ||
|
|
4419f209d5 | ||
|
|
45c99ff0d4 | ||
|
|
3d078d5389 | ||
|
|
5db23f3a3a | ||
|
|
24425c039b | ||
|
|
cf94b619b7 | ||
|
|
d3935d45ce | ||
|
|
784f1556f4 | ||
|
|
25667d7786 | ||
|
|
3ad56f27de | ||
|
|
b49e7dfecc | ||
|
|
a4099168ac | ||
|
|
686a56d564 | ||
|
|
f12d414b1b | ||
|
|
98f6cbd8a7 | ||
|
|
71a6e77cf1 | ||
|
|
7e723e2e47 | ||
|
|
a0b40b2047 | ||
|
|
741bdb6244 | ||
|
|
5bc7434f50 | ||
|
|
ed741394bc | ||
|
|
588b709035 | ||
|
|
bbe493a696 | ||
|
|
7e3508e5fb | ||
|
|
9c69d07eb6 | ||
|
|
73b83d055c | ||
|
|
820c699fb9 | ||
|
|
ac3ccf47a3 | ||
|
|
3c3b1d9ad3 | ||
|
|
ff6dd5e90b | ||
|
|
74748cf205 | ||
|
|
55e3fa1652 | ||
|
|
1240eb83ec | ||
|
|
25d754db0f | ||
|
|
7a0a7497b2 | ||
|
|
2004171d3d | ||
|
|
250bad90e9 | ||
|
|
5c69abb799 | ||
|
|
868d873183 | ||
|
|
339b1c01cc | ||
|
|
ae4ce43204 | ||
|
|
91490db890 | ||
|
|
9fe021a327 | ||
|
|
a106663750 | ||
|
|
9434f2adf9 | ||
|
|
97cb39829a | ||
|
|
e55f3cfb69 | ||
|
|
f21767d423 | ||
|
|
86891dcdd4 | ||
|
|
55ee9c0053 | ||
|
|
1fd2214951 | ||
|
|
fe253172b3 | ||
|
|
c7cdbcf07b | ||
|
|
5e882f8e08 | ||
|
|
e5f6bd882f | ||
|
|
e4f75de04c | ||
|
|
1c55aa780f | ||
|
|
5dd1984896 | ||
|
|
3c78634cd5 | ||
|
|
155bbe3634 | ||
|
|
3287fec669 | ||
|
|
a64ed5428c | ||
|
|
d0a735b25c | ||
|
|
522c6f95ab | ||
|
|
155b6f284a | ||
|
|
8376cef25a | ||
|
|
15f23d4cf9 | ||
|
|
ea2b160dcc | ||
|
|
bc0a8f03db | ||
|
|
39eddfdc4b | ||
|
|
e668edbcec | ||
|
|
763ebc4ca8 | ||
|
|
cfff1c7640 | ||
|
|
ec1971366a | ||
|
|
1f803f7051 | ||
|
|
c90c79e3ae | ||
|
|
22100bff80 | ||
|
|
a4b622dd5e | ||
|
|
c9a03859bd | ||
|
|
2385c4dd9b | ||
|
|
9d2b1621d6 | ||
|
|
35db60092b | ||
|
|
0a97f12323 | ||
|
|
cd671919e2 | ||
|
|
8e964cd782 | ||
|
|
bec7a9be19 | ||
|
|
64d8341deb | ||
|
|
0e22e7dd38 | ||
|
|
7937f4b0ba | ||
|
|
9493680a42 | ||
|
|
20f8a32ed4 | ||
|
|
44b685a272 | ||
|
|
b84b82f583 | ||
|
|
13e036ee4c | ||
|
|
edb79cba9d | ||
|
|
0b8071cdc3 | ||
|
|
54dd920d34 | ||
|
|
65b22386fa | ||
|
|
2785778fb0 | ||
|
|
9f6928679a | ||
|
|
2e531da3ae | ||
|
|
8c4a57dbff | ||
|
|
ac098fd045 | ||
|
|
acb03b6abe | ||
|
|
cf9bf306cf | ||
|
|
46e1a866a3 | ||
|
|
fd1d792589 | ||
|
|
31c5fcff9b | ||
|
|
bea98eaff7 | ||
|
|
23cc2b3884 | ||
|
|
a330b64fa6 | ||
|
|
87d2f64555 | ||
|
|
a17abce33b | ||
|
|
c20cf1b8bc | ||
|
|
78aed022f5 | ||
|
|
2b0a9b83b6 | ||
|
|
15455ad4be | ||
|
|
87c22acaae | ||
|
|
3961e3d7bb | ||
|
|
b0a3b9e484 | ||
|
|
7c5eb799d0 | ||
|
|
2bf3436a5b | ||
|
|
5682c38944 | ||
|
|
f5558add0f | ||
|
|
29dbe3284f | ||
|
|
56e3e8389d | ||
|
|
f1039d3fc2 | ||
|
|
15f944581b | ||
|
|
b8bedd9c22 | ||
|
|
5561e2efa3 | ||
|
|
46192bd10e | ||
|
|
74444237d9 | ||
|
|
9b8ebd97ed | ||
|
|
c770ea5e2c | ||
|
|
942c4eabc3 | ||
|
|
d725093b10 | ||
|
|
a0185ecf3c | ||
|
|
a969bde5fd | ||
|
|
bcde9afce9 | ||
|
|
a50957973b | ||
|
|
08fc8722f1 | ||
|
|
79f917792a | ||
|
|
954e11947e | ||
|
|
58caf2d337 | ||
|
|
da87f2e5be | ||
|
|
3a780766de | ||
|
|
4762bc137f | ||
|
|
e13c6a4797 | ||
|
|
a7ecf597dd | ||
|
|
d261f95d86 | ||
|
|
108b8574f0 | ||
|
|
cf2081effe | ||
|
|
dd73fcc82e | ||
|
|
3d39d6a1f1 | ||
|
|
9b7bca653b | ||
|
|
25e8bd4906 | ||
|
|
6f6923b9fa | ||
|
|
c58bedb312 | ||
|
|
479b823fdb | ||
|
|
2ddced50e2 | ||
|
|
679b6146dd | ||
|
|
3d0d131733 | ||
|
|
062f7ea977 | ||
|
|
38e3d473e6 | ||
|
|
5450102047 | ||
|
|
5fd8cf189a | ||
|
|
77962c402b | ||
|
|
31bef3860e | ||
|
|
81458c29ed | ||
|
|
c61771de38 | ||
|
|
2c577bcf84 | ||
|
|
3360b069d8 | ||
|
|
bb951131d1 | ||
|
|
ada93d84e7 | ||
|
|
8cf16397a9 | ||
|
|
8bbbdcc2af | ||
|
|
73f5aa0ffb | ||
|
|
60c2ebfb19 | ||
|
|
8d39941559 | ||
|
|
4fc2099693 | ||
|
|
05321d2e94 | ||
|
|
54a88af28c | ||
|
|
e8b4fc7660 | ||
|
|
85e1e83d1d | ||
|
|
1d09bb0016 | ||
|
|
bff219808e | ||
|
|
00475e4bfa | ||
|
|
9b50bdb9a0 | ||
|
|
d97a6a743e | ||
|
|
5daf37de3e | ||
|
|
2cbb6041c8 | ||
|
|
0dc2cafb26 | ||
|
|
45a7d1564a | ||
|
|
003d813967 | ||
|
|
cdb0a051e6 | ||
|
|
cad16c7e3b | ||
|
|
6a61d24fb8 | ||
|
|
0bb49702ba | ||
|
|
d1a0196d44 | ||
|
|
229e52d809 | ||
|
|
0c16caf519 | ||
|
|
def0864df3 | ||
|
|
2cb99596d2 | ||
|
|
812dd20b39 | ||
|
|
db78dbec09 | ||
|
|
31be440d37 | ||
|
|
b13f3ba1bd | ||
|
|
82852a0d0b | ||
|
|
dd45096808 | ||
|
|
88829a1726 | ||
|
|
205d1609cd | ||
|
|
c5a5dab318 | ||
|
|
27582b5d8c | ||
|
|
92a7da38ea | ||
|
|
7c19e5f0a8 | ||
|
|
f91c07f929 | ||
|
|
2d21835588 | ||
|
|
79b9ac896a | ||
|
|
7d488cc06d | ||
|
|
ad8287112b | ||
|
|
4629eccb5a | ||
|
|
8aba763e3e | ||
|
|
ec23373969 | ||
|
|
c9ec2d2a84 | ||
|
|
e02e0b86e5 | ||
|
|
5dc47b9e77 | ||
|
|
267e85cd4e | ||
|
|
17b57d10f5 | ||
|
|
2debea1f53 | ||
|
|
08d0e076fa | ||
|
|
b08adafb62 | ||
|
|
c2bb7ebb6d |
12
.github/workflows/build_and_deploy.yaml
vendored
@@ -107,7 +107,7 @@ jobs:
|
||||
environment: ${{ needs.prepare.outputs.deploy == 'true' && 'packages.element.io' || '' }}
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
|
||||
- name: Prepare artifacts for deployment
|
||||
run: |
|
||||
@@ -197,7 +197,7 @@ jobs:
|
||||
|
||||
- name: Stash packages.element.io
|
||||
if: needs.prepare.outputs.deploy == 'false'
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: packages.element.io
|
||||
path: packages.element.io
|
||||
@@ -216,7 +216,7 @@ jobs:
|
||||
|
||||
- name: Notify packages.element.io of new files
|
||||
if: needs.prepare.outputs.deploy == 'true'
|
||||
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
|
||||
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
|
||||
with:
|
||||
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||
repository: element-hq/packages.element.io
|
||||
@@ -235,7 +235,7 @@ jobs:
|
||||
|
||||
- name: Stash debs
|
||||
if: needs.prepare.outputs.deploy == 'false' && needs.linux.result == 'success'
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: debs
|
||||
path: |
|
||||
@@ -274,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@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
|
||||
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # 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@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
with:
|
||||
pattern: win-*
|
||||
|
||||
|
||||
10
.github/workflows/build_and_test.yaml
vendored
@@ -51,11 +51,11 @@ jobs:
|
||||
tests-done:
|
||||
needs: [windows, linux, macos]
|
||||
runs-on: ubuntu-24.04
|
||||
if: always()
|
||||
if: ${{ !cancelled() }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
cache: "yarn"
|
||||
node-version: "lts/*"
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
- name: Download blob reports from GitHub Actions Artifacts
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
with:
|
||||
pattern: blob-report-*
|
||||
path: all-blob-reports
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
|
||||
- name: Upload HTML report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: html-report
|
||||
path: playwright-report
|
||||
|
||||
118
.github/workflows/build_linux.yaml
vendored
@@ -4,6 +4,10 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ref:
|
||||
type: string
|
||||
required: false
|
||||
description: "The git ref to checkout, defaults to the default branch"
|
||||
arch:
|
||||
type: string
|
||||
required: true
|
||||
@@ -20,21 +24,62 @@ on:
|
||||
type: boolean
|
||||
required: false
|
||||
description: "Whether to run the blob report"
|
||||
prepare-artifact-name:
|
||||
type: string
|
||||
required: false
|
||||
description: |
|
||||
The name of the prepare artifact to use, defaults to 'webapp'.
|
||||
The artifact must contain the following:
|
||||
+ webapp.asar - the asar archive of the webapp to embed in the desktop app
|
||||
+ electronVersion - the version of electron to use for cache keying
|
||||
+ hakHash - the hash of the .hak directory to use for cache keying
|
||||
+ changelog.Debian - the changelog file to embed in the Debian package
|
||||
+ variant.json - the variant configuration to use for the build
|
||||
|
||||
The artifact can also contain any additional files which will be applied as overrides to the checkout root before building,
|
||||
for example icons in the `build/` directory to override the app icons.
|
||||
default: "webapp"
|
||||
test:
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
description: "Whether to run the test stage after building"
|
||||
test-args:
|
||||
type: string
|
||||
required: false
|
||||
description: "Additional arguments to pass to playwright"
|
||||
runs-on:
|
||||
type: string
|
||||
required: false
|
||||
description: "The runner image to use, normally set for you, may be needed for running in private repos."
|
||||
artifact-prefix:
|
||||
type: string
|
||||
required: false
|
||||
description: "An optional prefix to add to the artifact name, useful for distinguishing builds in private repos."
|
||||
default: ""
|
||||
targets:
|
||||
type: string
|
||||
required: false
|
||||
description: "List of targets to build"
|
||||
default: "tar.gz deb"
|
||||
env:
|
||||
SQLCIPHER_BUNDLED: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
|
||||
MAX_GLIBC: 2.31 # bullseye-era glibc, used by glibc-check.sh
|
||||
permissions: {} # No permissions required
|
||||
jobs:
|
||||
build:
|
||||
name: Build Linux ${{ inputs.arch }} SQLCipher ${{ inputs.sqlcipher }}
|
||||
# We build on native infrastructure as matrix-seshat fails to cross-compile properly
|
||||
# https://github.com/matrix-org/seshat/issues/135
|
||||
runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
|
||||
runs-on: ${{ inputs.runs-on || (inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04') }}
|
||||
env:
|
||||
HAK_DOCKER_IMAGE: ghcr.io/element-hq/element-desktop-dockerbuild
|
||||
steps:
|
||||
- name: Resolve docker image tag for push
|
||||
if: github.event_name == 'push'
|
||||
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$GITHUB_REF_NAME" >> $GITHUB_ENV
|
||||
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:$REF" >> $GITHUB_ENV
|
||||
env:
|
||||
REF: ${{ inputs.ref || github.ref_name }}
|
||||
- name: Resolve docker image tag for release
|
||||
if: github.event_name == 'release'
|
||||
run: echo "HAK_DOCKER_IMAGE=$HAK_DOCKER_IMAGE:staging" >> $GITHUB_ENV
|
||||
@@ -60,21 +105,24 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
with:
|
||||
name: webapp
|
||||
repository: element-hq/element-desktop
|
||||
ref: ${{ inputs.ref }}
|
||||
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
with:
|
||||
name: ${{ inputs.prepare-artifact-name }}
|
||||
|
||||
- name: Cache .hak
|
||||
id: cache
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ github.ref_name }}-${{ inputs.sqlcipher }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion', 'dockerbuild/*') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: "yarn"
|
||||
@@ -87,7 +135,7 @@ jobs:
|
||||
|
||||
- name: "Get modified files"
|
||||
id: changed_files
|
||||
if: steps.cache.outputs.cache-hit != 'true' && github.event_name == 'pull_request'
|
||||
if: steps.cache.outputs.cache-hit != 'true' && github.event_name == 'pull_request' && github.repository == 'element-hq/element-desktop'
|
||||
uses: tj-actions/changed-files@823fcebdb31bb35fdf2229d9f769b400309430d0 # v46
|
||||
with:
|
||||
files: |
|
||||
@@ -129,19 +177,14 @@ jobs:
|
||||
echo "ED_DEBIAN_CHANGELOG=changelog.Debian" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
# Workaround for https://github.com/electron-userland/electron-builder/issues/6116
|
||||
- name: Install fpm
|
||||
if: inputs.arch == 'arm64'
|
||||
run: |
|
||||
sudo apt-get install ruby-dev build-essential
|
||||
sudo gem install fpm
|
||||
echo "USE_SYSTEM_FPM=true" >> $GITHUB_ENV
|
||||
|
||||
- name: Build App
|
||||
run: yarn build --publish never -l ${{ steps.config.outputs.build-args }}
|
||||
run: yarn build --publish never ${{ steps.config.outputs.build-args }} -l ${{ inputs.targets }}
|
||||
env:
|
||||
VARIANT_PATH: variant.json
|
||||
# Only set for Nightly builds
|
||||
ED_NIGHTLY: ${{ inputs.version }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
# Workaround for https://github.com/electron-userland/electron-builder/issues/5721
|
||||
USE_HARD_LINKS: false
|
||||
|
||||
- name: Check native libraries
|
||||
run: |
|
||||
@@ -149,11 +192,9 @@ jobs:
|
||||
shopt -s globstar
|
||||
|
||||
FILES=$(file dist/**/*.node)
|
||||
echo "$FILES"
|
||||
echo $FILES
|
||||
|
||||
if [ grep -v "$ARCH" ]; then
|
||||
exit 1
|
||||
fi
|
||||
! echo "$FILES" | grep -v "$ARCH"
|
||||
|
||||
LIBS=$(readelf -d dist/**/*.node | grep NEEDED)
|
||||
echo "$LIBS"
|
||||
@@ -173,29 +214,48 @@ jobs:
|
||||
|
||||
# We exclude *-unpacked as it loses permissions and the tarball contains it with correct permissions
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
|
||||
name: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
|
||||
path: |
|
||||
dist
|
||||
!dist/*-unpacked/**
|
||||
retention-days: 1
|
||||
|
||||
- name: Assert all required files are present
|
||||
- name: Assert deb is present and valid
|
||||
if: contains(inputs.targets, 'deb')
|
||||
run: |
|
||||
test -f ./dist/element-desktop*$ARCH.deb
|
||||
test -f ./dist/element-desktop*.tar.gz
|
||||
|
||||
DEB_LISTING=$(dpkg-deb --fsys-tarfile ./dist/element-desktop*.deb | tar -tv)
|
||||
echo "deb listing: "
|
||||
echo "$DEB_LISTING"
|
||||
! echo "$DEB_LISTING" | grep '^h'
|
||||
env:
|
||||
ARCH: ${{ inputs.arch }}
|
||||
|
||||
- name: Assert tar.gz is present
|
||||
if: contains(inputs.targets, 'tar.gz')
|
||||
run: |
|
||||
test -f ./dist/element-desktop*.tar.gz
|
||||
|
||||
TAR_GZ_LISTING=$(tar -tvf ./dist/element-desktop*.tar.gz)
|
||||
echo "tar.gz listing: "
|
||||
echo "$TAR_GZ_LISTING"
|
||||
! echo "$TAR_GZ_LISTING" | grep '^h'
|
||||
|
||||
test:
|
||||
name: Test Linux ${{ inputs.arch }} SQLCipher ${{ inputs.sqlcipher }}
|
||||
needs: build
|
||||
if: inputs.test && contains(inputs.targets, 'deb')
|
||||
uses: ./.github/workflows/build_test.yaml
|
||||
with:
|
||||
artifact: linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
|
||||
runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
|
||||
project: linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
|
||||
artifact: ${{ inputs.artifact-prefix }}linux-${{ inputs.arch }}-sqlcipher-${{ inputs.sqlcipher }}
|
||||
runs-on: ${{ inputs.runs-on || (inputs.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04') }}
|
||||
executable: /opt/Element*/element-desktop*
|
||||
prepare_cmd: |
|
||||
sudo apt-get -qq update
|
||||
sudo apt install ./dist/*.deb
|
||||
blob_report: ${{ inputs.blob_report }}
|
||||
args: ${{ inputs.test-args }}
|
||||
|
||||
82
.github/workflows/build_macos.yaml
vendored
@@ -15,6 +15,10 @@ on:
|
||||
APPLE_CSC_LINK:
|
||||
required: false
|
||||
inputs:
|
||||
ref:
|
||||
type: string
|
||||
required: false
|
||||
description: "The git ref to checkout, defaults to the default branch"
|
||||
version:
|
||||
type: string
|
||||
required: false
|
||||
@@ -31,21 +35,58 @@ on:
|
||||
type: boolean
|
||||
required: false
|
||||
description: "Whether to run the blob report"
|
||||
prepare-artifact-name:
|
||||
type: string
|
||||
required: false
|
||||
description: |
|
||||
The name of the prepare artifact to use, defaults to 'webapp'.
|
||||
The artifact must contain the following:
|
||||
+ webapp.asar - the asar archive of the webapp to embed in the desktop app
|
||||
+ electronVersion - the version of electron to use for cache keying
|
||||
+ hakHash - the hash of the .hak directory to use for cache keying
|
||||
+ variant.json - the variant configuration to use for the build
|
||||
|
||||
The artifact can also contain any additional files which will be applied as overrides to the checkout root before building,
|
||||
for example icons in the `build/` directory to override the app icons.
|
||||
default: "webapp"
|
||||
test:
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
description: "Whether to run the test stage after building"
|
||||
test-args:
|
||||
type: string
|
||||
required: false
|
||||
description: "Additional arguments to pass to playwright"
|
||||
artifact-prefix:
|
||||
type: string
|
||||
required: false
|
||||
description: "An optional prefix to add to the artifact name, useful for distinguishing builds in private repos."
|
||||
default: ""
|
||||
targets:
|
||||
type: string
|
||||
required: false
|
||||
description: "List of targets to build"
|
||||
default: "dmg zip"
|
||||
permissions: {} # No permissions required
|
||||
jobs:
|
||||
build:
|
||||
name: Build macOS Universal
|
||||
runs-on: macos-14 # M1
|
||||
environment: ${{ inputs.sign && 'packages.element.io' || '' }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
with:
|
||||
name: webapp
|
||||
repository: element-hq/element-desktop
|
||||
ref: ${{ inputs.ref }}
|
||||
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
with:
|
||||
name: ${{ inputs.prepare-artifact-name }}
|
||||
|
||||
- name: Cache .hak
|
||||
id: cache
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ hashFiles('hakHash', 'electronVersion') }}
|
||||
path: |
|
||||
@@ -60,11 +101,11 @@ jobs:
|
||||
rustup target add x86_64-apple-darwin
|
||||
|
||||
# M1 macos-14 comes without Python preinstalled
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
||||
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: "yarn"
|
||||
@@ -84,15 +125,16 @@ jobs:
|
||||
- name: "[Signed] Build App"
|
||||
if: inputs.sign != ''
|
||||
run: |
|
||||
yarn build:universal --publish never
|
||||
yarn build:universal --publish never -m ${{ inputs.targets }}
|
||||
env:
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
|
||||
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
|
||||
VARIANT_PATH: variant.json
|
||||
# Only set for Nightly builds
|
||||
ED_NIGHTLY: ${{ inputs.version }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
|
||||
- name: Check app was signed & notarised successfully
|
||||
if: inputs.sign != ''
|
||||
@@ -105,9 +147,10 @@ jobs:
|
||||
- name: "[Unsigned] Build App"
|
||||
if: inputs.sign == ''
|
||||
run: |
|
||||
yarn build:universal --publish never
|
||||
yarn build:universal --publish never -m ${{ inputs.targets }}
|
||||
env:
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: false
|
||||
VARIANT_PATH: variant.json
|
||||
|
||||
- name: Generate releases.json
|
||||
if: inputs.base-url
|
||||
@@ -137,24 +180,32 @@ 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: macos
|
||||
name: ${{ inputs.artifact-prefix }}macos
|
||||
path: |
|
||||
dist
|
||||
!dist/mac-universal/**
|
||||
retention-days: 1
|
||||
|
||||
- name: Assert all required files are present
|
||||
- name: Assert zip is present
|
||||
if: contains(inputs.targets, 'zip')
|
||||
run: |
|
||||
test -f ./dist/Element*.dmg
|
||||
test -f ./dist/Element*-mac.zip
|
||||
|
||||
- name: Assert dmg is present
|
||||
if: contains(inputs.targets, 'dmg')
|
||||
run: |
|
||||
test -f ./dist/Element*.dmg
|
||||
|
||||
test:
|
||||
name: Test macOS Universal
|
||||
needs: build
|
||||
if: inputs.test && contains(inputs.targets, 'dmg')
|
||||
uses: ./.github/workflows/build_test.yaml
|
||||
with:
|
||||
artifact: macos
|
||||
project: macos
|
||||
artifact: ${{ inputs.artifact-prefix }}macos
|
||||
runs-on: macos-14
|
||||
executable: /Users/runner/Applications/Element*.app/Contents/MacOS/Element*
|
||||
# We need to mount the DMG and copy the app to the Applications folder as a mounted DMG is
|
||||
@@ -164,3 +215,4 @@ jobs:
|
||||
rsync -a /Volumes/Element/Element*.app ~/Applications/ &&
|
||||
hdiutil detach /Volumes/Element
|
||||
blob_report: ${{ inputs.blob_report }}
|
||||
args: ${{ inputs.test-args }}
|
||||
|
||||
13
.github/workflows/build_prepare.yaml
vendored
@@ -54,9 +54,9 @@ jobs:
|
||||
outputs:
|
||||
nightly-version: ${{ steps.versions.outputs.nightly }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: "yarn"
|
||||
@@ -85,6 +85,11 @@ jobs:
|
||||
if: steps.branch-matching.outcome == 'failure' || steps.branch-matching.outcome == 'skipped'
|
||||
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
|
||||
|
||||
- name: Copy variant config
|
||||
run: cp "$CONFIG_DIR/build.json" variant.json
|
||||
env:
|
||||
CONFIG_DIR: ${{ inputs.config }}
|
||||
|
||||
# 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: |
|
||||
@@ -160,13 +165,13 @@ 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: webapp
|
||||
retention-days: 1
|
||||
path: |
|
||||
webapp.asar
|
||||
package.json
|
||||
electronVersion
|
||||
hakHash
|
||||
changelog.Debian
|
||||
variant.json
|
||||
|
||||
23
.github/workflows/build_test.yaml
vendored
@@ -10,6 +10,10 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
description: "The name of the artifact to download"
|
||||
project:
|
||||
type: string
|
||||
required: true
|
||||
description: "The Playwright project to use for testing"
|
||||
executable:
|
||||
type: string
|
||||
required: true
|
||||
@@ -22,14 +26,21 @@ on:
|
||||
type: boolean
|
||||
default: false
|
||||
description: "Whether to upload a blob report instead of the HTML report"
|
||||
args:
|
||||
type: string
|
||||
required: false
|
||||
description: "Additional arguments to pass to playwright, for e.g. skipping specific tests"
|
||||
permissions: {}
|
||||
jobs:
|
||||
test:
|
||||
name: Test ${{ inputs.project }}
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
with:
|
||||
repository: ${{ github.repository == 'element-hq/element-web-pro' && 'element-hq/element-desktop' || github.repository }}
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: "yarn"
|
||||
@@ -37,7 +48,7 @@ jobs:
|
||||
- name: Install Deps
|
||||
run: "yarn install --frozen-lockfile"
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
with:
|
||||
name: ${{ inputs.artifact }}
|
||||
path: dist
|
||||
@@ -69,13 +80,13 @@ jobs:
|
||||
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
|
||||
timeout-minutes: 20
|
||||
with:
|
||||
run: yarn test --project=${{ inputs.artifact }} ${{ runner.os != 'Linux' && '--ignore-snapshots' || '' }} ${{ inputs.blob_report == false && '--reporter=html' || '' }}
|
||||
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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: blob-report-${{ inputs.artifact }}
|
||||
path: blob-report
|
||||
@@ -83,7 +94,7 @@ jobs:
|
||||
|
||||
- name: Upload HTML report
|
||||
if: always() && inputs.blob_report == false
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: ${{ inputs.artifact }}-test
|
||||
path: playwright-report
|
||||
|
||||
90
.github/workflows/build_windows.yaml
vendored
@@ -18,6 +18,10 @@ on:
|
||||
ESIGNER_USER_TOTP:
|
||||
required: false
|
||||
inputs:
|
||||
ref:
|
||||
type: string
|
||||
required: false
|
||||
description: "The git ref to checkout, defaults to the default branch"
|
||||
arch:
|
||||
type: string
|
||||
required: true
|
||||
@@ -34,9 +38,48 @@ on:
|
||||
type: boolean
|
||||
required: false
|
||||
description: "Whether to run the blob report"
|
||||
prepare-artifact-name:
|
||||
type: string
|
||||
required: false
|
||||
description: |
|
||||
The name of the prepare artifact to use, defaults to 'webapp'.
|
||||
The artifact must contain the following:
|
||||
+ webapp.asar - the asar archive of the webapp to embed in the desktop app
|
||||
+ electronVersion - the version of electron to use for cache keying
|
||||
+ hakHash - the hash of the .hak directory to use for cache keying
|
||||
+ variant.json - the variant configuration to use for the build
|
||||
|
||||
|
||||
The artifact can also contain any additional files which will be applied as overrides to the checkout root before building,
|
||||
for example icons in the `build/` directory to override the app icons.
|
||||
default: "webapp"
|
||||
test:
|
||||
type: boolean
|
||||
required: false
|
||||
default: true
|
||||
description: "Whether to run the test stage after building"
|
||||
test-runs-on:
|
||||
type: string
|
||||
required: false
|
||||
description: "The runner image to use for testing, normally set for you, may be needed for running in private repos."
|
||||
test-args:
|
||||
type: string
|
||||
required: false
|
||||
description: "Additional arguments to pass to playwright"
|
||||
artifact-prefix:
|
||||
type: string
|
||||
required: false
|
||||
description: "An optional prefix to add to the artifact name, useful for distinguishing builds in private repos."
|
||||
default: ""
|
||||
targets:
|
||||
type: string
|
||||
required: false
|
||||
description: "List of targets to build"
|
||||
default: "squirrel msi"
|
||||
permissions: {} # No permissions required
|
||||
jobs:
|
||||
build:
|
||||
name: Build Windows ${{ inputs.arch }}
|
||||
runs-on: windows-2025
|
||||
environment: ${{ inputs.sign && 'packages.element.io' || '' }}
|
||||
env:
|
||||
@@ -65,15 +108,18 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
with:
|
||||
name: webapp
|
||||
repository: element-hq/element-desktop
|
||||
ref: ${{ inputs.ref }}
|
||||
|
||||
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
|
||||
with:
|
||||
name: ${{ inputs.prepare-artifact-name }}
|
||||
|
||||
- name: Cache .hak
|
||||
id: cache
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakHash', 'electronVersion') }}
|
||||
path: |
|
||||
@@ -102,7 +148,7 @@ jobs:
|
||||
rustup default stable
|
||||
rustup target add ${{ steps.config.outputs.target }}
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: "yarn"
|
||||
@@ -186,10 +232,16 @@ jobs:
|
||||
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
|
||||
|
||||
- name: Build App
|
||||
run: yarn build --publish never -w ${{ steps.config.outputs.build-args }}
|
||||
run: yarn build --publish never ${{ steps.config.outputs.build-args }} -w ${{ inputs.targets }}
|
||||
env:
|
||||
VARIANT_PATH: variant.json
|
||||
# Only set for Nightly builds
|
||||
ED_NIGHTLY: ${{ inputs.version }}
|
||||
# The windows packager relies on parsing this as semver, so we have to make it look like one.
|
||||
# This will give our update packages really stupid names, but we probably can't change that either
|
||||
# because squirrel windows parses them for the version too. We don't really care: nobody sees them.
|
||||
# We just give the installer a static name, so you'll just see this in the 'about' dialog.
|
||||
# Turns out if you use 0.0.0 here it makes Squirrel windows crash, so we use 0.0.1.
|
||||
VERSION: ${{ inputs.version && format('0.0.1-nightly.{0}', inputs.version) || '' }}
|
||||
|
||||
- name: Trust eSigner sandbox cert
|
||||
if: inputs.sign == ''
|
||||
@@ -206,26 +258,38 @@ jobs:
|
||||
| ForEach-Object -Process {. $env:SIGNTOOL_PATH verify /pa $_.FullName; if(!$?) { throw }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
|
||||
with:
|
||||
name: win-${{ inputs.arch }}
|
||||
name: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }}
|
||||
path: |
|
||||
dist
|
||||
retention-days: 1
|
||||
|
||||
- name: Assert all required files are present
|
||||
- name: Assert executable is present
|
||||
run: |
|
||||
Test-Path './dist/win-*unpacked/Element*.exe'
|
||||
|
||||
- name: Assert all Squirrel files are present
|
||||
if: contains(inputs.targets, 'squirrel')
|
||||
run: |
|
||||
Test-Path './dist/squirrel-windows*/Element Setup*.exe'
|
||||
Test-Path './dist/squirrel-windows*/element-desktop-*-full.nupkg'
|
||||
Test-Path './dist/squirrel-windows*/RELEASES'
|
||||
|
||||
- name: Assert MSI is present
|
||||
if: contains(inputs.targets, 'msi')
|
||||
run: |
|
||||
Test-Path './dist/Element*.msi'
|
||||
|
||||
test:
|
||||
name: Test Windows ${{ inputs.arch }}
|
||||
needs: build
|
||||
if: inputs.test
|
||||
uses: ./.github/workflows/build_test.yaml
|
||||
with:
|
||||
artifact: win-${{ inputs.arch }}
|
||||
runs-on: ${{ inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022' }}
|
||||
project: win-${{ inputs.arch }}
|
||||
artifact: ${{ inputs.artifact-prefix }}win-${{ inputs.arch }}
|
||||
runs-on: ${{ inputs.test-runs-on || (inputs.arch == 'arm64' && 'windows-11-arm' || 'windows-2022') }}
|
||||
executable: ./dist/win*-unpacked/Element*.exe
|
||||
blob_report: ${{ inputs.blob_report }}
|
||||
args: ${{ inputs.test-args }}
|
||||
|
||||
8
.github/workflows/dockerbuild.yaml
vendored
@@ -19,10 +19,10 @@ jobs:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3
|
||||
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
run: docker run -v $PWD:/project element-desktop-dockerbuild yarn install
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@3d100841f68d4548bf57e52eb27bd33ec5069f55
|
||||
uses: docker/login-action@28fdb31ff34708d19615a74d67103ddc2ea9725c
|
||||
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@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
|
||||
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
|
||||
16
.github/workflows/static_analysis.yaml
vendored
@@ -9,9 +9,9 @@ jobs:
|
||||
name: "Typescript Syntax Check"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: "yarn"
|
||||
@@ -35,9 +35,9 @@ jobs:
|
||||
name: "ESLint"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: "yarn"
|
||||
@@ -53,9 +53,9 @@ jobs:
|
||||
name: "Workflow Lint"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: "yarn"
|
||||
@@ -71,9 +71,9 @@ jobs:
|
||||
name: "Analyse Dead Code"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
|
||||
with:
|
||||
node-version-file: package.json
|
||||
cache: "yarn"
|
||||
|
||||
2
.github/workflows/triage-stale.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
|
||||
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10
|
||||
with:
|
||||
operations-per-run: 250
|
||||
days-before-issue-stale: -1
|
||||
|
||||
1
.gitignore
vendored
@@ -18,3 +18,4 @@ yarn-error.log
|
||||
/hak/**/*.js
|
||||
/scripts/hak/**/*.js
|
||||
.DS_Store
|
||||
/playwright-report
|
||||
|
||||
@@ -1 +1 @@
|
||||
v22.16.0
|
||||
24.11.1
|
||||
|
||||
304
CHANGELOG.md
@@ -1,3 +1,307 @@
|
||||
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
|
||||
|
||||
* Allow Desktop app to be auto-started minimised or focused ([#2622](https://github.com/element-hq/element-desktop/pull/2622)). Contributed by @t3chguy.
|
||||
* Room List: Extend the viewport to avoid so many black spots when scrolling the room list ([#30867](https://github.com/element-hq/element-web/pull/30867)). Contributed by @langleyd.
|
||||
* Hide calling buttons in room header before a room is created ([#30816](https://github.com/element-hq/element-web/pull/30816)). Contributed by @Half-Shot.
|
||||
* Improve invite dialog ui - Part 2 ([#30836](https://github.com/element-hq/element-web/pull/30836)). Contributed by @florianduros.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* Fix hardlinks appearing in and breaking deb packages ([#2609](https://github.com/element-hq/element-desktop/pull/2609)). Contributed by @t3chguy.
|
||||
* Fix platform settings race condition and make auto-launch tri-state ([#30977](https://github.com/element-hq/element-web/pull/30977)). Contributed by @t3chguy.
|
||||
* Fix: member count in header and member list ([#30982](https://github.com/element-hq/element-web/pull/30982)). Contributed by @florianduros.
|
||||
* Fix duration of voice message in timeline ([#30973](https://github.com/element-hq/element-web/pull/30973)). Contributed by @florianduros.
|
||||
* Fix voice notes rendering at 00:00 when playback had not begun. ([#30961](https://github.com/element-hq/element-web/pull/30961)). Contributed by @Half-Shot.
|
||||
* Improve handling of animated images, add support for AVIF animations ([#30932](https://github.com/element-hq/element-web/pull/30932)). Contributed by @t3chguy.
|
||||
* Update key storage toggle when key storage status changes ([#30934](https://github.com/element-hq/element-web/pull/30934)). Contributed by @uhoreg.
|
||||
* Fix jitsi widget popout ([#30908](https://github.com/element-hq/element-web/pull/30908)). Contributed by @dbkr.
|
||||
* Improve keyboard navigation on invite dialog ([#30930](https://github.com/element-hq/element-web/pull/30930)). Contributed by @florianduros.
|
||||
* Prefer UIA flows with supported UIA stages ([#30926](https://github.com/element-hq/element-web/pull/30926)). Contributed by @richvdh.
|
||||
* Enhance accessibility of dropdown ([#30928](https://github.com/element-hq/element-web/pull/30928)). Contributed by @florianduros.
|
||||
* Improve accessibility of the `\<AvatarSetting> component ([#30907](https://github.com/element-hq/element-web/pull/30907)). Contributed by @MidhunSureshR.
|
||||
|
||||
|
||||
|
||||
Changes in [1.12.1](https://github.com/element-hq/element-desktop/releases/tag/v1.12.1) (2025-10-07)
|
||||
====================================================================================================
|
||||
## ✨ Features
|
||||
|
||||
* New Room List: Change the order of filters to match those on mobile ([#30905](https://github.com/element-hq/element-web/pull/30905)). Contributed by @langleyd.
|
||||
* New Room List: Don't clear filters on space change ([#30903](https://github.com/element-hq/element-web/pull/30903)). Contributed by @langleyd.
|
||||
* Add release announcement for the sounds ([#30900](https://github.com/element-hq/element-web/pull/30900)). Contributed by @langleyd.
|
||||
* Rich Text Editor: Add emoji suggestion support ([#30873](https://github.com/element-hq/element-web/pull/30873)). Contributed by @langleyd.
|
||||
* feat: Disable session lock when running in element-desktop ([#30643](https://github.com/element-hq/element-web/pull/30643)). Contributed by @kaylendog.
|
||||
* Improve invite dialog ui - Part 1 ([#30764](https://github.com/element-hq/element-web/pull/30764)). Contributed by @florianduros.
|
||||
* Update Message Sound for Element ([#30804](https://github.com/element-hq/element-web/pull/30804)). Contributed by @beatdemon.
|
||||
* Add new and improved ringtone ([#30761](https://github.com/element-hq/element-web/pull/30761)). Contributed by @Half-Shot.
|
||||
* Disable RTE formatting buttons when the content contains a slash command ([#30802](https://github.com/element-hq/element-web/pull/30802)). Contributed by @langleyd.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* New Room List: Improve robustness of keyboard navigation ([#30888](https://github.com/element-hq/element-web/pull/30888)). Contributed by @langleyd.
|
||||
* Fix a11y issue on list in invite dialog ([#30878](https://github.com/element-hq/element-web/pull/30878)). Contributed by @florianduros.
|
||||
* Switch Export and Import Icons to match intuition ([#30805](https://github.com/element-hq/element-web/pull/30805)). Contributed by @micartey.
|
||||
* Hide breadcrumb option when new room list is enabled ([#30869](https://github.com/element-hq/element-web/pull/30869)). Contributed by @florianduros.
|
||||
* Avoid creating multiple call objects for the same widget ([#30839](https://github.com/element-hq/element-web/pull/30839)). Contributed by @robintown.
|
||||
* Add a test for #29882, which is fixed by matrix-org/matrix-js-sdk#5016 ([#30835](https://github.com/element-hq/element-web/pull/30835)). Contributed by @andybalaam.
|
||||
* fix: use `help_encryption_url` of config instead of hardcoded `https://element.io/help#encryption5` ([#30746](https://github.com/element-hq/element-web/pull/30746)). Contributed by @florianduros.
|
||||
* Fix html export when feature\_jump\_to\_date is enabled ([#30828](https://github.com/element-hq/element-web/pull/30828)). Contributed by @langleyd.
|
||||
* Fix #30439: "Forgot recovery key" should go to "reset" ([#30771](https://github.com/element-hq/element-web/pull/30771)). Contributed by @andybalaam.
|
||||
|
||||
|
||||
|
||||
Changes in [1.12.0](https://github.com/element-hq/element-desktop/releases/tag/v1.12.0) (2025-09-23)
|
||||
====================================================================================================
|
||||
## 🦖 Deprecations
|
||||
|
||||
* Remove remaining support for outdated .well-known settings ([#30702](https://github.com/element-hq/element-web/pull/30702)). Contributed by @richvdh.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
* Automatically select first source for desktop capture under Wayland ([#2526](https://github.com/element-hq/element-desktop/pull/2526)). Contributed by @byquanton.
|
||||
* Add decline button to call notification toast (use new notification event) ([#30729](https://github.com/element-hq/element-web/pull/30729)). Contributed by @toger5.
|
||||
* Use the new room list by default ([#30640](https://github.com/element-hq/element-web/pull/30640)). Contributed by @langleyd.
|
||||
* "Verify this device" redesign ([#30596](https://github.com/element-hq/element-web/pull/30596)). Contributed by @uhoreg.
|
||||
* Set Element Call "intents" when starting and answering DM calls. ([#30730](https://github.com/element-hq/element-web/pull/30730)). Contributed by @Half-Shot.
|
||||
* Add axe compliance for new room list ([#30700](https://github.com/element-hq/element-web/pull/30700)). Contributed by @langleyd.
|
||||
* Stop ringing and remove toast if another device answers a RTC call. ([#30728](https://github.com/element-hq/element-web/pull/30728)). Contributed by @Half-Shot.
|
||||
* Automatically adjust history visibility when making a room private ([#30713](https://github.com/element-hq/element-web/pull/30713)). Contributed by @Half-Shot.
|
||||
* Release announcement for new room list ([#30675](https://github.com/element-hq/element-web/pull/30675)). Contributed by @dbkr.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* Update Electron to v38.1.0 to fix Kernel crash on multi-GPU systems ([#2544](https://github.com/element-hq/element-desktop/pull/2544)). Contributed by @Arcitec.
|
||||
* Fix Confirm your identity buttons being unclickable ([#2554](https://github.com/element-hq/element-desktop/pull/2554)). Contributed by @dbkr.
|
||||
* Ensure dropdown is not a drag element on macOS ([#2540](https://github.com/element-hq/element-desktop/pull/2540)). Contributed by @t3chguy.
|
||||
* [Backport staging] Room list: make the filter resize correctly ([#30795](https://github.com/element-hq/element-web/pull/30795)). Contributed by @RiotRobot.
|
||||
* [Backport staging] Avoid flicker of the room list filter on resize ([#30794](https://github.com/element-hq/element-web/pull/30794)). Contributed by @RiotRobot.
|
||||
* Don't show release announcements while toasts are displayed ([#30770](https://github.com/element-hq/element-web/pull/30770)). Contributed by @dbkr.
|
||||
* Fix enabling key backup not working if there is an untrusted key backup ([#30707](https://github.com/element-hq/element-web/pull/30707)). Contributed by @Half-Shot.
|
||||
* Force `preload` to be false when setting an intent on an Element Call. ([#30759](https://github.com/element-hq/element-web/pull/30759)). Contributed by @Half-Shot.
|
||||
* Fix handling of 413 server response when uploading media ([#30737](https://github.com/element-hq/element-web/pull/30737)). Contributed by @hughns.
|
||||
* Make landmark navigation work with new room list ([#30747](https://github.com/element-hq/element-web/pull/30747)). Contributed by @dbkr.
|
||||
* Prevent voice message from displaying spurious errors ([#30736](https://github.com/element-hq/element-web/pull/30736)). Contributed by @florianduros.
|
||||
* Align default avatar and fix colors in composer pills ([#30739](https://github.com/element-hq/element-web/pull/30739)). Contributed by @florianduros.
|
||||
* Use configured URL for link to desktop app in message search settings ([#30742](https://github.com/element-hq/element-web/pull/30742)). Contributed by @t3chguy.
|
||||
* Fix history visibility when creating space rooms ([#30745](https://github.com/element-hq/element-web/pull/30745)). Contributed by @dbkr.
|
||||
* Check HTML-encoded quotes when handling translations for embedded pages (such as welcome.html) ([#30743](https://github.com/element-hq/element-web/pull/30743)). Contributed by @Half-Shot.
|
||||
* Fix local room encryption status always not enabled ([#30461](https://github.com/element-hq/element-web/pull/30461)). Contributed by @BillCarsonFr.
|
||||
* fix: make url in topic in room intro clickable ([#30686](https://github.com/element-hq/element-web/pull/30686)). Contributed by @florianduros.
|
||||
* Block change recovery key button while a change is ongoing. ([#30664](https://github.com/element-hq/element-web/pull/30664)). Contributed by @Half-Shot.
|
||||
* Hide advanced settings during room creation when `UIFeature.advancedSettings=false` ([#30684](https://github.com/element-hq/element-web/pull/30684)). Contributed by @florianduros.
|
||||
* A11y: improve accessibility of pinned messages ([#30558](https://github.com/element-hq/element-web/pull/30558)). Contributed by @florianduros.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.112](https://github.com/element-hq/element-desktop/releases/tag/v1.11.112) (2025-09-16)
|
||||
========================================================================================================
|
||||
Fix [CVE-2025-59161](https://www.cve.org/CVERecord?id=CVE-2025-59161) / [GHSA-m6c8-98f4-75rr](https://github.com/element-hq/element-web/security/advisories/GHSA-m6c8-98f4-75rr)
|
||||
|
||||
## This is the last release compatible with macOS Big Sur. It will not update further. Big Sur is End of Life for almost 2 years and the next version of Electron crashes upon startup on Big Sur.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
* [Backport staging] Handle unsupported macOS versions better ([#2555](https://github.com/element-hq/element-desktop/pull/2555)). Contributed by @RiotRobot.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.111](https://github.com/element-hq/element-desktop/releases/tag/v1.11.111) (2025-09-10)
|
||||
========================================================================================================
|
||||
## ✨ Features
|
||||
|
||||
* Do not hide media from your own user by default ([#29797](https://github.com/element-hq/element-web/pull/29797)). Contributed by @Half-Shot.
|
||||
* Remember whether sidebar is shown for calls when switching rooms ([#30262](https://github.com/element-hq/element-web/pull/30262)). Contributed by @bojidar-bg.
|
||||
* Open the proper integration settings on integrations disabled error ([#30538](https://github.com/element-hq/element-web/pull/30538)). Contributed by @Half-Shot.
|
||||
* Show a "progress" dialog while invites are being sent ([#30561](https://github.com/element-hq/element-web/pull/30561)). Contributed by @richvdh.
|
||||
* Move the room list to the new ListView(backed by react-virtuoso) ([#30515](https://github.com/element-hq/element-web/pull/30515)). Contributed by @langleyd.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* [Backport staging] Ensure container starts if it is mounted with an empty /modules directory. ([#30705](https://github.com/element-hq/element-web/pull/30705)). Contributed by @RiotRobot.
|
||||
* Fix room joining over federation not specifying vias or using aliases ([#30641](https://github.com/element-hq/element-web/pull/30641)). Contributed by @t3chguy.
|
||||
* Fix stable-suffixed MSC4133 support ([#30649](https://github.com/element-hq/element-web/pull/30649)). Contributed by @dbkr.
|
||||
* Fix i18n of message when a setting is disabled ([#30646](https://github.com/element-hq/element-web/pull/30646)). Contributed by @dbkr.
|
||||
* ListView should not handle the arrow keys if there is a modifier applied ([#30633](https://github.com/element-hq/element-web/pull/30633)). Contributed by @langleyd.
|
||||
* Make BaseDialog's div keyboard focusable and fix test. ([#30631](https://github.com/element-hq/element-web/pull/30631)). Contributed by @langleyd.
|
||||
* Fix: Allow triple-click text selection to flow around pills ([#30349](https://github.com/element-hq/element-web/pull/30349)). Contributed by @AlirezaMrtz.
|
||||
* Watch for a 'join' action to know when the call is connected ([#29492](https://github.com/element-hq/element-web/pull/29492)). Contributed by @robintown.
|
||||
* Fix: add missing tooltip and aria-label to lock icon next to composer ([#30623](https://github.com/element-hq/element-web/pull/30623)). Contributed by @florianduros.
|
||||
* Don't render context menu when scrolling ([#30613](https://github.com/element-hq/element-web/pull/30613)). Contributed by @langleyd.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.110](https://github.com/element-hq/element-desktop/releases/tag/v1.11.110) (2025-08-27)
|
||||
========================================================================================================
|
||||
## ✨ Features
|
||||
|
||||
* Hide recovery key when re-entering it while creating or changing it ([#30499](https://github.com/element-hq/element-web/pull/30499)). Contributed by @andybalaam.
|
||||
* Add `?no_universal_links=true` to OIDC url so EX doesn't try to handle it ([#29439](https://github.com/element-hq/element-web/pull/29439)). Contributed by @t3chguy.
|
||||
* Show a blue lock for unencrypted rooms and hide the grey shield for encrypted rooms ([#30440](https://github.com/element-hq/element-web/pull/30440)). Contributed by @langleyd.
|
||||
* Add support for Module API 1.4 ([#30185](https://github.com/element-hq/element-web/pull/30185)). Contributed by @t3chguy.
|
||||
* MVVM - Introduce some helpers for snapshot management ([#30398](https://github.com/element-hq/element-web/pull/30398)). Contributed by @MidhunSureshR.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* A11y: move focus to right panel when opened ([#30553](https://github.com/element-hq/element-web/pull/30553)). Contributed by @florianduros.
|
||||
* Fix e2e warning icon should be white ([#30539](https://github.com/element-hq/element-web/pull/30539)). Contributed by @florianduros.
|
||||
* Remove NoOneHere disabled reason. ([#30524](https://github.com/element-hq/element-web/pull/30524)). Contributed by @toger5.
|
||||
* Fix downloading files with authenticated media API ([#30520](https://github.com/element-hq/element-web/pull/30520)). Contributed by @t3chguy.
|
||||
* Fix call permissions check confusion around element call ([#30521](https://github.com/element-hq/element-web/pull/30521)). Contributed by @t3chguy.
|
||||
* Fix line wrap around emoji verification ([#30523](https://github.com/element-hq/element-web/pull/30523)). Contributed by @t3chguy.
|
||||
* Don't highlight redacted events ([#30519](https://github.com/element-hq/element-web/pull/30519)). Contributed by @t3chguy.
|
||||
* Fix matrix.to links not being handled in the app ([#30522](https://github.com/element-hq/element-web/pull/30522)). Contributed by @t3chguy.
|
||||
* Fix issue of new room list taking up the full width ([#30459](https://github.com/element-hq/element-web/pull/30459)). Contributed by @langleyd.
|
||||
* Fix widget persistence in React development mode ([#30509](https://github.com/element-hq/element-web/pull/30509)). Contributed by @robintown.
|
||||
* Fix widget initialization in React development mode ([#30463](https://github.com/element-hq/element-web/pull/30463)). Contributed by @robintown.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.109](https://github.com/element-hq/element-desktop/releases/tag/v1.11.109) (2025-08-11)
|
||||
========================================================================================================
|
||||
This release supports the upcoming v12 ("hydra") Matrix room version and is necessary to view and participate in these rooms.
|
||||
|
||||
## ✨ Features
|
||||
|
||||
* [Backport staging] Allow /upgraderoom command without developer mode enabled ([#30529](https://github.com/element-hq/element-web/pull/30529)). Contributed by @RiotRobot.
|
||||
* [Backport staging] Support for creator/owner power level ([#30526](https://github.com/element-hq/element-web/pull/30526)). Contributed by @RiotRobot.
|
||||
* New room list: change icon and label of menu item for to start a DM ([#30470](https://github.com/element-hq/element-web/pull/30470)). Contributed by @florianduros.
|
||||
* Implement the member list with virtuoso ([#29869](https://github.com/element-hq/element-web/pull/29869)). Contributed by @langleyd.
|
||||
* Add labs option for history sharing on invite ([#30313](https://github.com/element-hq/element-web/pull/30313)). Contributed by @richvdh.
|
||||
* Bump wysiwyg to 2.39.0 adding support for pasting rich text content in the Rich Text Edtior ([#30421](https://github.com/element-hq/element-web/pull/30421)). Contributed by @langleyd.
|
||||
* Support `EventShieldReason.MISMATCHED_SENDER` ([#30403](https://github.com/element-hq/element-web/pull/30403)). Contributed by @richvdh.
|
||||
* Change unencrypted and public pills to blue ([#30399](https://github.com/element-hq/element-web/pull/30399)). Contributed by @florianduros.
|
||||
* Change color of public room icon ([#30390](https://github.com/element-hq/element-web/pull/30390)). Contributed by @florianduros.
|
||||
* Script for updating storybook screenshots ([#30340](https://github.com/element-hq/element-web/pull/30340)). Contributed by @dbkr.
|
||||
* Add toggle to hide empty state in devtools ([#30352](https://github.com/element-hq/element-web/pull/30352)). Contributed by @toger5.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* [Backport staging] Use userId to filter users in non-federated rooms when showing the InviteDialog ([#30537](https://github.com/element-hq/element-web/pull/30537)). Contributed by @RiotRobot.
|
||||
* [Backport staging] Catch error when encountering invalid m.room.pinned\_events event ([#30536](https://github.com/element-hq/element-web/pull/30536)). Contributed by @RiotRobot.
|
||||
* Update for compatibility with v12 rooms ([#30452](https://github.com/element-hq/element-web/pull/30452)). Contributed by @dbkr.
|
||||
* New room list: fix tooltip on presence ([#30474](https://github.com/element-hq/element-web/pull/30474)). Contributed by @florianduros.
|
||||
* New room list: add tooltip for presence and room status ([#30472](https://github.com/element-hq/element-web/pull/30472)). Contributed by @florianduros.
|
||||
* Fix: Clicking on an item in the member list causes it to scroll to the top rather than show the profile view ([#30455](https://github.com/element-hq/element-web/pull/30455)). Contributed by @langleyd.
|
||||
* Put the 'decrypting' tooltip back ([#30446](https://github.com/element-hq/element-web/pull/30446)). Contributed by @dbkr.
|
||||
* Use server name explicitly for via. ([#30362](https://github.com/element-hq/element-web/pull/30362)). Contributed by @Half-Shot.
|
||||
* fix: replace hardcoded string in poll history dialog ([#30402](https://github.com/element-hq/element-web/pull/30402)). Contributed by @florianduros.
|
||||
* fix: replace hardcoded string on qr code back button ([#30401](https://github.com/element-hq/element-web/pull/30401)). Contributed by @florianduros.
|
||||
* Fix color of icon button with outline ([#30361](https://github.com/element-hq/element-web/pull/30361)). Contributed by @florianduros.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.108](https://github.com/element-hq/element-desktop/releases/tag/v1.11.108) (2025-07-30)
|
||||
========================================================================================================
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* [Backport staging] Fix downloaded attachments not being decrypted ([#30434](https://github.com/element-hq/element-web/pull/30434)). Contributed by @RiotRobot.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.107](https://github.com/element-hq/element-desktop/releases/tag/v1.11.107) (2025-07-29)
|
||||
========================================================================================================
|
||||
## ✨ Features
|
||||
|
||||
* Add support for overlaying notification badges on the Windows Taskbar icon. ([#2443](https://github.com/element-hq/element-desktop/pull/2443)). Contributed by @Half-Shot.
|
||||
* Reduce macos titlebar height with the new room list and expand the existing border ([#2446](https://github.com/element-hq/element-desktop/pull/2446)). Contributed by @florianduros.
|
||||
* Message preview should show tooltip with the full message on hover ([#30265](https://github.com/element-hq/element-web/pull/30265)). Contributed by @MidhunSureshR.
|
||||
* Support rendering notification badges on platforms that do their own icon overlays ([#30315](https://github.com/element-hq/element-web/pull/30315)). Contributed by @Half-Shot.
|
||||
* Add SubscriptionViewModel base class ([#30297](https://github.com/element-hq/element-web/pull/30297)). Contributed by @dbkr.
|
||||
* Enhancement: Save image on CTRL+S ([#30330](https://github.com/element-hq/element-web/pull/30330)). Contributed by @ioalexander.
|
||||
* Add quote functionality to MessageContextMenu (#29893) ([#30323](https://github.com/element-hq/element-web/pull/30323)). Contributed by @AlirezaMrtz.
|
||||
* Initial structure for shared component views ([#30216](https://github.com/element-hq/element-web/pull/30216)). Contributed by @dbkr.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* Reduce macos titlebar height with the new room list and expand the existing border ([#2446](https://github.com/element-hq/element-desktop/pull/2446)). Contributed by @florianduros.
|
||||
* [Backport staging] Fix e2e shield being invisible in white mode for encrypted room ([#30411](https://github.com/element-hq/element-web/pull/30411)). Contributed by @RiotRobot.
|
||||
* Force ED titlebar color for new room list ([#30332](https://github.com/element-hq/element-web/pull/30332)). Contributed by @florianduros.
|
||||
* Add a background color to left panel for macos titlebar in element desktop ([#30328](https://github.com/element-hq/element-web/pull/30328)). Contributed by @florianduros.
|
||||
* Fix: Prevent page refresh on Enter key in right panel member search ([#30312](https://github.com/element-hq/element-web/pull/30312)). Contributed by @AlirezaMrtz.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.106](https://github.com/element-hq/element-desktop/releases/tag/v1.11.106) (2025-07-15)
|
||||
========================================================================================================
|
||||
## ✨ Features
|
||||
|
||||
* [Backport staging] Fix e2e icon colour ([#30304](https://github.com/element-hq/element-web/pull/30304)). Contributed by @RiotRobot.
|
||||
* Add support for module message hint `allowDownloadingMedia` ([#30252](https://github.com/element-hq/element-web/pull/30252)). Contributed by @Half-Shot.
|
||||
* Update the mobile\_guide page to the new design and link out to Element X by default. ([#30172](https://github.com/element-hq/element-web/pull/30172)). Contributed by @pixlwave.
|
||||
* Filter settings exported when rageshaking ([#30236](https://github.com/element-hq/element-web/pull/30236)). Contributed by @Half-Shot.
|
||||
* Allow Element Call to learn the room name ([#30213](https://github.com/element-hq/element-web/pull/30213)). Contributed by @robintown.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
* [Backport staging] Fix missing image download button ([#30322](https://github.com/element-hq/element-web/pull/30322)). Contributed by @RiotRobot.
|
||||
* Fix transparent verification checkmark in dark mode ([#30235](https://github.com/element-hq/element-web/pull/30235)). Contributed by @Banbuii.
|
||||
* Fix logic in DeviceListener ([#30230](https://github.com/element-hq/element-web/pull/30230)). Contributed by @uhoreg.
|
||||
* Disable file drag-and-drop if insufficient permissions ([#30186](https://github.com/element-hq/element-web/pull/30186)). Contributed by @t3chguy.
|
||||
|
||||
|
||||
|
||||
Changes in [1.11.105](https://github.com/element-hq/element-desktop/releases/tag/v1.11.105) (2025-07-01)
|
||||
========================================================================================================
|
||||
## ✨ Features
|
||||
|
||||
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1,6 +1,6 @@
|
||||
# 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:af1a29a166198e1295ca667007e95d2e70c866e3928ba9b25f3907035581c39e
|
||||
FROM rust:bullseye@sha256:4886b155a84b46ad61df6a2249905bea8c61fc1eaa903398713233858ff6306b
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
set -x
|
||||
declare -A archMap=(["amd64"]="x64" ["arm64"]="arm64")
|
||||
ARCH="${archMap["$TARGETARCH"]}"
|
||||
NODE_VERSION=$(cat /.node-version)
|
||||
curl --proto "=https" -L "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \
|
||||
# The .node-version file generally doesn't have the 'v' (renovate does not put the 'v' and will
|
||||
# strip it on upgrade if it's there) but the 'v' is also widely supported so we probably ought
|
||||
# to just work either way.
|
||||
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
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as os from "node:os";
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import { type Configuration as BaseConfiguration, type Protocol } from "electron-builder";
|
||||
|
||||
/**
|
||||
* This script has different outputs depending on your os platform.
|
||||
*
|
||||
* On Windows:
|
||||
* Prefixes the nightly version with `0.0.1-nightly.` as it breaks if it is not semver
|
||||
* Passes $ED_SIGNTOOL_THUMBPRINT and $ED_SIGNTOOL_SUBJECT_NAME to
|
||||
* build.win.signtoolOptions.signingHashAlgorithms and build.win.signtoolOptions.certificateSubjectName respectively if specified.
|
||||
*
|
||||
@@ -16,32 +16,68 @@ import { type Configuration as BaseConfiguration, type Protocol } from "electron
|
||||
* Passes $ED_DEBIAN_CHANGELOG to build.deb.fpm if specified
|
||||
*/
|
||||
|
||||
const DEFAULT_APP_ID = "im.riot.app";
|
||||
const NIGHTLY_APP_ID = "im.riot.nightly";
|
||||
const NIGHTLY_DEB_NAME = "element-nightly";
|
||||
|
||||
const DEFAULT_PROTOCOL_SCHEME = "io.element.desktop";
|
||||
const NIGHTLY_PROTOCOL_SCHEME = "io.element.nightly";
|
||||
|
||||
/**
|
||||
* Interface describing relevant fields of the package.json file.
|
||||
*/
|
||||
interface Pkg {
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base metadata fields, used in both package.json and the variant configuration.
|
||||
*/
|
||||
interface Metadata {
|
||||
name: string;
|
||||
productName: string;
|
||||
description: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra metadata fields that are injected into the build to pass to the app at runtime.
|
||||
*/
|
||||
interface ExtraMetadata extends Metadata {
|
||||
electron_appId: string;
|
||||
electron_protocol: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface describing the variant configuration format.
|
||||
*/
|
||||
interface Variant extends Metadata {
|
||||
"appId": string;
|
||||
"linux.executableName"?: string;
|
||||
"linux.deb.name"?: string;
|
||||
"protocols": string[];
|
||||
}
|
||||
|
||||
type Writable<T> = NonNullable<
|
||||
T extends Function ? T : T extends object ? { -readonly [K in keyof T]: Writable<T[K]> } : T
|
||||
>;
|
||||
|
||||
const pkg: Pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
||||
// Load the default variant as a base configuration
|
||||
const DEFAULT_VARIANT = path.join("element.io", "release", "build.json");
|
||||
let variant: Variant = JSON.parse(fs.readFileSync(DEFAULT_VARIANT, "utf8"));
|
||||
|
||||
/**
|
||||
* If a variant is specified, we will use it to override the build-specific values.
|
||||
* This allows us to have different builds for different purposes (e.g. stable, nightly).
|
||||
*/
|
||||
if (process.env.VARIANT_PATH) {
|
||||
console.log(`Using variant configuration from '${process.env.VARIANT_PATH}':`);
|
||||
variant = {
|
||||
...variant,
|
||||
...JSON.parse(fs.readFileSync(`${process.env.VARIANT_PATH}`, "utf8")),
|
||||
};
|
||||
} else {
|
||||
console.warn(`No VARIANT_PATH specified, using default variant configuration '${DEFAULT_VARIANT}':`);
|
||||
}
|
||||
|
||||
for (const key in variant) {
|
||||
console.log(`${key}: ${variant[key]}`);
|
||||
}
|
||||
|
||||
interface Configuration extends BaseConfiguration {
|
||||
extraMetadata: Partial<Pick<Pkg, "version">> &
|
||||
Omit<Pkg, "version"> & {
|
||||
electron_appId: string;
|
||||
electron_protocol: string;
|
||||
};
|
||||
extraMetadata: Partial<Pick<Pkg, "version">> & ExtraMetadata;
|
||||
linux: BaseConfiguration["linux"];
|
||||
win: BaseConfiguration["win"];
|
||||
mac: BaseConfiguration["mac"];
|
||||
@@ -58,7 +94,7 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
|
||||
// Make all fuses required to ensure they are all explicitly specified
|
||||
electronFuses: Required<Configuration["electronFuses"]>;
|
||||
} = {
|
||||
appId: DEFAULT_APP_ID,
|
||||
appId: variant.appId,
|
||||
asarUnpack: "**/*.node",
|
||||
electronFuses: {
|
||||
enableCookieEncryption: true,
|
||||
@@ -82,26 +118,19 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
|
||||
},
|
||||
"lib/**",
|
||||
],
|
||||
extraResources: [
|
||||
{
|
||||
from: "res/img",
|
||||
to: "img",
|
||||
},
|
||||
"webapp.asar",
|
||||
],
|
||||
extraResources: ["build/icon.*", "webapp.asar"],
|
||||
extraMetadata: {
|
||||
name: pkg.name,
|
||||
productName: pkg.productName,
|
||||
description: pkg.description,
|
||||
electron_appId: DEFAULT_APP_ID,
|
||||
electron_protocol: DEFAULT_PROTOCOL_SCHEME,
|
||||
name: variant.name,
|
||||
productName: variant.productName,
|
||||
description: variant.description,
|
||||
electron_appId: variant.appId,
|
||||
electron_protocol: variant.protocols[0],
|
||||
},
|
||||
linux: {
|
||||
target: ["tar.gz", "deb"],
|
||||
category: "Network;InstantMessaging;Chat",
|
||||
maintainer: "support@element.io",
|
||||
icon: "build/icons",
|
||||
executableName: pkg.name, // element-desktop or element-desktop-nightly
|
||||
icon: "icon.png",
|
||||
executableName: variant.name, // element-desktop or element-desktop-nightly
|
||||
},
|
||||
deb: {
|
||||
packageCategory: "net",
|
||||
@@ -119,24 +148,17 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
|
||||
"libgbm1",
|
||||
],
|
||||
recommends: ["libsqlcipher0", "element-io-archive-keyring"],
|
||||
fpm: [
|
||||
"--deb-field",
|
||||
"Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)",
|
||||
"--deb-field",
|
||||
"Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)",
|
||||
"--deb-pre-depends",
|
||||
"libc6 (>= 2.31)",
|
||||
],
|
||||
fpm: ["--deb-pre-depends", "libc6 (>= 2.31)"],
|
||||
},
|
||||
mac: {
|
||||
target: ["dmg", "zip"],
|
||||
category: "public.app-category.social-networking",
|
||||
darkModeSupport: true,
|
||||
hardenedRuntime: true,
|
||||
gatekeeperAssess: true,
|
||||
// XXX: we cannot specify this due to https://github.com/electron/osx-sign/issues/344
|
||||
// strictVerify: true,
|
||||
strictVerify: true,
|
||||
entitlements: "./build/entitlements.mac.plist",
|
||||
icon: "build/icons/icon.icns",
|
||||
icon: "build/icon.icns",
|
||||
mergeASARs: true,
|
||||
x64ArchFiles: "**/matrix-seshat/*.node", // hak already runs lipo
|
||||
},
|
||||
@@ -145,7 +167,7 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
|
||||
signtoolOptions: {
|
||||
signingHashAlgorithms: ["sha256"],
|
||||
},
|
||||
icon: "build/icons/icon.ico",
|
||||
icon: "build/icon.ico",
|
||||
},
|
||||
msi: {
|
||||
perMachine: true,
|
||||
@@ -154,14 +176,27 @@ const config: Omit<Writable<Configuration>, "electronFuses"> & {
|
||||
output: "dist",
|
||||
},
|
||||
protocols: {
|
||||
name: "element",
|
||||
schemes: [DEFAULT_PROTOCOL_SCHEME, "element"],
|
||||
name: variant.productName,
|
||||
schemes: variant.protocols,
|
||||
},
|
||||
nativeRebuilder: "sequential",
|
||||
nodeGypRebuild: false,
|
||||
npmRebuild: true,
|
||||
};
|
||||
|
||||
/**
|
||||
* Allow specifying the version via env var.
|
||||
* If unspecified, it will default to the version in package.json.
|
||||
* @param {string} process.env.VERSION
|
||||
*/
|
||||
if (process.env.VERSION) {
|
||||
config.extraMetadata.version = process.env.VERSION;
|
||||
}
|
||||
|
||||
if (variant["linux.deb.name"]) {
|
||||
config.deb.fpm.push("--name", variant["linux.deb.name"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow specifying windows signing cert via env vars
|
||||
* @param {string} process.env.ED_SIGNTOOL_SUBJECT_NAME
|
||||
@@ -172,33 +207,6 @@ if (process.env.ED_SIGNTOOL_SUBJECT_NAME && process.env.ED_SIGNTOOL_THUMBPRINT)
|
||||
config.win.signtoolOptions!.certificateSha1 = process.env.ED_SIGNTOOL_THUMBPRINT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow specifying nightly version via env var
|
||||
* @param {string} process.env.ED_NIGHTLY
|
||||
*/
|
||||
if (process.env.ED_NIGHTLY) {
|
||||
config.deb.fpm = []; // Clear the fpm as the breaks deb fields don't apply to nightly
|
||||
|
||||
config.appId = config.extraMetadata.electron_appId = NIGHTLY_APP_ID;
|
||||
config.extraMetadata.productName += " Nightly";
|
||||
config.extraMetadata.name += "-nightly";
|
||||
config.extraMetadata.description += " (nightly unstable build)";
|
||||
config.linux.executableName += "-nightly";
|
||||
config.deb.fpm.push("--name", NIGHTLY_DEB_NAME);
|
||||
(config.protocols as Protocol).schemes[0] = config.extraMetadata.electron_protocol = NIGHTLY_PROTOCOL_SCHEME;
|
||||
|
||||
let version = process.env.ED_NIGHTLY;
|
||||
if (os.platform() === "win32") {
|
||||
// The windows packager relies on parsing this as semver, so we have to make it look like one.
|
||||
// This will give our update packages really stupid names, but we probably can't change that either
|
||||
// because squirrel windows parses them for the version too. We don't really care: nobody sees them.
|
||||
// We just give the installer a static name, so you'll just see this in the 'about' dialog.
|
||||
// Turns out if you use 0.0.0 here it makes Squirrel windows crash, so we use 0.0.1.
|
||||
version = "0.0.1-nightly." + version;
|
||||
}
|
||||
config.extraMetadata.version = version;
|
||||
}
|
||||
|
||||
if (os.platform() === "linux") {
|
||||
// Electron crashes on debian if there's a space in the path.
|
||||
// https://github.com/vector-im/element-web/issues/13171
|
||||
|
||||
9
element.io/nightly/build.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"appId": "im.riot.nightly",
|
||||
"name": "element-desktop-nightly",
|
||||
"productName": "Element Nightly",
|
||||
"description": "Element: the future of secure communication (nightly unstable build)",
|
||||
"protocols": ["io.element.nightly", "element"],
|
||||
"linux.executableName": "element-desktop-nightly",
|
||||
"linux.deb.name": "element-nightly"
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||
"bug_report_endpoint_url": "https://rageshakes.element.io/api/submit",
|
||||
"uisi_autorageshake_app": "element-auto-uisi",
|
||||
"show_labs_settings": true,
|
||||
"room_directory": {
|
||||
|
||||
7
element.io/release/build.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"appId": "im.riot.app",
|
||||
"name": "element-desktop",
|
||||
"productName": "Element",
|
||||
"description": "Element: the future of secure communication",
|
||||
"protocols": ["io.element.desktop", "element"]
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
"https://scalar-staging.vector.im/api",
|
||||
"https://scalar-staging.riot.im/scalar/api"
|
||||
],
|
||||
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
|
||||
"bug_report_endpoint_url": "https://rageshakes.element.io/api/submit",
|
||||
"uisi_autorageshake_app": "element-auto-uisi",
|
||||
"room_directory": {
|
||||
"servers": ["matrix.org", "gitter.im"]
|
||||
|
||||
4
knip.ts
@@ -1,7 +1,7 @@
|
||||
import { KnipConfig } from "knip";
|
||||
|
||||
export default {
|
||||
entry: ["src/electron-main.ts", "src/preload.ts", "electron-builder.ts", ".eslintrc-*.js", "scripts/**", "hak/**"],
|
||||
entry: ["src/preload.cts", "electron-builder.ts", "scripts/**", "hak/**"],
|
||||
project: ["**/*.{js,ts}"],
|
||||
ignoreDependencies: [
|
||||
// Brought in via hak scripts
|
||||
@@ -10,6 +10,8 @@ export default {
|
||||
"@action-validator/*",
|
||||
// Used for git pre-commit hooks
|
||||
"husky",
|
||||
// Required for `patch-package`
|
||||
"postinstall-postinstall",
|
||||
],
|
||||
ignoreBinaries: ["jq", "scripts/in-docker.sh"],
|
||||
} satisfies KnipConfig;
|
||||
|
||||
47
package.json
@@ -3,9 +3,12 @@
|
||||
"productName": "Element",
|
||||
"main": "lib/electron-main.js",
|
||||
"exports": "./lib/electron-main.js",
|
||||
"version": "1.11.106-rc.0",
|
||||
"version": "1.12.4",
|
||||
"description": "Element: the future of secure communication",
|
||||
"author": "Element",
|
||||
"author": {
|
||||
"name": "Element",
|
||||
"email": "support@element.io"
|
||||
},
|
||||
"homepage": "https://element.io",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -53,19 +56,19 @@
|
||||
"test": "playwright test",
|
||||
"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 /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 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": "patch-package && electron-builder install-app-deps"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/electron": "^6.0.0",
|
||||
"@sentry/electron": "^7.0.0",
|
||||
"auto-launch": "^5.0.5",
|
||||
"counterpart": "^0.18.6",
|
||||
"electron-store": "^10.0.0",
|
||||
"electron-store": "^11.0.0",
|
||||
"electron-window-state": "^5.0.3",
|
||||
"keytar-forked": "7.10.0",
|
||||
"minimist": "^1.2.6",
|
||||
"png-to-ico": "^2.1.1",
|
||||
"uuid": "^11.0.0"
|
||||
"png-to-ico": "^3.0.0",
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@action-validator/cli": "^0.6.0",
|
||||
@@ -73,49 +76,51 @@
|
||||
"@babel/core": "^7.18.10",
|
||||
"@babel/preset-env": "^7.18.10",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@electron/asar": "4.0.0",
|
||||
"@playwright/test": "1.53.1",
|
||||
"@stylistic/eslint-plugin": "^4.0.0",
|
||||
"@electron/asar": "4.0.1",
|
||||
"@playwright/test": "1.57.0",
|
||||
"@stylistic/eslint-plugin": "^5.0.0",
|
||||
"@types/auto-launch": "^5.0.1",
|
||||
"@types/counterpart": "^0.18.1",
|
||||
"@types/minimist": "^1.2.1",
|
||||
"@types/node": "18.19.112",
|
||||
"@types/node": "18.19.130",
|
||||
"@types/pacote": "^11.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
"@typescript-eslint/parser": "^8.0.0",
|
||||
"app-builder-lib": "26.0.16",
|
||||
"app-builder-lib": "26.2.0",
|
||||
"chokidar": "^4.0.0",
|
||||
"detect-libc": "^2.0.0",
|
||||
"electron": "36.5.0",
|
||||
"electron-builder": "26.0.16",
|
||||
"electron-builder-squirrel-windows": "26.0.16",
|
||||
"electron": "39.2.3",
|
||||
"electron-builder": "26.2.0",
|
||||
"electron-builder-squirrel-windows": "26.2.0",
|
||||
"electron-devtools-installer": "^4.0.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-config-prettier": "^10.0.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-matrix-org": "^2.0.1",
|
||||
"eslint-plugin-matrix-org": "^3.0.0",
|
||||
"eslint-plugin-n": "^17.12.0",
|
||||
"eslint-plugin-unicorn": "^56.0.0",
|
||||
"glob": "^11.0.0",
|
||||
"glob": "^13.0.0",
|
||||
"husky": "^9.1.6",
|
||||
"knip": "^5.0.0",
|
||||
"lint-staged": "^16.0.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",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "5.8.3"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"hakDependencies": {
|
||||
"matrix-seshat": "^4.0.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/node": "18.19.112",
|
||||
"@types/node": "18.19.130",
|
||||
"config-file-ts": "0.2.8-rc1",
|
||||
"node-abi": "4.9.0"
|
||||
"node-abi": "4.24.0"
|
||||
}
|
||||
}
|
||||
|
||||
18
patches/@types+auto-launch+5.0.5.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
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/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);
|
||||
|
||||
+ /**
|
||||
+ * This type describes the internal options of the `auto-launch` package which allows us to update options after initialization.
|
||||
+ */
|
||||
+ readonly opts: {
|
||||
+ isHiddenOnLaunch: boolean;
|
||||
+ };
|
||||
+
|
||||
/**
|
||||
* Enables auto-launch at start up.
|
||||
*/
|
||||
@@ -1,8 +1,11 @@
|
||||
FROM mcr.microsoft.com/playwright:v1.53.1-jammy@sha256:a51c6393b5a6d85897f347c7e5cf03086f50739dde02077e2bb5dc73044c732a
|
||||
FROM mcr.microsoft.com/playwright:v1.57.0-jammy@sha256:6aca677c27a967caf7673d108ac67ffaf8fed134f27e17b27a05464ca0ace831
|
||||
|
||||
WORKDIR /work/element-desktop
|
||||
|
||||
RUN apt-get update && apt-get -y install xvfb && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
|
||||
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
|
||||
|
||||
USER 1000:1000
|
||||
|
||||
|
||||
@@ -8,4 +8,11 @@ sleep 2
|
||||
|
||||
export DISPLAY=:99
|
||||
|
||||
npx playwright test --update-snapshots --reporter line $1
|
||||
yarn install --frozen-lockfile
|
||||
yarn 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
|
||||
|
||||
@@ -84,7 +84,7 @@ export const test = base.extend<Fixtures>({
|
||||
args.unshift(path.join(__dirname, "..", "lib", "electron-main.js"));
|
||||
}
|
||||
|
||||
console.log(`Launching '${executablePath}' with args ${args.join(" ")}`);
|
||||
console.log(`Launching '${executablePath || "electron"}' with args ${args.join(" ")}`);
|
||||
|
||||
const app = await electron.launch({
|
||||
env: {
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
2
src/@types/global.d.ts
vendored
@@ -7,7 +7,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { type BrowserWindow } from "electron";
|
||||
|
||||
import type AutoLaunch from "auto-launch";
|
||||
import { type AppLocalization } from "../language-helper.js";
|
||||
|
||||
// global type extensions need to use var for whatever reason
|
||||
@@ -18,7 +17,6 @@ declare global {
|
||||
var mainWindow: BrowserWindow | null;
|
||||
var appQuitting: boolean;
|
||||
var appLocalization: AppLocalization;
|
||||
var launcher: AutoLaunch;
|
||||
var vectorConfig: IConfigOptions;
|
||||
var trayConfig: {
|
||||
// eslint-disable-next-line camelcase
|
||||
|
||||
50
src/auto-launch.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright 2025 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import BaseAutoLaunch from "auto-launch";
|
||||
|
||||
import Store from "./store.js";
|
||||
|
||||
export type AutoLaunchState = "enabled" | "minimised" | "disabled";
|
||||
|
||||
// Wrapper around auto-launch to get/set the `isHidden` option
|
||||
export class AutoLaunch extends BaseAutoLaunch {
|
||||
private static internalInstance?: AutoLaunch;
|
||||
|
||||
public static get instance(): AutoLaunch {
|
||||
if (!AutoLaunch.internalInstance) {
|
||||
if (!Store.instance) throw new Error("Store not initialized");
|
||||
AutoLaunch.internalInstance = new AutoLaunch({
|
||||
name: global.vectorConfig.brand || "Element",
|
||||
isHidden: Store.instance.get("openAtLoginMinimised"),
|
||||
mac: {
|
||||
useLaunchAgent: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
return AutoLaunch.internalInstance;
|
||||
}
|
||||
|
||||
public async getState(): Promise<AutoLaunchState> {
|
||||
if (!(await this.isEnabled())) {
|
||||
return "disabled";
|
||||
}
|
||||
return this.opts.isHiddenOnLaunch ? "minimised" : "enabled";
|
||||
}
|
||||
|
||||
public async setState(state: AutoLaunchState): Promise<void> {
|
||||
const openAtLoginMinimised = state === "minimised";
|
||||
Store.instance?.set("openAtLoginMinimised", openAtLoginMinimised);
|
||||
this.opts.isHiddenOnLaunch = openAtLoginMinimised;
|
||||
|
||||
if (state !== "disabled") {
|
||||
return this.enable();
|
||||
} else {
|
||||
return this.disable();
|
||||
}
|
||||
}
|
||||
}
|
||||
49
src/badge.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright 2025 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { app, ipcMain, type IpcMainEvent, nativeImage } from "electron";
|
||||
|
||||
import { _t } from "./language-helper.js";
|
||||
|
||||
// Handles calculating the correct "badge" for the window, for notifications and error states.
|
||||
// Tray icon updates are handled in tray.ts
|
||||
|
||||
if (process.platform === "win32") {
|
||||
// We only use setOverlayIcon on Windows as it's only supported on that platform, but has good support
|
||||
// from all the Windows variants we support.
|
||||
// https://www.electronjs.org/docs/latest/api/browser-window#winsetoverlayiconoverlay-description-windows
|
||||
ipcMain.on(
|
||||
"setBadgeCount",
|
||||
function (_ev: IpcMainEvent, count: number, imageBuffer?: Buffer, isError?: boolean): void {
|
||||
if (count === 0) {
|
||||
// Flash frame is set to true in ipc.ts "loudNotification"
|
||||
global.mainWindow?.flashFrame(false);
|
||||
}
|
||||
if (imageBuffer) {
|
||||
global.mainWindow?.setOverlayIcon(
|
||||
nativeImage.createFromBuffer(Buffer.from(imageBuffer)),
|
||||
isError
|
||||
? _t("icon_overlay|description_error")
|
||||
: _t("icon_overlay|description_notifications", { count }),
|
||||
);
|
||||
} else {
|
||||
global.mainWindow?.setOverlayIcon(null, "");
|
||||
}
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// only set badgeCount on Mac/Linux, the docs say that only those platforms support it but turns out Electron
|
||||
// has some Windows support too, and in some Windows environments this leads to two badges rendering atop
|
||||
// each other. See https://github.com/vector-im/element-web/issues/16942
|
||||
ipcMain.on("setBadgeCount", function (_ev: IpcMainEvent, count: number): void {
|
||||
if (count === 0) {
|
||||
// Flash frame is set to true in ipc.ts "loudNotification"
|
||||
global.mainWindow?.flashFrame(false);
|
||||
}
|
||||
app.badgeCount = count;
|
||||
});
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018-2024 New Vector Ltd.
|
||||
Copyright 2018-2025 New Vector Ltd.
|
||||
Copyright 2017-2019 Michael Telatynski <7t3chguy@gmail.com>
|
||||
Copyright 2016 Aviral Dasgupta
|
||||
Copyright 2016 OpenMarket Ltd
|
||||
@@ -10,10 +10,20 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
// Squirrel on windows starts the app with various flags as hooks to tell us when we've been installed/uninstalled etc.
|
||||
import "./squirrelhooks.js";
|
||||
import { app, BrowserWindow, Menu, autoUpdater, dialog, type Input, type Event, session, protocol } from "electron";
|
||||
import {
|
||||
app,
|
||||
BrowserWindow,
|
||||
Menu,
|
||||
autoUpdater,
|
||||
dialog,
|
||||
type Input,
|
||||
type Event,
|
||||
session,
|
||||
protocol,
|
||||
desktopCapturer,
|
||||
} from "electron";
|
||||
// eslint-disable-next-line n/file-extension-in-import
|
||||
import * as Sentry from "@sentry/electron/main";
|
||||
import AutoLaunch from "auto-launch";
|
||||
import path, { dirname } from "node:path";
|
||||
import windowStateKeeper from "electron-window-state";
|
||||
import fs, { promises as afs } from "node:fs";
|
||||
@@ -23,6 +33,7 @@ import minimist from "minimist";
|
||||
import "./ipc.js";
|
||||
import "./seshat.js";
|
||||
import "./settings.js";
|
||||
import "./badge.js";
|
||||
import * as tray from "./tray.js";
|
||||
import Store from "./store.js";
|
||||
import { buildMenuTemplate } from "./vectormenu.js";
|
||||
@@ -157,59 +168,75 @@ function loadLocalConfigFile(): Json {
|
||||
}
|
||||
}
|
||||
|
||||
let loadConfigPromise: Promise<void> | undefined;
|
||||
// Loads the config from asar, and applies a config.json from userData atop if one exists
|
||||
// Writes config to `global.vectorConfig`. Does nothing if `global.vectorConfig` is already set.
|
||||
async function loadConfig(): Promise<void> {
|
||||
if (global.vectorConfig) return;
|
||||
// Writes config to `global.vectorConfig`. Idempotent, returns the same promise on subsequent calls.
|
||||
function loadConfig(): Promise<void> {
|
||||
if (loadConfigPromise) return loadConfigPromise;
|
||||
|
||||
const asarPath = await getAsarPath();
|
||||
async function actuallyLoadConfig(): Promise<void> {
|
||||
const asarPath = await getAsarPath();
|
||||
|
||||
try {
|
||||
console.log(`Loading app config: ${path.join(asarPath, LocalConfigFilename)}`);
|
||||
global.vectorConfig = loadJsonFile(asarPath, LocalConfigFilename);
|
||||
} catch {
|
||||
// it would be nice to check the error code here and bail if the config
|
||||
// is unparsable, but we get MODULE_NOT_FOUND in the case of a missing
|
||||
// file or invalid json, so node is just very unhelpful.
|
||||
// Continue with the defaults (ie. an empty config)
|
||||
global.vectorConfig = {};
|
||||
}
|
||||
|
||||
try {
|
||||
// Load local config and use it to override values from the one baked with the build
|
||||
const localConfig = loadLocalConfigFile();
|
||||
|
||||
// If the local config has a homeserver defined, don't use the homeserver from the build
|
||||
// config. This is to avoid a problem where Riot thinks there are multiple homeservers
|
||||
// defined, and panics as a result.
|
||||
if (Object.keys(localConfig).find((k) => homeserverProps.includes(<any>k))) {
|
||||
// Rip out all the homeserver options from the vector config
|
||||
global.vectorConfig = Object.keys(global.vectorConfig)
|
||||
.filter((k) => !homeserverProps.includes(<any>k))
|
||||
.reduce(
|
||||
(obj, key) => {
|
||||
obj[key] = global.vectorConfig[key];
|
||||
return obj;
|
||||
},
|
||||
{} as Omit<Partial<(typeof global)["vectorConfig"]>, keyof typeof homeserverProps>,
|
||||
);
|
||||
try {
|
||||
console.log(`Loading app config: ${path.join(asarPath, LocalConfigFilename)}`);
|
||||
global.vectorConfig = loadJsonFile(asarPath, LocalConfigFilename);
|
||||
} catch {
|
||||
// it would be nice to check the error code here and bail if the config
|
||||
// is unparsable, but we get MODULE_NOT_FOUND in the case of a missing
|
||||
// file or invalid json, so node is just very unhelpful.
|
||||
// Continue with the defaults (ie. an empty config)
|
||||
global.vectorConfig = {};
|
||||
}
|
||||
|
||||
global.vectorConfig = Object.assign(global.vectorConfig, localConfig);
|
||||
} catch (e) {
|
||||
if (e instanceof SyntaxError) {
|
||||
void dialog.showMessageBox({
|
||||
type: "error",
|
||||
title: `Your ${global.vectorConfig.brand || "Element"} is misconfigured`,
|
||||
message:
|
||||
`Your custom ${global.vectorConfig.brand || "Element"} configuration contains invalid JSON. ` +
|
||||
`Please correct the problem and reopen ${global.vectorConfig.brand || "Element"}.`,
|
||||
detail: e.message || "",
|
||||
try {
|
||||
// Load local config and use it to override values from the one baked with the build
|
||||
const localConfig = loadLocalConfigFile();
|
||||
|
||||
// If the local config has a homeserver defined, don't use the homeserver from the build
|
||||
// config. This is to avoid a problem where Riot thinks there are multiple homeservers
|
||||
// defined, and panics as a result.
|
||||
if (Object.keys(localConfig).find((k) => homeserverProps.includes(<any>k))) {
|
||||
// Rip out all the homeserver options from the vector config
|
||||
global.vectorConfig = Object.keys(global.vectorConfig)
|
||||
.filter((k) => !homeserverProps.includes(<any>k))
|
||||
.reduce(
|
||||
(obj, key) => {
|
||||
obj[key] = global.vectorConfig[key];
|
||||
return obj;
|
||||
},
|
||||
{} as Omit<Partial<(typeof global)["vectorConfig"]>, keyof typeof homeserverProps>,
|
||||
);
|
||||
}
|
||||
|
||||
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`,
|
||||
message:
|
||||
`Your custom ${global.vectorConfig.brand || "Element"} configuration contains invalid JSON. ` +
|
||||
`Please correct the problem and reopen ${global.vectorConfig.brand || "Element"}.`,
|
||||
detail: e.message || "",
|
||||
});
|
||||
}
|
||||
|
||||
// Could not load local config, this is expected in most cases.
|
||||
}
|
||||
|
||||
// Tweak modules paths as they assume the root is at the same level as webapp, but for `vector://vector/webapp` it is not.
|
||||
if (Array.isArray(global.vectorConfig.modules)) {
|
||||
global.vectorConfig.modules = global.vectorConfig.modules.map((m) => {
|
||||
if (m.startsWith("/")) {
|
||||
return "/webapp" + m;
|
||||
}
|
||||
return m;
|
||||
});
|
||||
}
|
||||
|
||||
// Could not load local config, this is expected in most cases.
|
||||
}
|
||||
loadConfigPromise = actuallyLoadConfig();
|
||||
return loadConfigPromise;
|
||||
}
|
||||
|
||||
// Configure Electron Sentry and crashReporter using sentry.dsn in config.json if one is present.
|
||||
@@ -227,54 +254,17 @@ async function configureSentry(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// Set up globals for Tray and AutoLaunch
|
||||
// Set up globals for Tray
|
||||
async function setupGlobals(): Promise<void> {
|
||||
const asarPath = await getAsarPath();
|
||||
await loadConfig();
|
||||
|
||||
// we assume the resources path is in the same place as the asar
|
||||
const resPath = await tryPaths("res", path.dirname(asarPath), [
|
||||
// If run from the source checkout
|
||||
"res",
|
||||
// if run from packaged application
|
||||
"",
|
||||
]);
|
||||
|
||||
// The tray icon
|
||||
// It's important to call `path.join` so we don't end up with the packaged asar in the final path.
|
||||
const iconFile = `element.${process.platform === "win32" ? "ico" : "png"}`;
|
||||
// Figure out the tray icon path & brand name
|
||||
const iconFile = `icon.${process.platform === "win32" ? "ico" : "png"}`;
|
||||
global.trayConfig = {
|
||||
icon_path: path.join(resPath, "img", iconFile),
|
||||
icon_path: path.join(path.dirname(asarPath), "build", iconFile),
|
||||
brand: global.vectorConfig.brand || "Element",
|
||||
};
|
||||
|
||||
// launcher
|
||||
global.launcher = new AutoLaunch({
|
||||
name: global.vectorConfig.brand || "Element",
|
||||
isHidden: true,
|
||||
mac: {
|
||||
useLaunchAgent: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// Look for an auto-launcher under 'Riot' and if we find one,
|
||||
// port its enabled/disabled-ness over to the new 'Element' launcher
|
||||
async function moveAutoLauncher(): Promise<void> {
|
||||
if (!global.vectorConfig.brand || global.vectorConfig.brand === "Element") {
|
||||
const oldLauncher = new AutoLaunch({
|
||||
name: "Riot",
|
||||
isHidden: true,
|
||||
mac: {
|
||||
useLaunchAgent: true,
|
||||
},
|
||||
});
|
||||
const wasEnabled = await oldLauncher.isEnabled();
|
||||
if (wasEnabled) {
|
||||
await oldLauncher.disable();
|
||||
await global.launcher.enable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
global.appQuitting = false;
|
||||
@@ -302,11 +292,6 @@ app.commandLine.appendSwitch("--enable-usermedia-screen-capturing");
|
||||
if (!app.commandLine.hasSwitch("enable-features")) {
|
||||
app.commandLine.appendSwitch("enable-features", "WebRTCPipeWireCapturer");
|
||||
}
|
||||
// Workaround bug in electron 36:https://github.com/electron/electron/issues/46538
|
||||
// Hopefully this will no longer be needed soon and can be removed
|
||||
if (process.platform === "linux") {
|
||||
app.commandLine.appendSwitch("gtk-version", "3");
|
||||
}
|
||||
|
||||
const gotLock = app.requestSingleInstanceLock();
|
||||
if (!gotLock) {
|
||||
@@ -363,7 +348,6 @@ app.on("ready", async () => {
|
||||
try {
|
||||
asarPath = await getAsarPath();
|
||||
await setupGlobals();
|
||||
await moveAutoLauncher();
|
||||
} catch (e) {
|
||||
console.log("App setup failed: exiting", e);
|
||||
process.exit(1);
|
||||
@@ -441,7 +425,6 @@ app.on("ready", async () => {
|
||||
if (argv["update"] === false) {
|
||||
console.log("Auto update disabled via command line flag");
|
||||
} else if (global.vectorConfig["update_base_url"]) {
|
||||
console.log(`Starting auto update with base URL: ${global.vectorConfig["update_base_url"]}`);
|
||||
void updater.start(global.vectorConfig["update_base_url"]);
|
||||
} else {
|
||||
console.log("No update_base_url is defined: auto update is disabled");
|
||||
@@ -582,10 +565,28 @@ app.on("ready", async () => {
|
||||
|
||||
webContentsHandler(global.mainWindow.webContents);
|
||||
|
||||
session.defaultSession.setDisplayMediaRequestHandler((_, callback) => {
|
||||
global.mainWindow?.webContents.send("openDesktopCapturerSourcePicker");
|
||||
setDisplayMediaCallback(callback);
|
||||
});
|
||||
session.defaultSession.setDisplayMediaRequestHandler(
|
||||
(_, callback) => {
|
||||
if (process.env.XDG_SESSION_TYPE === "wayland") {
|
||||
// On Wayland, calling getSources() opens the xdg-desktop-portal picker.
|
||||
// The user can only select a single source there, so Electron will return an array with exactly one entry.
|
||||
desktopCapturer
|
||||
.getSources({ types: ["screen", "window"] })
|
||||
.then((sources) => {
|
||||
callback({ video: sources[0] });
|
||||
})
|
||||
.catch((err) => {
|
||||
// If the user cancels the dialog an error occurs "Failed to get sources"
|
||||
console.error("Wayland: failed to get user-selected source:", err);
|
||||
callback({ video: { id: "", name: "" } }); // The promise does not return if no dummy is passed here as source
|
||||
});
|
||||
} else {
|
||||
global.mainWindow?.webContents.send("openDesktopCapturerSourcePicker");
|
||||
}
|
||||
setDisplayMediaCallback(callback);
|
||||
},
|
||||
{ useSystemPicker: true },
|
||||
); // Use Mac OS 15+ native picker
|
||||
|
||||
setupMediaAuth(global.mainWindow);
|
||||
});
|
||||
|
||||
@@ -32,9 +32,22 @@
|
||||
"speech_start_speaking": "Spustit nahrávání hlasu",
|
||||
"speech_stop_speaking": "Zastavit nahrávání hlasu"
|
||||
},
|
||||
"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í."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Soubor"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Chyba",
|
||||
"description_notifications": {
|
||||
"one": "Máte %(count)s nepřečtené oznámení.",
|
||||
"few": "Máte %(count)s nepřečtená oznámení.",
|
||||
"other": "Máte %(count)s nepřečtených oznámení."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Skrýt",
|
||||
"hide_others": "Skrýt ostatní",
|
||||
|
||||
@@ -32,9 +32,22 @@
|
||||
"speech_start_speaking": "Cychwyn Llefaru",
|
||||
"speech_stop_speaking": "Peidio Llefaru"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Rydych chi'n rhedeg fersiwn o macOS nad yw'n cael ei chefnogi. Uwchraddiwch i dderbyn diweddariadau %(brand)s.",
|
||||
"title": "System heb ei chefnogi",
|
||||
"warning": "Rydych chi'n rhedeg fersiwn o macOS nad yw'n cael ei chefnogi. Uwchraddiwch i sicrhau bod %(brand)s yn parhau i weithio."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Ffeil"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Gwall",
|
||||
"description_notifications": {
|
||||
"Mae gennych chi %(count)s hysbysiadau heb eu darllen.": "zero",
|
||||
"Mae gennych chi %(count)s hysbysiad heb ei ddarllen.": "one",
|
||||
"Mae gennych chi %(count)s hysbysiad heb eu darllen.": "other"
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Cuddio",
|
||||
"hide_others": "Cuddio'r Gweddill",
|
||||
@@ -61,7 +74,9 @@
|
||||
"backend_no_encryption_title": "Dim cefnogaeth amgryptio",
|
||||
"unsupported_keyring": "Mae gan eich system allweddell nad yw'n cael ei chefnogi sy'n golygu nad oes modd agor y gronfa ddata.",
|
||||
"unsupported_keyring_detail": "Heb ganfod allweddell Electron gefn. Gallwch geisio ffurfweddu'r gefn â llaw trwy gychwyn %(brand)s gyda dadl llinell orchymyn, gweithrediad untro. Gweler %(link)s.",
|
||||
"unsupported_keyring_title": "System heb ei chefnogi"
|
||||
"unsupported_keyring_title": "System heb ei chefnogi",
|
||||
"unsupported_keyring_use_basic_text": "Defnyddiwch amgryptio gwannach",
|
||||
"unsupported_keyring_use_plaintext": "Peidiwch â defnyddio amgryptio"
|
||||
}
|
||||
},
|
||||
"view_menu": {
|
||||
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Aufnahme starten",
|
||||
"speech_stop_speaking": "Aufnahme beenden"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Du benutzt eine nicht unterstützte Version von macOS. Bitte aktualisiere, um Updates für %(brand)s zu erhalten.",
|
||||
"title": "System nicht unterstützt",
|
||||
"warning": "Du benutzt eine nicht unterstützte Version von macOS. Bitte aktualisiere, damit %(brand)s weiter funktioniert."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Datei"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Fehler",
|
||||
"description_notifications": {
|
||||
"one": "Du hast %(count)s ungelesene Benachrichtigung.",
|
||||
"other": "Du hast %(count)s ungelesene Benachrichtigungen."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Verstecken",
|
||||
"hide_others": "Andere verstecken",
|
||||
@@ -57,13 +69,13 @@
|
||||
"backend_changed_detail": "Zugriff auf Schlüssel im Systemschlüsselbund nicht möglich, er scheint sich geändert zu haben.",
|
||||
"backend_changed_title": "Datenbank konnte nicht geladen werden",
|
||||
"backend_no_encryption": "Ihr System verfügt über einen unterstützten Keyring, aber die Verschlüsselung ist nicht verfügbar.",
|
||||
"backend_no_encryption_detail": "Electron hat festgestellt, dass Verschlüsselung in Ihrem Keyring %(backend)s nicht verfügbar ist. Bitte stellen Sie sicher, dass Sie den Keyringinstalliert haben. Wenn Sie den Keyring installiert haben, starten Sie ihn bitte neu und versuchen Sie es erneut. Optional können Sie die Verwendung einer schwächeren Form der Verschlüsselung zulassen %(brand)s.",
|
||||
"backend_no_encryption_detail": "Electron hat festgestellt, dass der Keyring von %(backend)s keine Verschlüsselung bietet. Wenn du den Keyring installiert hast, starte den Rechner bitte neu und versuche es erneut. Optional kann %(brand)s auch eine abgeschwächte Verschlüsselung nutzen.",
|
||||
"backend_no_encryption_title": "Keine Verschlüsselungsunterstützung",
|
||||
"unsupported_keyring": "Der Schlüsselbund ihres Systems wird nicht unterstützt, wodurch die Datenbank nicht geöffnet werden kann.",
|
||||
"unsupported_keyring_detail": "Die Schlüsselbunderkennung von Electron hat kein unterstütztes Backend gefunden. Möglicherweise können sie dennoch den ihres Systemes verwenden. Infos unter %(link)s.",
|
||||
"unsupported_keyring": "Der Keyring des Systems wird nicht unterstützt. Daher kann die Datenbank nicht geöffnet werden kann.",
|
||||
"unsupported_keyring_detail": "Die Keyring-Erkennung von Electron hat kein unterstütztes Backend gefunden. Du kannst einmalig versuchen, eine manuelle Konfiguration von %(brand)s über die Kommandozeile vorzunehmen. Infos unter %(link)s.",
|
||||
"unsupported_keyring_title": "System nicht unterstützt",
|
||||
"unsupported_keyring_use_basic_text": "Schwächere Verschlüsselung verwenden",
|
||||
"unsupported_keyring_use_plaintext": "Verwenden Sie keine Verschlüsselung"
|
||||
"unsupported_keyring_use_plaintext": "Verwende keine Verschlüsselung"
|
||||
}
|
||||
},
|
||||
"view_menu": {
|
||||
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Start Speaking",
|
||||
"speech_stop_speaking": "Stop Speaking"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "You are running an unsupported version of macOS. Please upgrade to receive %(brand)s updates.",
|
||||
"title": "System unsupported",
|
||||
"warning": "You are running an unsupported version of macOS. Please upgrade to ensure %(brand)s keeps working."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "File"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Error",
|
||||
"description_notifications": {
|
||||
"one": "You have %(count)s unread notification.",
|
||||
"other": "You have %(count)s unread notifications."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Hide",
|
||||
"hide_others": "Hide Others",
|
||||
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Alusta rääkimist",
|
||||
"speech_stop_speaking": "Lõpeta rääkimine"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Sa kasutad macOS-i toetamata versiooni. %(brand)s rakenduse tulevaste versioonide kasutamiseks palun uuenda operatsioonisüsteemi.",
|
||||
"title": "Süsteem pole toetatud",
|
||||
"warning": "Sa kasutad macOS-i toetamata versiooni. Et %(brand)s toimiks ka edaspidi, palun uuenda operatsioonisüsteemi."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Fail"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Viga",
|
||||
"description_notifications": {
|
||||
"one": "Sul on %(count)s lugemata teavitus",
|
||||
"other": "Sul on %(count)s lugemata teavitust"
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Peida",
|
||||
"hide_others": "Peida muud",
|
||||
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Commencer la dictée",
|
||||
"speech_stop_speaking": "Arrêter la dictée"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Vous utilisez une version de macOS non prise en charge. Veuillez mettre à jour macOS pour recevoir les mises à jour de %(brand)s.",
|
||||
"title": "Système non pris en charge",
|
||||
"warning": "Vous utilisez une version de macOS non prise en charge. Veuillez mettre à jour macOS afin que %(brand)s continue de fonctionner."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Fichier"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Erreur",
|
||||
"description_notifications": {
|
||||
"one": "Vous avez %(count)s notification non lue.",
|
||||
"other": "Vous avez %(count)s notifications non lues."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Masquer",
|
||||
"hide_others": "Masquer les autres",
|
||||
@@ -48,7 +60,7 @@
|
||||
"copy_image_url": "Copier l'adresse de l'image",
|
||||
"copy_link_url": "Copier l’adresse du lien",
|
||||
"save_image_as": "Enregistrer l’image sous…",
|
||||
"save_image_as_error_description": "L’image n’a pas pu être sauvegardée",
|
||||
"save_image_as_error_description": "L’image n’a pas pu être enregistrée",
|
||||
"save_image_as_error_title": "Échec de la sauvegarde de l’image"
|
||||
},
|
||||
"store": {
|
||||
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Kezdjen beszélni",
|
||||
"speech_stop_speaking": "Fejezze be a beszédet"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "A macOS egy nem támogatott verzióját futtatja. Frissítse, hogy megkapja az %(brand)s új frissítéseit.",
|
||||
"title": "A rendszer nem támogatott",
|
||||
"warning": "A macOS egy nem támogatott verzióját futtatja. Frissítse a rendszert, hogy biztosítsa az %(brand)s további működését."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Fájl"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Hiba",
|
||||
"description_notifications": {
|
||||
"one": "%(count)s olvasatlan értesítése van.",
|
||||
"other": "%(count)s olvasatlan értesítése van."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Elrejtés",
|
||||
"hide_others": "Mások elrejtése",
|
||||
|
||||
87
src/i18n/strings/hy.json
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"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": "Դադարեցրեք խոսելը"
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Ֆայլ"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Սխալ",
|
||||
"description_notifications": {
|
||||
"one": "Դուք ունեք %(count)s չկարդացված ծանուցում։",
|
||||
"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": "Գաղտնի տվյալները հասանելի չեն համակարգի բանալիների պահոցից(keyring), կարծես թե այն փոխվել է։",
|
||||
"backend_changed_title": "Չհաջողվեց բեռնել տվյալների բազան",
|
||||
"backend_no_encryption": "Ձեր համակարգը ունի աջակցվող բանալիների պահոց, բայց գաղտնագրումը հասանելի չէ։",
|
||||
"backend_no_encryption_detail": "Electron-ը հայտնաբերել է, որ ձեր բանալիների պահոցում %(backend)s գաղտնագրումը հասանելի չէ։ Խնդրում ենք համոզվել, որ բանալիների պահոցը տեղադրված է։ Եթե այն արդեն տեղադրված է, վերագործարկեք համակարգը և փորձեք կրկին։ Ցանկության դեպքում կարող եք թույլատրել %(brand)s-ին կիրառել ավելի թույլ գաղտնագրման տարբերակ։",
|
||||
"backend_no_encryption_title": "Գաղտնագրման աջակցություն չկա",
|
||||
"unsupported_keyring": "Համակարգում օգտագործվող բանալիների պահոցը(keyring) չի աջակցվում, ինչը նշանակում է, որ տվյալների բազան հնարավոր չէ բացել։",
|
||||
"unsupported_keyring_detail": "Electron-ի բանալիների պահոցի ստուգումը չգտավ համատեղելի backend։ Կարող եք փորձել ձեռքով կարգավորել backend-ը` մեկնարկելով %(brand)s-ը command-line արգումենտով, մեկանգամյա գործողությամբ։ Տես %(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": "Մեծացնել"
|
||||
}
|
||||
}
|
||||
@@ -32,9 +32,20 @@
|
||||
"speech_start_speaking": "Mulai Berbicara",
|
||||
"speech_stop_speaking": "Berhenti Berbicara"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Anda menggunakan versi macOS yang tidak didukung. Harap tingkatkan untuk menerima pembaruan %(brand)s.",
|
||||
"title": "Sistem tidak didukung",
|
||||
"warning": "Anda menggunakan versi macOS yang tidak didukung. Harap perbarui untuk memastikan%(brand)s terus bekerja."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Berkas"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Kesalahan",
|
||||
"description_notifications": {
|
||||
"other": "Anda memiliki %(count)s notifikasi yang belum dibaca."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Sembunyikan",
|
||||
"hide_others": "Sembunyikan yang Lain",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"brand_help": "%(brand)s Hjelp",
|
||||
"help": "Hjelp",
|
||||
"no": "Nei",
|
||||
"preferences": "Brukervalg",
|
||||
"preferences": "Innstillinger",
|
||||
"yes": "Ja"
|
||||
},
|
||||
"confirm_quit": "Er du sikker på at du vil slutte?",
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Begynn å snakke",
|
||||
"speech_stop_speaking": "Slutt å snakke"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Du kjører en versjon av macOS som ikke støttes. Oppgrader for å motta oppdateringer fr %(brand)s.",
|
||||
"title": "Systemet støttes ikke",
|
||||
"warning": "Du bruker en versjon av macOS som ikke støttes. Oppgrader for å sikre at %(brand)s fortsetter å fungere."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Fil"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Feil",
|
||||
"description_notifications": {
|
||||
"one": "Du har %(count)s ulest varsel.",
|
||||
"other": "Du har %(count)s uleste varsler."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Skjul",
|
||||
"hide_others": "Skjul andre",
|
||||
|
||||
@@ -32,9 +32,22 @@
|
||||
"speech_start_speaking": "Zacznij mówić",
|
||||
"speech_stop_speaking": "Przestań mówić"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Korzystasz z nieobsługiwanej wersji systemu macOS. Zaktualizuj system, aby uzyskać aktualizacje %(brand)s.",
|
||||
"title": "System nie jest obsługiwany",
|
||||
"warning": "Korzystasz z nieobsługiwanej wersji systemu macOS. Zaktualizuj system, aby dalej korzystać z %(brand)s."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Plik"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Błąd",
|
||||
"description_notifications": {
|
||||
"one": "Masz %(count)s nieprzeczytane powiadomienie.",
|
||||
"few": "Masz %(count)s nieprzeczytane powiadomienia.",
|
||||
"many": "Masz %(count)s nieprzeczytanych powiadomień."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Ukryj",
|
||||
"hide_others": "Ukryj inne",
|
||||
@@ -56,9 +69,14 @@
|
||||
"backend_changed": "Wyczyścić dane i przeładować?",
|
||||
"backend_changed_detail": "Nie można uzyskać dostępu do sekretnego magazynu, wygląda na to, że uległ zmianie.",
|
||||
"backend_changed_title": "Nie udało się załadować bazy danych",
|
||||
"backend_no_encryption": "Twój system posiada wspierany keyring, ale szyfrowanie nie jest dostępne.",
|
||||
"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 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_title": "System niewspierany",
|
||||
"unsupported_keyring_use_basic_text": "Użyj słabszego szyfrowania",
|
||||
"unsupported_keyring_use_plaintext": "Nie używaj szyfrowania"
|
||||
}
|
||||
},
|
||||
"view_menu": {
|
||||
|
||||
@@ -32,9 +32,21 @@
|
||||
"speech_start_speaking": "Começar a Falar",
|
||||
"speech_stop_speaking": "Parar de Falar"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Você está usando uma versão não suportada do macOS. Atualize para receber as atualizações d %(brand)s.",
|
||||
"title": "Sistema não suportado",
|
||||
"warning": "Você está usando uma versão não compatível do macOS. Faça a atualização para garantir que o %(brand)s continue funcionando."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Arquivo"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Erro",
|
||||
"description_notifications": {
|
||||
"one": "Você tem %(count)s notificação não lida.",
|
||||
"other": "Você tem %(count)s notificações não lidas."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Esconder",
|
||||
"hide_others": "Esconder Outras(os)",
|
||||
|
||||
@@ -32,9 +32,22 @@
|
||||
"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": {
|
||||
"one": "У вас есть %(count)s непрочитанное уведомление.",
|
||||
"few": "У вас есть %(count)s непрочитанных уведомления.",
|
||||
"many": "У вас есть %(count)s непрочитанных уведомлений."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Скрыть",
|
||||
"hide_others": "Скрыть прочие",
|
||||
@@ -51,6 +64,21 @@
|
||||
"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": "Переключить инструменты разработчика",
|
||||
|
||||
@@ -32,9 +32,22 @@
|
||||
"speech_start_speaking": "Spustiť nahrávanie hlasu",
|
||||
"speech_stop_speaking": "Zastaviť nahrávanie hlasu"
|
||||
},
|
||||
"eol": {
|
||||
"no_more_updates": "Používate nepodporovanú verziu systému macOS. Prosím, aktualizujte systém, aby ste mohli dostávať aktualizácie aplikácie %(brand)s.",
|
||||
"title": "Systém nie je podporovaný",
|
||||
"warning": "Používate nepodporovanú verziu systému macOS. Vykonajte prosím aktualizáciu, aby aplikácia %(brand)s mohla správne fungovať."
|
||||
},
|
||||
"file_menu": {
|
||||
"label": "Súbor"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Chyba",
|
||||
"description_notifications": {
|
||||
"one": "Máte %(count)s neprečítané oznámenie.",
|
||||
"few": "Máte %(count)s neprečítané oznámenia.",
|
||||
"other": "Máte %(count)s neprečítaných oznámení."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Skryť",
|
||||
"hide_others": "Skryť ostatné",
|
||||
|
||||
@@ -35,6 +35,13 @@
|
||||
"file_menu": {
|
||||
"label": "Arkiv"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Fel",
|
||||
"description_notifications": {
|
||||
"one": "Du har %(count)s oläst avisering.",
|
||||
"other": "Du har %(count)s olästa aviseringar."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Göm",
|
||||
"hide_others": "Göm övriga",
|
||||
@@ -56,9 +63,14 @@
|
||||
"backend_changed": "Rensa data och ladda om?",
|
||||
"backend_changed_detail": "Kunde inte komma åt hemligheten från systemnyckelringen, det verkar ha ändrats.",
|
||||
"backend_changed_title": "Misslyckades att ladda databasen",
|
||||
"backend_no_encryption": "Ditt system har en nyckelring som stöds men kryptering är inte tillgänglig.",
|
||||
"backend_no_encryption_detail": "Electron har upptäckt att kryptering inte är tillgänglig på din nyckelring %(backend)s. Se till att du har nyckelringen installerad. Om du har nyckelringen installerad, starta om och försök igen. Alternativt kan du tillåta %(brand)s att använda en svagare form av kryptering.",
|
||||
"backend_no_encryption_title": "Inget krypteringsstöd",
|
||||
"unsupported_keyring": "Ditt system har en nyckelring som inte stöds, vilket innebär att databasen inte kan öppnas.",
|
||||
"unsupported_keyring_detail": "Electrons nyckelringsdetektering hittade inte en backend som stöds. Du kan försöka konfigurera backend manuellt genom att starta %(brand)s med ett kommandoradsargument, en engångsåtgärd. Se %(link)s.",
|
||||
"unsupported_keyring_title": "Systemet stöds inte"
|
||||
"unsupported_keyring_title": "Systemet stöds inte",
|
||||
"unsupported_keyring_use_basic_text": "Använd svagare kryptering",
|
||||
"unsupported_keyring_use_plaintext": "Använd ingen kryptering"
|
||||
}
|
||||
},
|
||||
"view_menu": {
|
||||
|
||||
@@ -35,6 +35,14 @@
|
||||
"file_menu": {
|
||||
"label": "Файл"
|
||||
},
|
||||
"icon_overlay": {
|
||||
"description_error": "Помилка",
|
||||
"description_notifications": {
|
||||
"one": "У вас є %(count)s непрочитане сповіщення.",
|
||||
"few": "У вас є %(count)s непрочитані сповіщення.",
|
||||
"many": "У вас є %(count)s непрочитаних сповіщень."
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"hide": "Сховати",
|
||||
"hide_others": "Сховати інші",
|
||||
|
||||
21
src/ipc.ts
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022-2024 New Vector Ltd.
|
||||
Copyright 2022-2025 New Vector Ltd.
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
@@ -12,18 +12,6 @@ import { randomArray } from "./utils.js";
|
||||
import { getDisplayMediaCallback, setDisplayMediaCallback } from "./displayMediaCallback.js";
|
||||
import Store, { clearDataAndRelaunch } from "./store.js";
|
||||
|
||||
ipcMain.on("setBadgeCount", function (_ev: IpcMainEvent, count: number): void {
|
||||
if (process.platform !== "win32") {
|
||||
// only set badgeCount on Mac/Linux, the docs say that only those platforms support it but turns out Electron
|
||||
// has some Windows support too, and in some Windows environments this leads to two badges rendering atop
|
||||
// each other. See https://github.com/vector-im/element-web/issues/16942
|
||||
app.badgeCount = count;
|
||||
}
|
||||
if (count === 0) {
|
||||
global.mainWindow?.flashFrame(false);
|
||||
}
|
||||
});
|
||||
|
||||
let focusHandlerAttached = false;
|
||||
ipcMain.on("loudNotification", function (): void {
|
||||
if (process.platform === "win32" || process.platform === "linux") {
|
||||
@@ -230,3 +218,10 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
|
||||
});
|
||||
|
||||
ipcMain.handle("getConfig", () => global.vectorConfig);
|
||||
|
||||
const initialisePromiseWithResolvers = Promise.withResolvers<void>();
|
||||
export const initialisePromise = initialisePromiseWithResolvers.promise;
|
||||
|
||||
ipcMain.once("initialise", () => {
|
||||
initialisePromiseWithResolvers.resolve();
|
||||
});
|
||||
|
||||
@@ -52,8 +52,10 @@ export function setupMacosTitleBar(window: BrowserWindow): void {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
/* Exclude the main content elements from being drag handles */
|
||||
.mx_AuthPage .mx_AuthPage_modalContent,
|
||||
.mx_AuthPage .mx_AuthPage_modalBlur,
|
||||
.mx_AuthPage .mx_AuthFooter > * {
|
||||
.mx_AuthPage .mx_AuthFooter > *,
|
||||
.mx_AuthPage .mx_Dropdown_menu {
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
@@ -117,6 +119,12 @@ export function setupMacosTitleBar(window: BrowserWindow): void {
|
||||
height: 20px;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
.mx_LeftPanel_newRoomList::before {
|
||||
/* Aligned with the room header */
|
||||
height: 13px;
|
||||
border-right: 1px solid var(--cpd-color-bg-subtle-primary);
|
||||
}
|
||||
|
||||
.mx_RoomView::before,
|
||||
.mx_SpaceRoomView::before {
|
||||
|
||||
@@ -32,6 +32,7 @@ const CHANNELS = [
|
||||
"userAccessToken",
|
||||
"homeserverUrl",
|
||||
"serverSupportedVersions",
|
||||
"showToast",
|
||||
];
|
||||
|
||||
contextBridge.exposeInMainWorld("electron", {
|
||||
@@ -55,13 +56,18 @@ contextBridge.exposeInMainWorld("electron", {
|
||||
sessionId: string;
|
||||
config: IConfigOptions;
|
||||
supportedSettings: Record<string, boolean>;
|
||||
/**
|
||||
* Do we need to render badge overlays for new notifications?
|
||||
*/
|
||||
supportsBadgeOverlay: boolean;
|
||||
}> {
|
||||
ipcRenderer.emit("initialise");
|
||||
const [{ protocol, sessionId }, config, supportedSettings] = await Promise.all([
|
||||
ipcRenderer.invoke("getProtocol"),
|
||||
ipcRenderer.invoke("getConfig"),
|
||||
ipcRenderer.invoke("getSupportedSettings"),
|
||||
]);
|
||||
return { protocol, sessionId, config, supportedSettings };
|
||||
return { protocol, sessionId, config, supportedSettings, supportsBadgeOverlay: process.platform === "win32" };
|
||||
},
|
||||
|
||||
async setSettingValue(settingName: string, value: any): Promise<void> {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { ipcMain } from "electron";
|
||||
|
||||
import * as tray from "./tray.js";
|
||||
import Store from "./store.js";
|
||||
import { AutoLaunch, type AutoLaunchState } from "./auto-launch.js";
|
||||
|
||||
interface Setting {
|
||||
read(): Promise<any>;
|
||||
@@ -18,15 +19,11 @@ interface Setting {
|
||||
|
||||
const Settings: Record<string, Setting> = {
|
||||
"Electron.autoLaunch": {
|
||||
async read(): Promise<any> {
|
||||
return global.launcher.isEnabled();
|
||||
async read(): Promise<AutoLaunchState> {
|
||||
return AutoLaunch.instance.getState();
|
||||
},
|
||||
async write(value: any): Promise<void> {
|
||||
if (value) {
|
||||
return global.launcher.enable();
|
||||
} else {
|
||||
return global.launcher.disable();
|
||||
}
|
||||
async write(value: AutoLaunchState): Promise<void> {
|
||||
return AutoLaunch.instance.setState(value);
|
||||
},
|
||||
},
|
||||
"Electron.warnBeforeExit": {
|
||||
|
||||
@@ -89,6 +89,8 @@ interface StoreData {
|
||||
safeStorageBackendOverride?: boolean;
|
||||
/** whether to perform a migration of the safeStorage data */
|
||||
safeStorageBackendMigrate?: boolean;
|
||||
/** whether to open the app at login minimised, only valid when app.openAtLogin is true */
|
||||
openAtLoginMinimised: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -232,6 +234,10 @@ class Store extends ElectronStore<StoreData> {
|
||||
safeStorageBackendMigrate: {
|
||||
type: "boolean",
|
||||
},
|
||||
openAtLoginMinimised: {
|
||||
type: "boolean",
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
24
src/tray.ts
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2024 New Vector Ltd.
|
||||
Copyright 2024-2025 New Vector Ltd.
|
||||
Copyright 2017 Karl Glatz <karl@glatz.biz>
|
||||
Copyright 2017 OpenMarket Ltd
|
||||
|
||||
@@ -8,10 +8,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { app, Tray, Menu, nativeImage } from "electron";
|
||||
import { v5 as uuidv5 } from "uuid";
|
||||
import { writeFile } from "node:fs/promises";
|
||||
import pngToIco from "png-to-ico";
|
||||
import path from "node:path";
|
||||
import fs from "node:fs";
|
||||
import { v5 as uuidv5 } from "uuid";
|
||||
|
||||
import { _t } from "./language-helper.js";
|
||||
|
||||
@@ -38,18 +38,13 @@ function toggleWin(): void {
|
||||
}
|
||||
}
|
||||
|
||||
interface IConfig {
|
||||
icon_path: string; // eslint-disable-line camelcase
|
||||
brand: string;
|
||||
}
|
||||
|
||||
function getUuid(): string {
|
||||
// The uuid field is optional and only needed on unsigned Windows packages where the executable path changes
|
||||
// The hardcoded uuid is an arbitrary v4 uuid generated on https://www.uuidgenerator.net/version4
|
||||
return global.vectorConfig["uuid"] || "eba84003-e499-4563-8e9d-166e34b5cc25";
|
||||
}
|
||||
|
||||
export function create(config: IConfig): void {
|
||||
export function create(config: (typeof global)["trayConfig"]): void {
|
||||
// no trays on darwin
|
||||
if (process.platform === "darwin" || trayIcon) return;
|
||||
const defaultIcon = nativeImage.createFromPath(config.icon_path);
|
||||
@@ -71,6 +66,7 @@ export function create(config: IConfig): void {
|
||||
initApplicationMenu();
|
||||
trayIcon.on("click", toggleWin);
|
||||
|
||||
// See also, badge.ts
|
||||
let lastFavicon: string | null = null;
|
||||
global.mainWindow?.webContents.on("page-favicon-updated", async function (ev, favicons) {
|
||||
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith("data:")) {
|
||||
@@ -92,15 +88,17 @@ export function create(config: IConfig): void {
|
||||
if (process.platform === "win32") {
|
||||
try {
|
||||
const icoPath = path.join(app.getPath("temp"), "win32_element_icon.ico");
|
||||
fs.writeFileSync(icoPath, await pngToIco(newFavicon.toPNG()));
|
||||
await writeFile(icoPath, await pngToIco(newFavicon.toPNG()));
|
||||
newFavicon = nativeImage.createFromPath(icoPath);
|
||||
} catch (e) {
|
||||
console.error("Failed to make win32 ico", e);
|
||||
}
|
||||
// Always update the tray icon for Windows.
|
||||
trayIcon?.setImage(newFavicon);
|
||||
} else {
|
||||
trayIcon?.setImage(newFavicon);
|
||||
global.mainWindow?.setIcon(newFavicon);
|
||||
}
|
||||
|
||||
trayIcon?.setImage(newFavicon);
|
||||
global.mainWindow?.setIcon(newFavicon);
|
||||
});
|
||||
|
||||
global.mainWindow?.webContents.on("page-title-updated", function (ev, title) {
|
||||
|
||||
@@ -7,8 +7,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { app, autoUpdater, ipcMain } from "electron";
|
||||
import fs from "node:fs/promises";
|
||||
import os from "node:os";
|
||||
|
||||
import { getSquirrelExecutable } from "./squirrelhooks.js";
|
||||
import { _t } from "./language-helper.js";
|
||||
import { initialisePromise } from "./ipc.js";
|
||||
|
||||
const UPDATE_POLL_INTERVAL_MS = 60 * 60 * 1000;
|
||||
const INITIAL_UPDATE_DELAY_MS = 30 * 1000;
|
||||
@@ -69,7 +72,8 @@ async function pollForUpdates(): Promise<void> {
|
||||
}
|
||||
|
||||
export async function start(updateBaseUrl: string): Promise<void> {
|
||||
if (!(await available(updateBaseUrl))) return;
|
||||
if (!(await available())) return;
|
||||
console.log(`Starting auto update with base URL: ${updateBaseUrl}`);
|
||||
if (!updateBaseUrl.endsWith("/")) {
|
||||
updateBaseUrl = updateBaseUrl + "/";
|
||||
}
|
||||
@@ -111,10 +115,15 @@ export async function start(updateBaseUrl: string): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
async function available(updateBaseUrl?: string): Promise<boolean> {
|
||||
/**
|
||||
* Check if auto update is available on this platform.
|
||||
* Has a side effect of firing showToast on EOL platforms so must only be called once!
|
||||
* @returns True if auto update is available
|
||||
*/
|
||||
async function available(): Promise<boolean> {
|
||||
if (process.platform === "linux") {
|
||||
// Auto update is not supported on Linux
|
||||
console.log("Auto update not supported on this platform");
|
||||
console.warn("Auto update not supported on this platform");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,13 +131,42 @@ async function available(updateBaseUrl?: string): Promise<boolean> {
|
||||
try {
|
||||
await fs.access(getSquirrelExecutable());
|
||||
} catch {
|
||||
console.log("Squirrel not found, auto update not supported");
|
||||
console.warn("Squirrel not found, auto update not supported");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise we're either on macOS or Windows with Squirrel
|
||||
return !!updateBaseUrl;
|
||||
if (process.platform === "darwin") {
|
||||
// OS release returns the Darwin kernel version, not the macOS version, see
|
||||
// https://en.wikipedia.org/wiki/Darwin_(operating_system)#Release_history to interpret it
|
||||
const release = os.release();
|
||||
const major = parseInt(release.split(".")[0], 10);
|
||||
|
||||
if (major < 21) {
|
||||
// If the macOS version is too old for modern Electron support then disable auto update to prevent the app updating and bricking itself.
|
||||
// The oldest macOS version supported by Chromium/Electron 38 is Monterey (12.x) which started with Darwin 21.0
|
||||
initialisePromise.then(() => {
|
||||
ipcMain.emit("showToast", {
|
||||
title: _t("eol|title"),
|
||||
description: _t("eol|no_more_updates", { brand: global.trayConfig.brand }),
|
||||
});
|
||||
});
|
||||
console.warn("Auto update not supported, macOS version too old");
|
||||
return false;
|
||||
} else if (major < 22) {
|
||||
// If the macOS version is EOL then show a warning message.
|
||||
// The oldest macOS version still supported by Apple is Ventura (13.x) which started with Darwin 22.0
|
||||
initialisePromise.then(() => {
|
||||
ipcMain.emit("showToast", {
|
||||
title: _t("eol|title"),
|
||||
description: _t("eol|warning", { brand: global.trayConfig.brand }),
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ipcMain.on("install_update", installUpdate);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"rootDir": "./src",
|
||||
"declaration": true,
|
||||
"typeRoots": ["src/@types", "node_modules/@types"],
|
||||
"lib": ["es2022"],
|
||||
"lib": ["es2022", "es2024.promise"],
|
||||
"types": ["node"],
|
||||
"strict": true
|
||||
},
|
||||
|
||||