mirror of
https://github.com/element-hq/element-desktop.git
synced 2025-12-28 18:17:47 -05:00
Compare commits
57 Commits
t3chguy/no
...
dbkr/elect
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d577487cfe | ||
|
|
53ab0e2843 | ||
|
|
d95838cb9a | ||
|
|
12bc319033 | ||
|
|
791a7e71fd | ||
|
|
d45b3aac65 | ||
|
|
1e6a3ceebd | ||
|
|
79b0b3077a | ||
|
|
474dcb6825 | ||
|
|
6ba168f8cf | ||
|
|
727ede4436 | ||
|
|
6859c86773 | ||
|
|
79ec793099 | ||
|
|
ea23302079 | ||
|
|
23b83bac26 | ||
|
|
70814b7f96 | ||
|
|
db4e3d2fec | ||
|
|
5380c533cf | ||
|
|
0c93040b41 | ||
|
|
4bb9bc8441 | ||
|
|
8473f3eec8 | ||
|
|
a104be4fa1 | ||
|
|
c06349d814 | ||
|
|
25d3ca5a4a | ||
|
|
6f263e1db6 | ||
|
|
1a5176bc73 | ||
|
|
7a8e5b6f00 | ||
|
|
c9b0a0866b | ||
|
|
537904f51b | ||
|
|
2032f64766 | ||
|
|
43484b21f4 | ||
|
|
184bfb8f1a | ||
|
|
b4ea922b4b | ||
|
|
b6659ad8e8 | ||
|
|
843056f53d | ||
|
|
a7c3aea8fd | ||
|
|
31c7b7c927 | ||
|
|
8e6bf8335c | ||
|
|
57cfcd98c5 | ||
|
|
dc68d31f82 | ||
|
|
d6c73c42a6 | ||
|
|
b0a05c8e66 | ||
|
|
4a8d4ce97a | ||
|
|
8f06c3c32f | ||
|
|
9eae33bf93 | ||
|
|
e35a15f348 | ||
|
|
cfbe7f0c66 | ||
|
|
c7cdf19645 | ||
|
|
d31622d98c | ||
|
|
0f52d2057e | ||
|
|
74f0e49073 | ||
|
|
8a1f461dc0 | ||
|
|
a29c20ee1c | ||
|
|
3862d29e39 | ||
|
|
ac088dd394 | ||
|
|
dc5fc7a2c1 | ||
|
|
d0e1596bf2 |
@@ -30,8 +30,9 @@ module.exports = {
|
||||
"prefer-promise-reject-errors": "off",
|
||||
"quotes": "off",
|
||||
|
||||
// We disable this while we're transitioning
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
// We're okay with assertion errors when we ask for them
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
},
|
||||
}],
|
||||
};
|
||||
|
||||
208
.github/workflows/build.yaml
vendored
208
.github/workflows/build.yaml
vendored
@@ -8,211 +8,35 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
fetch:
|
||||
name: Prepare
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Fetch Element Web (develop)
|
||||
if: github.event.pull_request.base.ref == 'develop'
|
||||
run: yarn run fetch --noverify develop -d element.io/nightly
|
||||
|
||||
- name: Fetch Element Web
|
||||
if: github.event.pull_request.base.ref != 'develop'
|
||||
run: yarn run fetch --noverify --cfgdir element.io/release
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
retention-days: 1
|
||||
path: |
|
||||
webapp.asar
|
||||
package.json
|
||||
uses: ./.github/workflows/build_prepare.yaml
|
||||
with:
|
||||
config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }}
|
||||
version: ${{ github.event.pull_request.base.ref == 'develop' && 'develop' || '' }}
|
||||
|
||||
windows:
|
||||
needs: fetch
|
||||
name: Windows
|
||||
uses: ./.github/workflows/build_windows.yaml
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-pc-windows-msvc
|
||||
arch: x64
|
||||
- target: i686-pc-windows-msvc
|
||||
arch: x86
|
||||
build-args: --ia32
|
||||
name: Windows (${{ matrix.arch }})
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
|
||||
- name: Cache .hak
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- name: Set up build tools
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
# ActiveTCL package on choco is from 2015,
|
||||
# this one is newer but includes more than we need
|
||||
- name: Choco install tclsh
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install -y magicsplat-tcl-tk --no-progress
|
||||
echo "${HOME}/AppData/Local/Apps/Tcl86/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
- name: Choco install NetWide Assembler
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install -y nasm --no-progress
|
||||
echo "C:/Program Files/NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ matrix.target }}
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
# Does not need branch matching as only analyses this layer
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Build Natives
|
||||
run: |
|
||||
refreshenv
|
||||
yarn build:native --target ${{ matrix.target }}
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build --publish never -w ${{ matrix.build-args }}"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: win-${{ matrix.arch }}
|
||||
path: dist
|
||||
retention-days: 1
|
||||
arch: [ x64, x86 ]
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
linux:
|
||||
needs: fetch
|
||||
name: Linux
|
||||
uses: ./.github/workflows/build_linux.yaml
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- sqlcipher: system
|
||||
- sqlcipher: static
|
||||
static: 1
|
||||
name: 'Linux (sqlcipher: ${{ matrix.sqlcipher }})'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
|
||||
- name: Cache .hak
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('./yarn.lock') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install libsqlcipher-dev
|
||||
if: matrix.sqlcipher == 'system'
|
||||
run: sudo apt-get install -y libsqlcipher-dev
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
# Does not need branch matching as only analyses this layer
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Build Natives
|
||||
run: "yarn build:native"
|
||||
env:
|
||||
SQLCIPHER_STATIC: ${{ matrix.static }}
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build --publish never"
|
||||
|
||||
- name: Install .deb
|
||||
run: "sudo apt install ./dist/*.deb"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-sqlcipher-${{ matrix.sqlcipher }}
|
||||
path: dist
|
||||
retention-days: 1
|
||||
sqlcipher: [ system, static ]
|
||||
with:
|
||||
sqlcipher: ${{ matrix.sqlcipher }}
|
||||
|
||||
macos:
|
||||
needs: fetch
|
||||
name: macOS (universal)
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
|
||||
- name: Cache .hak
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('./yarn.lock') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: aarch64-apple-darwin
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
# Does not need branch matching as only analyses this layer
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Build Natives
|
||||
run: "yarn build:native:universal"
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build:universal --publish never"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos
|
||||
path: dist
|
||||
retention-days: 1
|
||||
name: macOS
|
||||
uses: ./.github/workflows/build_macos.yaml
|
||||
|
||||
test:
|
||||
needs:
|
||||
|
||||
58
.github/workflows/build_linux.yaml
vendored
Normal file
58
.github/workflows/build_linux.yaml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
sqlcipher:
|
||||
type: string
|
||||
required: true
|
||||
description: "How to link sqlcipher, one of 'system' | 'static'"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
|
||||
- name: Cache .hak
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('./yarn.lock') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install libsqlcipher-dev
|
||||
if: inputs.sqlcipher == 'system'
|
||||
run: sudo apt-get install -y libsqlcipher-dev
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
# Does not need branch matching as only analyses this layer
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Build Natives
|
||||
run: "yarn build:native"
|
||||
env:
|
||||
SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build --publish never -l"
|
||||
|
||||
- name: Install .deb
|
||||
run: "sudo apt install ./dist/*.deb"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-sqlcipher-${{ inputs.sqlcipher }}
|
||||
path: dist
|
||||
retention-days: 1
|
||||
45
.github/workflows/build_macos.yaml
vendored
Normal file
45
.github/workflows/build_macos.yaml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
|
||||
- name: Cache .hak
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ hashFiles('./yarn.lock') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: aarch64-apple-darwin
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
# Does not need branch matching as only analyses this layer
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Build Natives
|
||||
run: "yarn build:native:universal"
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build:universal --publish never"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos
|
||||
path: dist
|
||||
retention-days: 1
|
||||
35
.github/workflows/build_prepare.yaml
vendored
Normal file
35
.github/workflows/build_prepare.yaml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
config:
|
||||
type: string
|
||||
required: true
|
||||
description: "The config directory to use"
|
||||
version:
|
||||
type: string
|
||||
required: false
|
||||
description: "The version tag to fetch, or 'develop', will pick automatically if not passed"
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Fetch Element Web
|
||||
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
retention-days: 1
|
||||
path: |
|
||||
webapp.asar
|
||||
package.json
|
||||
87
.github/workflows/build_windows.yaml
vendored
Normal file
87
.github/workflows/build_windows.yaml
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
arch:
|
||||
type: string
|
||||
required: true
|
||||
description: "The architecture to build for, one of 'x64' | 'x86'"
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: kanga333/variable-mapper@master
|
||||
id: config
|
||||
with:
|
||||
key: "${{ inputs.arch }}"
|
||||
export_to: output
|
||||
map: |
|
||||
{
|
||||
"x64": {
|
||||
"target": "x86_64-pc-windows-msvc"
|
||||
},
|
||||
"x86": {
|
||||
"target": "i686-pc-windows-msvc",
|
||||
"build-args": "--ia32"
|
||||
}
|
||||
}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: webapp
|
||||
|
||||
- name: Cache .hak
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }}
|
||||
path: |
|
||||
./.hak
|
||||
|
||||
- name: Set up build tools
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ inputs.arch }}
|
||||
|
||||
# ActiveTCL package on choco is from 2015,
|
||||
# this one is newer but includes more than we need
|
||||
- name: Choco install tclsh
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install -y magicsplat-tcl-tk --no-progress
|
||||
echo "${HOME}/AppData/Local/Apps/Tcl86/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
- name: Choco install NetWide Assembler
|
||||
shell: pwsh
|
||||
run: |
|
||||
choco install -y nasm --no-progress
|
||||
echo "C:/Program Files/NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: ${{ steps.config.outputs.target }}
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
# Does not need branch matching as only analyses this layer
|
||||
- name: Install Deps
|
||||
run: "yarn install --pure-lockfile"
|
||||
|
||||
- name: Build Natives
|
||||
run: |
|
||||
refreshenv
|
||||
yarn build:native --target ${{ steps.config.outputs.target }}
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build --publish never -w ${{ steps.config.outputs.build-args }}"
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: win-${{ inputs.arch }}
|
||||
path: dist
|
||||
retention-days: 1
|
||||
108
CHANGELOG.md
108
CHANGELOG.md
@@ -1,3 +1,111 @@
|
||||
Changes in [1.11.14](https://github.com/vector-im/element-desktop/releases/tag/v1.11.14) (2022-11-08)
|
||||
=====================================================================================================
|
||||
|
||||
## ✨ Features
|
||||
* Switch to notarytool ([\#440](https://github.com/vector-im/element-desktop/pull/440)).
|
||||
* Loading threads with server-side assistance ([\#9356](https://github.com/matrix-org/matrix-react-sdk/pull/9356)). Fixes vector-im/element-web#21807, vector-im/element-web#21799, vector-im/element-web#21911, vector-im/element-web#22141, vector-im/element-web#22157, vector-im/element-web#22641, vector-im/element-web#22501 vector-im/element-web#22438 and vector-im/element-web#21678. Contributed by @justjanne.
|
||||
* Make thread replies trigger a room list re-ordering ([\#9510](https://github.com/matrix-org/matrix-react-sdk/pull/9510)). Fixes vector-im/element-web#21700.
|
||||
* Device manager - add extra details to device security and renaming ([\#9501](https://github.com/matrix-org/matrix-react-sdk/pull/9501)). Contributed by @kerryarchibald.
|
||||
* Add plain text mode to the wysiwyg composer ([\#9503](https://github.com/matrix-org/matrix-react-sdk/pull/9503)). Contributed by @florianduros.
|
||||
* Sliding Sync: improve sort order, show subspace rooms, better tombstoned room handling ([\#9484](https://github.com/matrix-org/matrix-react-sdk/pull/9484)).
|
||||
* Device manager - add learn more popups to filtered sessions section ([\#9497](https://github.com/matrix-org/matrix-react-sdk/pull/9497)). Contributed by @kerryarchibald.
|
||||
* Show thread notification if thread timeline is closed ([\#9495](https://github.com/matrix-org/matrix-react-sdk/pull/9495)). Fixes vector-im/element-web#23589.
|
||||
* Add message editing to wysiwyg composer ([\#9488](https://github.com/matrix-org/matrix-react-sdk/pull/9488)). Contributed by @florianduros.
|
||||
* Device manager - confirm sign out of other sessions ([\#9487](https://github.com/matrix-org/matrix-react-sdk/pull/9487)). Contributed by @kerryarchibald.
|
||||
* Automatically request logs from other users in a call when submitting logs ([\#9492](https://github.com/matrix-org/matrix-react-sdk/pull/9492)).
|
||||
* Add thread notification with server assistance (MSC3773) ([\#9400](https://github.com/matrix-org/matrix-react-sdk/pull/9400)). Fixes vector-im/element-web#21114, vector-im/element-web#21413, vector-im/element-web#21416, vector-im/element-web#21433, vector-im/element-web#21481, vector-im/element-web#21798, vector-im/element-web#21823 vector-im/element-web#23192 and vector-im/element-web#21765.
|
||||
* Support for login + E2EE set up with QR ([\#9403](https://github.com/matrix-org/matrix-react-sdk/pull/9403)). Contributed by @hughns.
|
||||
* Allow pressing Enter to send messages in new composer ([\#9451](https://github.com/matrix-org/matrix-react-sdk/pull/9451)). Contributed by @andybalaam.
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix regressions around media uploads failing and causing soft crashes ([\#9549](https://github.com/matrix-org/matrix-react-sdk/pull/9549)). Fixes matrix-org/element-web-rageshakes#16831, matrix-org/element-web-rageshakes#16824 matrix-org/element-web-rageshakes#16810 and vector-im/element-web#23641.
|
||||
* Fix /myroomavatar slash command ([\#9536](https://github.com/matrix-org/matrix-react-sdk/pull/9536)). Fixes matrix-org/synapse#14321.
|
||||
* Fix i18n interpolation ([\#432](https://github.com/vector-im/element-desktop/pull/432)). Fixes vector-im/element-web#23568.
|
||||
* Fix config.json failing to load for Jitsi wrapper in non-root deployment ([\#23577](https://github.com/vector-im/element-web/pull/23577)).
|
||||
* Fix NotificationBadge unsent color ([\#9522](https://github.com/matrix-org/matrix-react-sdk/pull/9522)). Fixes vector-im/element-web#23646.
|
||||
* Fix room list sorted by recent on app startup ([\#9515](https://github.com/matrix-org/matrix-react-sdk/pull/9515)). Fixes vector-im/element-web#23635.
|
||||
* Reset custom power selector when blurred on empty ([\#9508](https://github.com/matrix-org/matrix-react-sdk/pull/9508)). Fixes vector-im/element-web#23481.
|
||||
* Reinstate timeline/redaction callbacks when updating notification state ([\#9494](https://github.com/matrix-org/matrix-react-sdk/pull/9494)). Fixes vector-im/element-web#23554.
|
||||
* Only render NotificationBadge when needed ([\#9493](https://github.com/matrix-org/matrix-react-sdk/pull/9493)). Fixes vector-im/element-web#23584.
|
||||
* Fix embedded Element Call screen sharing ([\#9485](https://github.com/matrix-org/matrix-react-sdk/pull/9485)). Fixes vector-im/element-web#23571.
|
||||
* Send Content-Type: application/json header for integration manager /register API ([\#9490](https://github.com/matrix-org/matrix-react-sdk/pull/9490)). Fixes vector-im/element-web#23580.
|
||||
* Fix joining calls without audio or video inputs ([\#9486](https://github.com/matrix-org/matrix-react-sdk/pull/9486)). Fixes vector-im/element-web#23511.
|
||||
* Ensure spaces in the spotlight dialog have rounded square avatars ([\#9480](https://github.com/matrix-org/matrix-react-sdk/pull/9480)). Fixes vector-im/element-web#23515.
|
||||
* Only show mini avatar uploader in room intro when no avatar yet exists ([\#9479](https://github.com/matrix-org/matrix-react-sdk/pull/9479)). Fixes vector-im/element-web#23552.
|
||||
* Fix threads fallback incorrectly targets root event ([\#9229](https://github.com/matrix-org/matrix-react-sdk/pull/9229)). Fixes vector-im/element-web#23147.
|
||||
* Align video call icon with banner text ([\#9460](https://github.com/matrix-org/matrix-react-sdk/pull/9460)).
|
||||
* Set relations helper when creating event tile context menu ([\#9253](https://github.com/matrix-org/matrix-react-sdk/pull/9253)). Fixes vector-im/element-web#22018.
|
||||
* Device manager - put client/browser device metadata in correct section ([\#9447](https://github.com/matrix-org/matrix-react-sdk/pull/9447)). Contributed by @kerryarchibald.
|
||||
* Update the room unread notification counter when the server changes the value without any related read receipt ([\#9438](https://github.com/matrix-org/matrix-react-sdk/pull/9438)).
|
||||
|
||||
Changes in [1.11.13](https://github.com/vector-im/element-desktop/releases/tag/v1.11.13) (2022-11-01)
|
||||
=====================================================================================================
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix default behavior of Room.getBlacklistUnverifiedDevices ([\#2830](https://github.com/matrix-org/matrix-js-sdk/pull/2830)). Contributed by @duxovni.
|
||||
* Catch server versions API call exception when starting the client ([\#2828](https://github.com/matrix-org/matrix-js-sdk/pull/2828)). Fixes vector-im/element-web#23634.
|
||||
* Fix authedRequest including `Authorization: Bearer undefined` for password resets ([\#2822](https://github.com/matrix-org/matrix-js-sdk/pull/2822)). Fixes vector-im/element-web#23655.
|
||||
|
||||
Changes in [1.11.12](https://github.com/vector-im/element-desktop/releases/tag/v1.11.12) (2022-10-26)
|
||||
=====================================================================================================
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Fix config.json failing to load for Jitsi wrapper in non-root deployment ([\#23577](https://github.com/vector-im/element-web/pull/23577)).
|
||||
|
||||
Changes in [1.11.11](https://github.com/vector-im/element-desktop/releases/tag/v1.11.11) (2022-10-25)
|
||||
=====================================================================================================
|
||||
|
||||
## ✨ Features
|
||||
* Device manager - tweak string formatting of default device name ([\#23457](https://github.com/vector-im/element-web/pull/23457)).
|
||||
* Add Element Call participant limit ([\#23431](https://github.com/vector-im/element-web/pull/23431)).
|
||||
* Add Element Call `brand` ([\#23443](https://github.com/vector-im/element-web/pull/23443)).
|
||||
* Include a file-safe room name and ISO date in chat exports ([\#9440](https://github.com/matrix-org/matrix-react-sdk/pull/9440)). Fixes vector-im/element-web#21812 and vector-im/element-web#19724.
|
||||
* Room call banner ([\#9378](https://github.com/matrix-org/matrix-react-sdk/pull/9378)). Fixes vector-im/element-web#23453. Contributed by @toger5.
|
||||
* Device manager - spinners while devices are signing out ([\#9433](https://github.com/matrix-org/matrix-react-sdk/pull/9433)). Fixes vector-im/element-web#15865.
|
||||
* Device manager - silence call ringers when local notifications are silenced ([\#9420](https://github.com/matrix-org/matrix-react-sdk/pull/9420)).
|
||||
* Pass the current language to Element Call ([\#9427](https://github.com/matrix-org/matrix-react-sdk/pull/9427)).
|
||||
* Hide screen-sharing button in Element Call on desktop ([\#9423](https://github.com/matrix-org/matrix-react-sdk/pull/9423)).
|
||||
* Add reply support to WysiwygComposer ([\#9422](https://github.com/matrix-org/matrix-react-sdk/pull/9422)). Contributed by @florianduros.
|
||||
* Disconnect other connected devices (of the same user) when joining an Element call ([\#9379](https://github.com/matrix-org/matrix-react-sdk/pull/9379)).
|
||||
* Device manager - device tile main click target ([\#9409](https://github.com/matrix-org/matrix-react-sdk/pull/9409)).
|
||||
* Add formatting buttons to the rich text editor ([\#9410](https://github.com/matrix-org/matrix-react-sdk/pull/9410)). Contributed by @florianduros.
|
||||
* Device manager - current session context menu ([\#9386](https://github.com/matrix-org/matrix-react-sdk/pull/9386)).
|
||||
* Remove piwik config fallback for privacy policy URL ([\#9390](https://github.com/matrix-org/matrix-react-sdk/pull/9390)).
|
||||
* Add the first step to integrate the matrix wysiwyg composer ([\#9374](https://github.com/matrix-org/matrix-react-sdk/pull/9374)). Contributed by @florianduros.
|
||||
* Device manager - UA parsing tweaks ([\#9382](https://github.com/matrix-org/matrix-react-sdk/pull/9382)).
|
||||
* Device manager - remove client information events when disabling setting ([\#9384](https://github.com/matrix-org/matrix-react-sdk/pull/9384)).
|
||||
* Add Element Call participant limit ([\#9358](https://github.com/matrix-org/matrix-react-sdk/pull/9358)).
|
||||
* Add Element Call room settings ([\#9347](https://github.com/matrix-org/matrix-react-sdk/pull/9347)).
|
||||
* Device manager - render extended device information ([\#9360](https://github.com/matrix-org/matrix-react-sdk/pull/9360)).
|
||||
* New group call experience: Room header and PiP designs ([\#9351](https://github.com/matrix-org/matrix-react-sdk/pull/9351)).
|
||||
* Pass language to Jitsi Widget ([\#9346](https://github.com/matrix-org/matrix-react-sdk/pull/9346)). Contributed by @Fox32.
|
||||
* Add notifications and toasts for Element Call calls ([\#9337](https://github.com/matrix-org/matrix-react-sdk/pull/9337)).
|
||||
* Device manager - device type icon ([\#9355](https://github.com/matrix-org/matrix-react-sdk/pull/9355)).
|
||||
* Delete the remainder of groups ([\#9357](https://github.com/matrix-org/matrix-react-sdk/pull/9357)). Fixes vector-im/element-web#22770.
|
||||
* Device manager - display client information in device details ([\#9315](https://github.com/matrix-org/matrix-react-sdk/pull/9315)).
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
* Send Content-Type: application/json header for integration manager /register API ([\#9490](https://github.com/matrix-org/matrix-react-sdk/pull/9490)). Fixes vector-im/element-web#23580.
|
||||
* Make ErrorView & CompatibilityView scrollable ([\#23468](https://github.com/vector-im/element-web/pull/23468)). Fixes vector-im/element-web#23376.
|
||||
* Device manager - put client/browser device metadata in correct section ([\#9447](https://github.com/matrix-org/matrix-react-sdk/pull/9447)).
|
||||
* update the room unread notification counter when the server changes the value without any related read receipt ([\#9438](https://github.com/matrix-org/matrix-react-sdk/pull/9438)).
|
||||
* Don't show call banners in video rooms ([\#9441](https://github.com/matrix-org/matrix-react-sdk/pull/9441)).
|
||||
* Prevent useContextMenu isOpen from being true if the button ref goes away ([\#9418](https://github.com/matrix-org/matrix-react-sdk/pull/9418)). Fixes matrix-org/element-web-rageshakes#15637.
|
||||
* Automatically focus the WYSIWYG composer when you enter a room ([\#9412](https://github.com/matrix-org/matrix-react-sdk/pull/9412)).
|
||||
* Improve the tooltips on the call lobby join button ([\#9428](https://github.com/matrix-org/matrix-react-sdk/pull/9428)).
|
||||
* Pass the homeserver's base URL to Element Call ([\#9429](https://github.com/matrix-org/matrix-react-sdk/pull/9429)). Fixes vector-im/element-web#23301.
|
||||
* Better accommodate long room names in call toasts ([\#9426](https://github.com/matrix-org/matrix-react-sdk/pull/9426)).
|
||||
* Hide virtual widgets from the room info panel ([\#9424](https://github.com/matrix-org/matrix-react-sdk/pull/9424)). Fixes vector-im/element-web#23494.
|
||||
* Inhibit clicking on sender avatar in threads list ([\#9417](https://github.com/matrix-org/matrix-react-sdk/pull/9417)). Fixes vector-im/element-web#23482.
|
||||
* Correct the dir parameter of MSC3715 ([\#9391](https://github.com/matrix-org/matrix-react-sdk/pull/9391)). Contributed by @dhenneke.
|
||||
* Use a more correct subset of users in `/remakeolm` developer command ([\#9402](https://github.com/matrix-org/matrix-react-sdk/pull/9402)).
|
||||
* use correct default for notification silencing ([\#9388](https://github.com/matrix-org/matrix-react-sdk/pull/9388)). Fixes vector-im/element-web#23456.
|
||||
* Device manager - eagerly create `m.local_notification_settings` events ([\#9353](https://github.com/matrix-org/matrix-react-sdk/pull/9353)).
|
||||
* Close incoming Element call toast when viewing the call lobby ([\#9375](https://github.com/matrix-org/matrix-react-sdk/pull/9375)).
|
||||
* Always allow enabling sending read receipts ([\#9367](https://github.com/matrix-org/matrix-react-sdk/pull/9367)). Fixes vector-im/element-web#23433.
|
||||
* Fixes (vector-im/element-web/issues/22609) where the white theme is not applied when `white -> dark -> white` sequence is done. ([\#9320](https://github.com/matrix-org/matrix-react-sdk/pull/9320)). Contributed by @florianduros.
|
||||
* Fix applying programmatically set height for "top" room layout ([\#9339](https://github.com/matrix-org/matrix-react-sdk/pull/9339)). Contributed by @Fox32.
|
||||
|
||||
Changes in [1.11.10](https://github.com/vector-im/element-desktop/releases/tag/v1.11.10) (2022-10-11)
|
||||
=====================================================================================================
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ ENV LC_ALL C.UTF-8
|
||||
|
||||
ENV DEBUG_COLORS true
|
||||
ENV FORCE_COLOR true
|
||||
ENV NODE_VERSION 14.17.0
|
||||
ENV NODE_VERSION 16.18.1
|
||||
|
||||
# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
|
||||
RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \
|
||||
|
||||
@@ -3,7 +3,7 @@ License: Apache-2.0
|
||||
Vendor: support@element.io
|
||||
Architecture: amd64
|
||||
Maintainer: support@element.io
|
||||
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0
|
||||
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0, libasound2, libgbm1
|
||||
Recommends: libappindicator3-1, libsqlcipher0
|
||||
Section: net
|
||||
Priority: extra
|
||||
|
||||
@@ -3,7 +3,7 @@ License: Apache-2.0
|
||||
Vendor: support@element.io
|
||||
Architecture: amd64
|
||||
Maintainer: support@element.io
|
||||
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0
|
||||
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0, libasound2, libgbm1
|
||||
Recommends: libappindicator3-1, libsqlcipher0
|
||||
Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
|
||||
Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
|
||||
|
||||
30
package.json
30
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "element-desktop",
|
||||
"productName": "Element",
|
||||
"main": "lib/electron-main.js",
|
||||
"version": "1.11.10",
|
||||
"version": "1.11.14",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "Element",
|
||||
"repository": {
|
||||
@@ -53,6 +53,7 @@
|
||||
"@babel/core": "^7.18.10",
|
||||
"@babel/preset-env": "^7.18.10",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@electron/notarize": "^1.2.3",
|
||||
"@types/auto-launch": "^5.0.1",
|
||||
"@types/counterpart": "^0.18.1",
|
||||
"@types/detect-libc": "^1.0.0",
|
||||
@@ -61,23 +62,23 @@
|
||||
"@types/mkdirp": "^1.0.2",
|
||||
"@types/pacote": "^11.1.1",
|
||||
"@types/rimraf": "^3.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
||||
"@typescript-eslint/parser": "^5.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.42.0",
|
||||
"@typescript-eslint/parser": "^5.42.0",
|
||||
"allchange": "^1.0.6",
|
||||
"app-builder-lib": "^22.14.10",
|
||||
"asar": "^2.0.1",
|
||||
"babel-jest": "^28.1.3",
|
||||
"chokidar": "^3.5.2",
|
||||
"detect-libc": "^1.0.3",
|
||||
"electron": "^20",
|
||||
"electron-builder": "22.11.4",
|
||||
"electron-builder-squirrel-windows": "22.11.4",
|
||||
"electron": "^21",
|
||||
"electron-builder": "^23.6.0",
|
||||
"electron-builder-squirrel-windows": "^23.6.0",
|
||||
"electron-devtools-installer": "^3.1.1",
|
||||
"electron-notarize": "^1.0.0",
|
||||
"eslint": "7.18.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-matrix-org": "^0.4.0",
|
||||
"eslint-plugin-matrix-org": "^0.7.0",
|
||||
"eslint-plugin-unicorn": "^44.0.2",
|
||||
"expect-playwright": "^0.8.0",
|
||||
"find-npm-prefix": "^1.0.2",
|
||||
"fs-extra": "^8.1.0",
|
||||
@@ -121,7 +122,10 @@
|
||||
"webapp.asar"
|
||||
],
|
||||
"linux": {
|
||||
"target": "deb",
|
||||
"target": [
|
||||
"tar.gz",
|
||||
"deb"
|
||||
],
|
||||
"category": "Network;InstantMessaging;Chat",
|
||||
"maintainer": "support@element.io",
|
||||
"desktop": {
|
||||
@@ -134,14 +138,10 @@
|
||||
},
|
||||
"win": {
|
||||
"target": [
|
||||
"squirrel",
|
||||
"msi"
|
||||
"squirrel"
|
||||
],
|
||||
"sign": "scripts/electron_winSign"
|
||||
},
|
||||
"msi": {
|
||||
"perMachine": true
|
||||
},
|
||||
"directories": {
|
||||
"output": "dist"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { notarize } = require('electron-notarize');
|
||||
const { notarize } = require('@electron/notarize');
|
||||
|
||||
let warned = false;
|
||||
exports.default = async function(context) {
|
||||
@@ -7,16 +7,14 @@ exports.default = async function(context) {
|
||||
|
||||
if (electronPlatformName === 'darwin') {
|
||||
const appName = context.packager.appInfo.productFilename;
|
||||
// We get the password from keychain. The keychain stores
|
||||
// user IDs too, but apparently altool can't get the user ID
|
||||
// from the keychain, so we need to get it from the environment.
|
||||
const userId = process.env.NOTARIZE_APPLE_ID;
|
||||
if (userId === undefined) {
|
||||
|
||||
const keychainProfile = process.env.NOTARIZE_KEYCHAIN_PROFILE;
|
||||
if (keychainProfile === undefined) {
|
||||
if (!warned) {
|
||||
console.log("*************************************");
|
||||
console.log("* NOTARIZE_APPLE_ID is not set. *");
|
||||
console.log("* This build will NOT be notarised. *");
|
||||
console.log("*************************************");
|
||||
console.log("*****************************************");
|
||||
console.log("* NOTARIZE_KEYCHAIN_PROFILE is not set. *");
|
||||
console.log("* This build will NOT be notarised. *");
|
||||
console.log("*****************************************");
|
||||
warned = true;
|
||||
}
|
||||
return;
|
||||
@@ -24,10 +22,11 @@ exports.default = async function(context) {
|
||||
|
||||
console.log("Notarising macOS app. This may be some time.");
|
||||
return await notarize({
|
||||
tool: "notarytool",
|
||||
appBundleId: appId,
|
||||
appPath: `${appOutDir}/${appName}.app`,
|
||||
appleId: userId,
|
||||
appleIdPassword: '@keychain:NOTARIZE_CREDS',
|
||||
keychainProfile,
|
||||
keychain: process.env.NOTARIZE_KEYCHAIN,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ const { setPackageVersion } = require('./set-version.js');
|
||||
|
||||
const PUB_KEY_URL = "https://packages.riot.im/element-release-key.asc";
|
||||
const PACKAGE_URL_PREFIX = "https://github.com/vector-im/element-web/releases/download/";
|
||||
const DEVELOP_TGZ_URL = "https://vector-im.github.io/element-web/develop.tar.gz";
|
||||
const DEVELOP_TGZ_URL = "https://develop.element.io/develop.tar.gz";
|
||||
const ASAR_PATH = 'webapp.asar';
|
||||
|
||||
async function downloadToFile(url, filename) {
|
||||
|
||||
@@ -247,7 +247,9 @@ const warnBeforeExit = (event: Event, input: Input): void => {
|
||||
if (shouldWarnBeforeExit && exitShortcutPressed) {
|
||||
const shouldCancelCloseRequest = dialog.showMessageBoxSync(global.mainWindow, {
|
||||
type: "question",
|
||||
buttons: [_t("Cancel"), _t("Close Element")],
|
||||
buttons: [_t("Cancel"), _t("Close %(brand)s", {
|
||||
brand: global.vectorConfig.brand || 'Element',
|
||||
})],
|
||||
message: _t("Are you sure you want to quit?"),
|
||||
defaultId: 1,
|
||||
cancelId: 0,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"Delete": "احذف",
|
||||
"Copy": "انسخ",
|
||||
"Edit": "تحرير",
|
||||
"Close Element": "أغلِق Element",
|
||||
"Cancel": "ألغِ",
|
||||
"Bring All to Front": "ضَع الكل في المقدّمة",
|
||||
"Speech": "نطق",
|
||||
|
||||
@@ -41,6 +41,5 @@
|
||||
"Quit": "Выйсці",
|
||||
"Show/Hide": "Паказаць / схаваць",
|
||||
"Are you sure you want to quit?": "Вы ўпэўненыя, што хочаце выйсці?",
|
||||
"Close Element": "Зачыніць Element",
|
||||
"Cancel": "Адмена"
|
||||
}
|
||||
|
||||
@@ -42,6 +42,5 @@
|
||||
"Quit": "Напусни",
|
||||
"Show/Hide": "Покажи/Скрий",
|
||||
"Are you sure you want to quit?": "Сигурен ли си че искаш да напуснеш?",
|
||||
"Close Element": "Затвори Елемент",
|
||||
"Cancel": "Отказ"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"Are you sure you want to quit?": "তুমি কি আসলেই বের হতে চাও?",
|
||||
"Close Element": "এলিমেন্ট বন্ধ করো",
|
||||
"Cancel": "বাতিল",
|
||||
"Save image as...": "ছবি সংরক্ষণের ধরন...",
|
||||
"Failed to save image": "ছবি সংরক্ষণ ব্যর্থ",
|
||||
|
||||
@@ -41,6 +41,5 @@
|
||||
"Quit": "Surt",
|
||||
"Show/Hide": "Mostra/Amaga",
|
||||
"Are you sure you want to quit?": "Esteu segur que voleu sortir?",
|
||||
"Close Element": "Tanca l'Element",
|
||||
"Cancel": "Cancel·la"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Edit": "Bearbeiten",
|
||||
"Quit": "Beenden",
|
||||
"Show/Hide": "Anzeigen/Ausblenden",
|
||||
"Close Element": "Element schließen",
|
||||
"Cancel": "Abbrechen",
|
||||
"Copy image address": "Bild-Adresse kopieren"
|
||||
"Copy image address": "Bild-Adresse kopieren",
|
||||
"Close %(brand)s": "%(brand)s schließen"
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
"Edit": "Επεξεργασία",
|
||||
"Quit": "Κλείσιμο",
|
||||
"Show/Hide": "Eμφάνιση/Απόκρυψη",
|
||||
"Close Element": "Κλείστε το Element",
|
||||
"Cancel": "Ακύρωση",
|
||||
"Add to dictionary": "Προσθήκη στο λεξικό",
|
||||
"The image failed to save": "Η αποθήκευση της εικόνας απέτυχε",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"Cancel": "Cancel",
|
||||
"Close Element": "Close Element",
|
||||
"Close %(brand)s": "Close %(brand)s",
|
||||
"Are you sure you want to quit?": "Are you sure you want to quit?",
|
||||
"Show/Hide": "Show/Hide",
|
||||
"Quit": "Quit",
|
||||
|
||||
@@ -41,6 +41,5 @@
|
||||
"Quit": "Quit",
|
||||
"Show/Hide": "Show/Hide",
|
||||
"Are you sure you want to quit?": "Are you sure you want to quit?",
|
||||
"Close Element": "Close Element",
|
||||
"Cancel": "Cancel"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "Salir",
|
||||
"Show/Hide": "Ver/Ocultar",
|
||||
"Are you sure you want to quit?": "¿Quieres salir?",
|
||||
"Close Element": "Cerrar Element",
|
||||
"Cancel": "Cancelar",
|
||||
"Copy image address": "Copiar dirección de la imagen"
|
||||
"Copy image address": "Copiar dirección de la imagen",
|
||||
"Close %(brand)s": "Cerrar %(brand)s"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "Välju",
|
||||
"Show/Hide": "Näita/peida",
|
||||
"Are you sure you want to quit?": "Kas sa kindlasti soovid rakendusest väljuda?",
|
||||
"Close Element": "Sulge Element",
|
||||
"Cancel": "Tühista",
|
||||
"Copy image address": "Kopeeri pildi aadress"
|
||||
"Copy image address": "Kopeeri pildi aadress",
|
||||
"Close %(brand)s": "Sulge %(brand)s"
|
||||
}
|
||||
|
||||
@@ -42,6 +42,6 @@
|
||||
"Quit": "خروج",
|
||||
"Show/Hide": "نمایش/پنهان",
|
||||
"Are you sure you want to quit?": "آیا مطمئنید که میخواهید خارج شوید؟",
|
||||
"Close Element": "بستن المنت",
|
||||
"Cancel": "لغو"
|
||||
"Cancel": "لغو",
|
||||
"Close %(brand)s": "بستن %(brand)s"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "Lopeta",
|
||||
"Show/Hide": "Näytä/piilota",
|
||||
"Are you sure you want to quit?": "Haluatko varmasti poistua?",
|
||||
"Close Element": "Sulje Element",
|
||||
"Cancel": "Peruuta",
|
||||
"Copy image address": "Kopioi kuvan osoite"
|
||||
"Copy image address": "Kopioi kuvan osoite",
|
||||
"Close %(brand)s": "Sulje %(brand)s"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"Quit": "Quitter",
|
||||
"Show/Hide": "Afficher/Masquer",
|
||||
"Are you sure you want to quit?": "Êtes-vous sûr de vouloir quitter ?",
|
||||
"Close Element": "Fermer Element",
|
||||
"Cancel": "Annuler",
|
||||
"Unhide": "Dé-masquer",
|
||||
"Hide Others": "Masquer les autres",
|
||||
|
||||
@@ -41,6 +41,5 @@
|
||||
"Quit": "Ofslute",
|
||||
"Show/Hide": "Toane/Ferbergje",
|
||||
"Are you sure you want to quit?": "Binne jo der wis fan dat jo ôfslute wolle?",
|
||||
"Close Element": "Element ôfslute",
|
||||
"Cancel": "Annulearje"
|
||||
}
|
||||
|
||||
@@ -41,6 +41,5 @@
|
||||
"Quit": "Saír",
|
||||
"Show/Hide": "Mostrar/Agochar",
|
||||
"Are you sure you want to quit?": "Tes a certeza de que queres saír?",
|
||||
"Close Element": "Pechar Element",
|
||||
"Cancel": "Cancelar"
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
"Quit": "יציאה",
|
||||
"Show/Hide": "הצג\\הסתר",
|
||||
"Are you sure you want to quit?": "האם אתה בטוח שברצונך לצאת?",
|
||||
"Close Element": "סגור את אלמנט",
|
||||
"Cancel": "ביטול",
|
||||
"Paste and Match Style": "הדבק והתאם סגנון",
|
||||
"Copy image address": "העתקת כתובת התמונה"
|
||||
|
||||
@@ -8,6 +8,5 @@
|
||||
"Quit": "Prestati",
|
||||
"Show/Hide": "Pokaži/sakrij",
|
||||
"Are you sure you want to quit?": "Jesi li siguran da želiš odustati?",
|
||||
"Close Element": "Zatvori Element",
|
||||
"Cancel": "Otkazati"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "Kilép",
|
||||
"Show/Hide": "Megmutat/Elrejt",
|
||||
"Are you sure you want to quit?": "Biztos, hogy kilép?",
|
||||
"Close Element": "Element bezárása",
|
||||
"Cancel": "Mégsem",
|
||||
"Copy image address": "Kép címének másolása"
|
||||
"Copy image address": "Kép címének másolása",
|
||||
"Close %(brand)s": "%(brand)s bezárása"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "Keluar",
|
||||
"Show/Hide": "Tampilkan/Sembunyikan",
|
||||
"Are you sure you want to quit?": "Apakah Anda yakin ingin keluar?",
|
||||
"Close Element": "Tutup Element",
|
||||
"Cancel": "Batal",
|
||||
"Copy image address": "Salin alamat gambar"
|
||||
"Copy image address": "Salin alamat gambar",
|
||||
"Close %(brand)s": "Tutuo %(brand)s"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"Quit": "Hætta",
|
||||
"Show/Hide": "Sýna/Fela",
|
||||
"Are you sure you want to quit?": "Ertu viss um að þú viljir hætta?",
|
||||
"Close Element": "Loka Element",
|
||||
"Cancel": "Hætta við",
|
||||
"Copy image address": "Afrita slóð myndar"
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
"Quit": "Esci",
|
||||
"Show/Hide": "Mostra/Nascondi",
|
||||
"Are you sure you want to quit?": "Vuoi veramente uscire?",
|
||||
"Close Element": "Chiudi Element",
|
||||
"Cancel": "Annulla",
|
||||
"Stop Speaking": "Smetti di parlare",
|
||||
"Speech": "Dettatura",
|
||||
"Copy image address": "Copia indirizzo immagine"
|
||||
"Copy image address": "Copia indirizzo immagine",
|
||||
"Close %(brand)s": "Chiudi %(brand)s"
|
||||
}
|
||||
|
||||
@@ -42,6 +42,5 @@
|
||||
"Quit": "ຍົກເລີກ",
|
||||
"Show/Hide": "ສະແດງ/ເຊື່ອງ",
|
||||
"Are you sure you want to quit?": "ທ່ານຕ້ອງການປິດແທ້ບໍ່?",
|
||||
"Close Element": "ປິດລະບົບ",
|
||||
"Cancel": "ຍົກເລີກ"
|
||||
}
|
||||
|
||||
@@ -42,6 +42,6 @@
|
||||
"Quit": "Išeiti",
|
||||
"Show/Hide": "Rodyti/Slėpti",
|
||||
"Are you sure you want to quit?": "Ar tikrai norite išeiti?",
|
||||
"Close Element": "Uždaryti Element",
|
||||
"Cancel": "Atšaukti"
|
||||
"Cancel": "Atšaukti",
|
||||
"Close %(brand)s": "Uždaryti %(brand)s"
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"Start Speaking": "Runājiet...",
|
||||
"Add to dictionary": "Pievienot vārdnīcai",
|
||||
"The image failed to save": "Attēlu saglabāt neizdevās",
|
||||
"The image failed to save": "Attēlu neizdevās saglabāt",
|
||||
"Failed to save image": "Neizdevās saglabāt attēlu",
|
||||
"Save image as...": "Saglabāt attēlu kā...",
|
||||
"Copy link address": "Kopēt saiti",
|
||||
"Copy email address": "Kopēt e-pastu",
|
||||
"Copy email address": "Kopēt e-pasta adresi",
|
||||
"Copy image": "Kopēt attēlu",
|
||||
"File": "Fails",
|
||||
"Bring All to Front": "Iznest visu priekšplānā",
|
||||
@@ -15,7 +15,7 @@
|
||||
"Unhide": "Rādīt",
|
||||
"Hide Others": "Slēpt citus",
|
||||
"Hide": "Slēpt",
|
||||
"Services": "Servisi/pakalpojumi",
|
||||
"Services": "Pakalpojumi",
|
||||
"About": "Par programmu",
|
||||
"Element Help": "Element palīdzība",
|
||||
"Help": "Palīdzība",
|
||||
@@ -24,7 +24,7 @@
|
||||
"Window": "Logs",
|
||||
"Toggle Developer Tools": "Pārslēgt uz Izstrādātāja rīkiem",
|
||||
"Toggle Full Screen": "Pārslēgt uz pilnekrānu",
|
||||
"Preferences": "Parametri/iestatījumi",
|
||||
"Preferences": "Iestatījumi",
|
||||
"Zoom Out": "Samazināt",
|
||||
"Zoom In": "Palielināt",
|
||||
"Actual Size": "Faktiskais izmērs",
|
||||
@@ -35,12 +35,13 @@
|
||||
"Paste": "Ievietot",
|
||||
"Copy": "Kopēt",
|
||||
"Cut": "Izgriezt",
|
||||
"Redo": "Atatdarīt/atatgriezt (redo)",
|
||||
"Undo": "Atgreizt/atdarīt (undo)",
|
||||
"Redo": "Atatgriezt/atatsaukt/atatdarīt",
|
||||
"Undo": "Atgriezt/atsaukt/atdarīt",
|
||||
"Edit": "Rediģēt",
|
||||
"Quit": "Iziet",
|
||||
"Show/Hide": "Rādīt/nerādīt",
|
||||
"Are you sure you want to quit?": "Tiešām vēlaties iziet?",
|
||||
"Close Element": "Aizvērt Elementu",
|
||||
"Cancel": "Atcelt"
|
||||
"Cancel": "Atcelt",
|
||||
"Copy image address": "Kopēt attēla adresi",
|
||||
"Close %(brand)s": "Aizvērt %(brand)s"
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
"Quit": "Avslutt",
|
||||
"Show/Hide": "Vis/Skjul",
|
||||
"Are you sure you want to quit?": "Er du sikker på at du vil slutte?",
|
||||
"Close Element": "Lukk Element",
|
||||
"Cancel": "Avbryt",
|
||||
"Services": "Tjenester",
|
||||
"Hide Others": "Skjul Andre"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "Sluiten",
|
||||
"Show/Hide": "Tonen/Verbergen",
|
||||
"Are you sure you want to quit?": "Weet u zeker dat u wilt stoppen?",
|
||||
"Close Element": "Element sluiten",
|
||||
"Cancel": "Annuleren",
|
||||
"Copy image address": "Kopieer afbeeldingsadres"
|
||||
"Copy image address": "Kopieer afbeeldingsadres",
|
||||
"Close %(brand)s": "Sluit %(brand)s"
|
||||
}
|
||||
|
||||
@@ -41,6 +41,5 @@
|
||||
"Edit": "Rediger",
|
||||
"Quit": "Avslutt",
|
||||
"Show/Hide": "Vis/Gøym",
|
||||
"Close Element": "Lat att Element",
|
||||
"Cancel": "Avbryt"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"Quit": "Zamknij",
|
||||
"Show/Hide": "Pokaż/Ukryj",
|
||||
"Are you sure you want to quit?": "Czy na pewno chcesz zamknąć?",
|
||||
"Close Element": "Zamknij Elementa",
|
||||
"Cancel": "Anuluj",
|
||||
"Copy image address": "Skopiuj adres obrazu"
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
"Quit": "Sair",
|
||||
"Show/Hide": "Mostrar/Esconder",
|
||||
"Are you sure you want to quit?": "Você tem certeza que você quer sair?",
|
||||
"Close Element": "Fechar Element",
|
||||
"Cancel": "Cancelar",
|
||||
"Bring All to Front": "Trazer Todas Para Frente",
|
||||
"Hide Others": "Esconder Outras(os)",
|
||||
"Copy image address": "Copiar endereço de imagem"
|
||||
"Copy image address": "Copiar endereço de imagem",
|
||||
"Close %(brand)s": "Fechar %(brand)s"
|
||||
}
|
||||
|
||||
@@ -35,9 +35,8 @@
|
||||
"Redo": "Refă",
|
||||
"Undo": "Anulare",
|
||||
"Edit": "Editare",
|
||||
"Quit": "Închide",
|
||||
"Quit": "Închid",
|
||||
"Show/Hide": "Arată/Ascunde",
|
||||
"Are you sure you want to quit?": "Sunte-ți sigur ca doriți sa inchideți aplicația ?",
|
||||
"Close Element": "închide aplicația",
|
||||
"Are you sure you want to quit?": "Sigur vrei să ieși din cont?",
|
||||
"Cancel": "Anulare"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"Edit": "Изменить",
|
||||
"Quit": "Выйти",
|
||||
"Close Element": "Закрыть Element",
|
||||
"Cancel": "Отмена",
|
||||
"Show/Hide": "Показать/скрыть",
|
||||
"Are you sure you want to quit?": "Вы уверены, что хотите выйти?",
|
||||
@@ -43,5 +42,6 @@
|
||||
"Speech": "Голос",
|
||||
"Hide Others": "Скрыть прочие",
|
||||
"Paste and Match Style": "Вставить с тем же стилем",
|
||||
"Copy image address": "Копировать адрес изображения"
|
||||
"Copy image address": "Копировать адрес изображения",
|
||||
"Close %(brand)s": "Закрыть %(brand)s"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"Show/Hide": "පෙන්වන්න/සඟවන්න",
|
||||
"Are you sure you want to quit?": "ඔබට ඉවත් වීමට අවශ්ය බව විශ්වාස ද?",
|
||||
"Close Element": "ඉලමෙන්ට් වසන්න",
|
||||
"Cancel": "අවලංගු කරන්න",
|
||||
"Add to dictionary": "ශබ්ද කෝෂයට එකතු කරන්න",
|
||||
"Copy link address": "සබැඳියේ ලිපිනය පිටපත් කරන්න",
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"Speech": "Reč",
|
||||
"Element Help": "Pomocník pre aplikáciu Element",
|
||||
"Paste and Match Style": "Vložiť a prispôsobiť štýl",
|
||||
"Close Element": "Zavrieť aplikáciu Element",
|
||||
"Add to dictionary": "Pridať do slovníka",
|
||||
"The image failed to save": "Obrázok sa nepodarilo uložiť",
|
||||
"Failed to save image": "Chyba pri ukladaní obrázka",
|
||||
@@ -43,5 +42,6 @@
|
||||
"Show/Hide": "Zobraziť/Skryť",
|
||||
"Are you sure you want to quit?": "Naozaj chcete zavrieť aplikáciu?",
|
||||
"Cancel": "Zrušiť",
|
||||
"Copy image address": "Kopírovať adresu obrázka"
|
||||
"Copy image address": "Kopírovať adresu obrázka",
|
||||
"Close %(brand)s": "Zatvoriť %(brand)s"
|
||||
}
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
"Unhide": "Sluta gömma",
|
||||
"Zoom Out": "Zooma ut",
|
||||
"Zoom In": "Zooma in",
|
||||
"Close Element": "Stäng Element",
|
||||
"Show/Hide": "Visa/dölj",
|
||||
"Add to dictionary": "Lägg till i ordlistan",
|
||||
"The image failed to save": "Bilden sparades inte",
|
||||
"Failed to save image": "Misslyckades med att spara bilden",
|
||||
"Are you sure you want to quit?": "Är du säker att du vill avsluta?",
|
||||
"Copy image address": "Kopiera bildadress"
|
||||
"Copy image address": "Kopiera bildadress",
|
||||
"Close %(brand)s": "Stäng %(brand)s"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "வெளியேறு",
|
||||
"Show/Hide": "காட்டு/மறை",
|
||||
"Are you sure you want to quit?": "நீங்கள் நிச்சயம் வெளியேற விரும்புகிறீர்களா?",
|
||||
"Close Element": "எலிமெண்ட் ஐ மூடு",
|
||||
"Cancel": "விலக்கிக்கொள்",
|
||||
"Copy image address": "பட முகவரியை நகலெடு"
|
||||
"Copy image address": "பட முகவரியை நகலெடு",
|
||||
"Close %(brand)s": "%(brand)s ஐ மூடு"
|
||||
}
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
"Cut": "కట్",
|
||||
"Copy": "కాపీ",
|
||||
"Are you sure you want to quit?": "మీరు వెళ్ళిపోవాలని అనుకుంటున్నారా?",
|
||||
"Close Element": "మూసివేత element",
|
||||
"Cancel": "ఆపు"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"Quit": "Çık",
|
||||
"Show/Hide": "Göster/Gizle",
|
||||
"Are you sure you want to quit?": "Çıkmak istediğinize emin misiniz?",
|
||||
"Close Element": "Element'i kapat",
|
||||
"Cancel": "İptal",
|
||||
"Copy image address": "Görsel adresini kopyala"
|
||||
}
|
||||
|
||||
21
src/i18n/strings/ur.json
Normal file
21
src/i18n/strings/ur.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"Paste": "پیسٹ",
|
||||
"Redo": "دوبارہ کریں",
|
||||
"Preferences": "ترجیحات",
|
||||
"Hide Others": "",
|
||||
"Show/Hide": "دکھائیں/چھپائیں",
|
||||
"Quit": "چھوڑو",
|
||||
"Hide": "چھپائیں",
|
||||
"Unhide": "دکھائیں",
|
||||
"Zoom": "زوم",
|
||||
"Close": "بند",
|
||||
"Window": "کھڑکی",
|
||||
"Cut": "کٹ",
|
||||
"Delete": "مٹاؤ",
|
||||
"File": "فائل",
|
||||
"Help": "مدد",
|
||||
"Copy": "کاپی",
|
||||
"Add to dictionary": "لغت میں شامل کریں",
|
||||
"Copy image": "تصویر کاپی کریں",
|
||||
"Start Speaking": "بولنا شروع کریں"
|
||||
}
|
||||
@@ -41,7 +41,6 @@
|
||||
"Quit": "Thoát",
|
||||
"Show/Hide": "Hiển thị/Ẩn",
|
||||
"Are you sure you want to quit?": "Bạn có chắc chắn muốn thoát?",
|
||||
"Close Element": "Đóng Element",
|
||||
"Cancel": "Hủy bỏ",
|
||||
"Copy image address": "Sao chép địa chỉ ảnh"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
"Quit": "退出",
|
||||
"Show/Hide": "显示/隐藏",
|
||||
"Are you sure you want to quit?": "你确定要退出吗?",
|
||||
"Close Element": "关闭 Element",
|
||||
"Cancel": "取消",
|
||||
"Copy image address": "复制图片地址"
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
"Quit": "退出",
|
||||
"Show/Hide": "顯示/隱藏",
|
||||
"Are you sure you want to quit?": "您確定要退出嗎?",
|
||||
"Close Element": "關閉 Element",
|
||||
"Cancel": "取消",
|
||||
"Copy image address": "複製圖片地址"
|
||||
"Copy image address": "複製圖片地址",
|
||||
"Close %(brand)s": "關閉 %(brand)s"
|
||||
}
|
||||
|
||||
12
src/ipc.ts
12
src/ipc.ts
@@ -46,7 +46,7 @@ ipcMain.on('loudNotification', function(): void {
|
||||
}
|
||||
});
|
||||
|
||||
let powerSaveBlockerId: number = null;
|
||||
let powerSaveBlockerId: number | null = null;
|
||||
ipcMain.on('app_onAction', function(_ev: IpcMainEvent, payload) {
|
||||
switch (payload.action) {
|
||||
case 'call_state': {
|
||||
@@ -147,11 +147,11 @@ ipcMain.on('ipcCall', async function(_ev: IpcMainEvent, payload) {
|
||||
|
||||
case 'getPickleKey':
|
||||
try {
|
||||
ret = await keytar.getPassword("element.io", `${args[0]}|${args[1]}`);
|
||||
ret = await keytar?.getPassword("element.io", `${args[0]}|${args[1]}`);
|
||||
// migrate from riot.im (remove once we think there will no longer be
|
||||
// logins from the time of riot.im)
|
||||
if (ret === null) {
|
||||
ret = await keytar.getPassword("riot.im", `${args[0]}|${args[1]}`);
|
||||
ret = await keytar?.getPassword("riot.im", `${args[0]}|${args[1]}`);
|
||||
}
|
||||
} catch (e) {
|
||||
// if an error is thrown (e.g. keytar can't connect to the keychain),
|
||||
@@ -163,7 +163,7 @@ ipcMain.on('ipcCall', async function(_ev: IpcMainEvent, payload) {
|
||||
case 'createPickleKey':
|
||||
try {
|
||||
const pickleKey = await randomArray(32);
|
||||
await keytar.setPassword("element.io", `${args[0]}|${args[1]}`, pickleKey);
|
||||
await keytar?.setPassword("element.io", `${args[0]}|${args[1]}`, pickleKey);
|
||||
ret = pickleKey;
|
||||
} catch (e) {
|
||||
ret = null;
|
||||
@@ -172,10 +172,10 @@ ipcMain.on('ipcCall', async function(_ev: IpcMainEvent, payload) {
|
||||
|
||||
case 'destroyPickleKey':
|
||||
try {
|
||||
await keytar.deletePassword("element.io", `${args[0]}|${args[1]}`);
|
||||
await keytar?.deletePassword("element.io", `${args[0]}|${args[1]}`);
|
||||
// migrate from riot.im (remove once we think there will no longer be
|
||||
// logins from the time of riot.im)
|
||||
await keytar.deletePassword("riot.im", `${args[0]}|${args[1]}`);
|
||||
await keytar?.deletePassword("riot.im", `${args[0]}|${args[1]}`);
|
||||
} catch (e) {}
|
||||
break;
|
||||
case 'getDesktopCapturerSources':
|
||||
|
||||
@@ -21,7 +21,7 @@ try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
keytar = require('keytar');
|
||||
} catch (e) {
|
||||
if (e.code === "MODULE_NOT_FOUND") {
|
||||
if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") {
|
||||
console.log("Keytar isn't installed; secure key storage is disabled.");
|
||||
} else {
|
||||
console.warn("Keytar unexpected error:", e);
|
||||
|
||||
@@ -18,7 +18,7 @@ import counterpart from "counterpart";
|
||||
|
||||
import type Store from 'electron-store';
|
||||
|
||||
const DEFAULT_LOCALE = "en";
|
||||
const FALLBACK_LOCALE = 'en';
|
||||
|
||||
export function _td(text: string): string {
|
||||
return text;
|
||||
@@ -27,14 +27,12 @@ export function _td(text: string): string {
|
||||
type SubstitutionValue = number | string;
|
||||
|
||||
interface IVariables {
|
||||
[key: string]: SubstitutionValue;
|
||||
[key: string]: SubstitutionValue | undefined;
|
||||
count?: number;
|
||||
}
|
||||
|
||||
export function _t(text: string, variables: IVariables = {}): string {
|
||||
const args = Object.assign({ interpolate: false }, variables);
|
||||
|
||||
const { count } = args;
|
||||
const { count } = variables;
|
||||
|
||||
// Horrible hack to avoid https://github.com/vector-im/element-web/issues/4191
|
||||
// The interpolation library that counterpart uses does not support undefined/null
|
||||
@@ -43,21 +41,20 @@ export function _t(text: string, variables: IVariables = {}): string {
|
||||
// valid ES6 template strings to i18n strings it's extremely easy to pass undefined/null
|
||||
// if there are no existing null guards. To avoid this making the app completely inoperable,
|
||||
// we'll check all the values for undefined/null and stringify them here.
|
||||
Object.keys(args).forEach((key) => {
|
||||
if (args[key] === undefined) {
|
||||
Object.keys(variables).forEach((key) => {
|
||||
if (variables[key] === undefined) {
|
||||
console.warn("safeCounterpartTranslate called with undefined interpolation name: " + key);
|
||||
args[key] = 'undefined';
|
||||
variables[key] = 'undefined';
|
||||
}
|
||||
if (args[key] === null) {
|
||||
if (variables[key] === null) {
|
||||
console.warn("safeCounterpartTranslate called with null interpolation name: " + key);
|
||||
args[key] = 'null';
|
||||
variables[key] = 'null';
|
||||
}
|
||||
});
|
||||
let translated = counterpart.translate(text, args);
|
||||
if (translated === undefined && count !== undefined) {
|
||||
// counterpart does not do fallback if no pluralisation exists
|
||||
// in the preferred language, so do it here
|
||||
translated = counterpart.translate(text, Object.assign({}, args, { locale: DEFAULT_LOCALE }));
|
||||
let translated = counterpart.translate(text, variables);
|
||||
if (!translated && count !== undefined) {
|
||||
// counterpart does not do fallback if no pluralisation exists in the preferred language, so do it here
|
||||
translated = counterpart.translate(text, { ...variables, locale: FALLBACK_LOCALE });
|
||||
}
|
||||
|
||||
// The translation returns text so there's no XSS vector here (no unsafe HTML, no code execution)
|
||||
@@ -66,17 +63,17 @@ export function _t(text: string, variables: IVariables = {}): string {
|
||||
|
||||
type Component = () => void;
|
||||
|
||||
type TypedStore = Store<{ locale?: string | string[] }>;
|
||||
type TypedStore = Store<{ locale?: string[] }>;
|
||||
|
||||
export class AppLocalization {
|
||||
private static readonly STORE_KEY = "locale";
|
||||
|
||||
private readonly store: TypedStore;
|
||||
private readonly localizedComponents: Set<Component>;
|
||||
private readonly localizedComponents?: Set<Component>;
|
||||
|
||||
constructor({ store, components = [] }: { store: TypedStore, components: Component[] }) {
|
||||
counterpart.registerTranslations("en", this.fetchTranslationJson("en_EN"));
|
||||
counterpart.setFallbackLocale('en');
|
||||
counterpart.registerTranslations(FALLBACK_LOCALE, this.fetchTranslationJson("en_EN"));
|
||||
counterpart.setFallbackLocale(FALLBACK_LOCALE);
|
||||
counterpart.setSeparator('|');
|
||||
|
||||
if (Array.isArray(components)) {
|
||||
@@ -86,7 +83,8 @@ export class AppLocalization {
|
||||
this.store = store;
|
||||
if (this.store.has(AppLocalization.STORE_KEY)) {
|
||||
const locales = this.store.get(AppLocalization.STORE_KEY);
|
||||
this.setAppLocale(locales);
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
this.setAppLocale(locales!);
|
||||
}
|
||||
|
||||
this.resetLocalizedUI();
|
||||
@@ -110,7 +108,7 @@ export class AppLocalization {
|
||||
return require(`./i18n/strings/${this.denormalize(locale)}.json`);
|
||||
} catch (e) {
|
||||
console.log(`Could not fetch translation json for locale: '${locale}'`, e);
|
||||
return null;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,16 +119,15 @@ export class AppLocalization {
|
||||
locales = [locales];
|
||||
}
|
||||
|
||||
locales.forEach(locale => {
|
||||
const loadedLocales = locales.filter(locale => {
|
||||
const translations = this.fetchTranslationJson(locale);
|
||||
if (translations !== null) {
|
||||
counterpart.registerTranslations(locale, translations);
|
||||
}
|
||||
return !!translations;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore - this looks like a bug but is out of scope for this conversion
|
||||
counterpart.setLocale(locales);
|
||||
counterpart.setLocale(loadedLocales[0]);
|
||||
this.store.set(AppLocalization.STORE_KEY, locales);
|
||||
|
||||
this.resetLocalizedUI();
|
||||
@@ -138,7 +135,7 @@ export class AppLocalization {
|
||||
|
||||
public resetLocalizedUI(): void {
|
||||
console.log("Resetting the UI components after locale change");
|
||||
this.localizedComponents.forEach(componentSetup => {
|
||||
this.localizedComponents?.forEach(componentSetup => {
|
||||
if (typeof componentSetup === "function") {
|
||||
componentSetup();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export function getProfileFromDeeplink(args: string[]): string | undefined {
|
||||
if (deeplinkUrl && deeplinkUrl.includes(SEARCH_PARAM)) {
|
||||
const parsedUrl = new URL(deeplinkUrl);
|
||||
if (parsedUrl.protocol === PROTOCOL) {
|
||||
const ssoID = parsedUrl.searchParams.get(SEARCH_PARAM);
|
||||
const ssoID = parsedUrl.searchParams.get(SEARCH_PARAM)!;
|
||||
const store = readStore();
|
||||
console.log("Forwarding to profile: ", store[ssoID]);
|
||||
return store[ssoID];
|
||||
|
||||
@@ -40,16 +40,14 @@ try {
|
||||
ReindexError = seshatModule.ReindexError;
|
||||
seshatSupported = true;
|
||||
} catch (e) {
|
||||
if (e.code === "MODULE_NOT_FOUND") {
|
||||
if ((<NodeJS.ErrnoException>e).code === "MODULE_NOT_FOUND") {
|
||||
console.log("Seshat isn't installed, event indexing is disabled.");
|
||||
} else {
|
||||
console.warn("Seshat unexpected error:", e);
|
||||
}
|
||||
}
|
||||
|
||||
const eventStorePath = path.join(app.getPath('userData'), 'EventStore');
|
||||
|
||||
let eventIndex: SeshatType = null;
|
||||
let eventIndex: SeshatType | null = null;
|
||||
|
||||
const seshatDefaultPassphrase = "DEFAULT_PASSPHRASE";
|
||||
async function getOrCreatePassphrase(key: string): Promise<string> {
|
||||
@@ -66,9 +64,8 @@ async function getOrCreatePassphrase(key: string): Promise<string> {
|
||||
} catch (e) {
|
||||
console.log("Error getting the event index passphrase out of the secret store", e);
|
||||
}
|
||||
} else {
|
||||
return seshatDefaultPassphrase;
|
||||
}
|
||||
return seshatDefaultPassphrase;
|
||||
}
|
||||
|
||||
const deleteContents = async (p: string): Promise<void> => {
|
||||
@@ -81,6 +78,9 @@ const deleteContents = async (p: string): Promise<void> => {
|
||||
ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise<void> {
|
||||
if (!global.mainWindow) return;
|
||||
|
||||
// We do this here to ensure we get the path after --profile has been resolved
|
||||
const eventStorePath = path.join(app.getPath('userData'), 'EventStore');
|
||||
|
||||
const sendError = (id, e) => {
|
||||
const error = {
|
||||
message: e.message,
|
||||
@@ -180,7 +180,7 @@ ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise<void> {
|
||||
|
||||
case 'addEventToIndex':
|
||||
try {
|
||||
eventIndex.addEvent(args[0], args[1]);
|
||||
eventIndex?.addEvent(args[0], args[1]);
|
||||
} catch (e) {
|
||||
sendError(payload.id, e);
|
||||
return;
|
||||
@@ -189,7 +189,7 @@ ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise<void> {
|
||||
|
||||
case 'deleteEvent':
|
||||
try {
|
||||
ret = await eventIndex.deleteEvent(args[0]);
|
||||
ret = await eventIndex?.deleteEvent(args[0]);
|
||||
} catch (e) {
|
||||
sendError(payload.id, e);
|
||||
return;
|
||||
@@ -198,7 +198,7 @@ ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise<void> {
|
||||
|
||||
case 'commitLiveEvents':
|
||||
try {
|
||||
ret = await eventIndex.commit();
|
||||
ret = await eventIndex?.commit();
|
||||
} catch (e) {
|
||||
sendError(payload.id, e);
|
||||
return;
|
||||
@@ -207,7 +207,7 @@ ipcMain.on('seshat', async function(_ev: IpcMainEvent, payload): Promise<void> {
|
||||
|
||||
case 'searchEventIndex':
|
||||
try {
|
||||
ret = await eventIndex.search(args[0]);
|
||||
ret = await eventIndex?.search(args[0]);
|
||||
} catch (e) {
|
||||
sendError(payload.id, e);
|
||||
return;
|
||||
|
||||
@@ -22,7 +22,7 @@ import fs from "fs";
|
||||
|
||||
import { _t } from "./language-helper";
|
||||
|
||||
let trayIcon: Tray = null;
|
||||
let trayIcon: Tray | null = null;
|
||||
|
||||
export function hasTray(): boolean {
|
||||
return (trayIcon !== null);
|
||||
@@ -65,7 +65,7 @@ export function create(config: IConfig): void {
|
||||
if (!favicons || favicons.length <= 0 || !favicons[0].startsWith('data:')) {
|
||||
if (lastFavicon !== null) {
|
||||
global.mainWindow.setIcon(defaultIcon);
|
||||
trayIcon.setImage(defaultIcon);
|
||||
trayIcon?.setImage(defaultIcon);
|
||||
lastFavicon = null;
|
||||
}
|
||||
return;
|
||||
@@ -88,12 +88,12 @@ export function create(config: IConfig): void {
|
||||
}
|
||||
}
|
||||
|
||||
trayIcon.setImage(newFavicon);
|
||||
trayIcon?.setImage(newFavicon);
|
||||
global.mainWindow.setIcon(newFavicon);
|
||||
});
|
||||
|
||||
global.mainWindow.webContents.on('page-title-updated', function(ev, title) {
|
||||
trayIcon.setToolTip(title);
|
||||
trayIcon?.setToolTip(title);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ export function start(updateBaseUrl: string): void {
|
||||
// I'm not even going to try to guess which feed style they'd use if they
|
||||
// implemented it on Linux, or if it would be different again.
|
||||
console.log('Auto update not supported on this platform');
|
||||
return;
|
||||
}
|
||||
|
||||
if (url) {
|
||||
|
||||
@@ -50,7 +50,7 @@ function safeOpenURL(target: string): void {
|
||||
// (for instance, open /bin/sh does indeed open a terminal
|
||||
// with a shell, albeit with no arguments)
|
||||
const parsedUrl = url.parse(target);
|
||||
if (PERMITTED_URL_SCHEMES.indexOf(parsedUrl.protocol) > -1) {
|
||||
if (PERMITTED_URL_SCHEMES.includes(parsedUrl.protocol!)) {
|
||||
// explicitly use the URL re-assembled by the url library,
|
||||
// so we know the url parser has understood all the parts
|
||||
// of the input string
|
||||
@@ -69,7 +69,7 @@ function onWindowOrNavigate(ev: Event, target: string): void {
|
||||
}
|
||||
|
||||
function writeNativeImage(filePath: string, img: NativeImage): Promise<void> {
|
||||
switch (filePath.split('.').pop().toLowerCase()) {
|
||||
switch (filePath.split('.').pop()?.toLowerCase()) {
|
||||
case "jpg":
|
||||
case "jpeg":
|
||||
return fs.promises.writeFile(filePath, img.toJPEG(100));
|
||||
@@ -181,7 +181,7 @@ function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
|
||||
options.push({
|
||||
label: word,
|
||||
click: (menuItem, browserWindow) => {
|
||||
browserWindow.webContents.replaceMisspelling(word);
|
||||
browserWindow?.webContents.replaceMisspelling(word);
|
||||
},
|
||||
});
|
||||
});
|
||||
@@ -190,7 +190,7 @@ function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
|
||||
}, {
|
||||
label: _t('Add to dictionary'),
|
||||
click: (menuItem, browserWindow) => {
|
||||
browserWindow.webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord);
|
||||
browserWindow?.webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord);
|
||||
},
|
||||
}, {
|
||||
type: 'separator',
|
||||
@@ -251,8 +251,9 @@ function onEditableContextMenu(ev: Event, params: ContextMenuParams) {
|
||||
let userDownloadIndex = 0;
|
||||
const userDownloadMap = new Map<number, string>(); // Map from id to path
|
||||
ipcMain.on('userDownloadAction', function(ev: IpcMainEvent, { id, open = false }) {
|
||||
if (open) {
|
||||
shell.openPath(userDownloadMap.get(id));
|
||||
const path = userDownloadMap.get(id);
|
||||
if (open && path) {
|
||||
shell.openPath(path);
|
||||
}
|
||||
userDownloadMap.delete(id);
|
||||
});
|
||||
|
||||
@@ -48,12 +48,14 @@ describe("App launch", () => {
|
||||
}
|
||||
});
|
||||
window = await app.firstWindow();
|
||||
});
|
||||
}, 30000);
|
||||
|
||||
afterAll(async () => {
|
||||
await app?.close();
|
||||
await app?.close().catch(e => {
|
||||
console.error(e);
|
||||
});
|
||||
fs.rmSync(tmpDir, { recursive: true });
|
||||
});
|
||||
}, 30000);
|
||||
|
||||
it("should launch and render the welcome view successfully", async () => {
|
||||
await window.locator("#matrixchat").waitFor();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"dom"
|
||||
],
|
||||
"types": ["jest", "node"],
|
||||
"strict": true
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
|
||||
Reference in New Issue
Block a user