mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-02-23 00:00:41 +01:00
Allow overwriting app.element.io when popping out widgets (#1277)
This commit is contained in:
parent
2738dca96f
commit
da9d9e1730
@ -10,3 +10,7 @@
|
|||||||
# Distribution
|
# Distribution
|
||||||
|
|
||||||
- [Updates](updates.md)
|
- [Updates](updates.md)
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
|
||||||
|
- [Config](config.md)
|
||||||
|
15
docs/config.md
Normal file
15
docs/config.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Configuration
|
||||||
|
|
||||||
|
All Element Web options documented [here](https://github.com/vector-im/element-web/blob/develop/docs/config.md) can be used as well as the following:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
The app contains a configuration file specified at build time using [these instructions](https://github.com/vector-im/element-desktop/#config).
|
||||||
|
This config can be overwritten by the end using by creating a `config.json` file at the paths described [here](https://github.com/vector-im/element-desktop/#user-specified-configjson).
|
||||||
|
|
||||||
|
After changing the config, the app will need to be exited fully (including via the task tray) and re-started.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
1. `update_base_url`: Specifies the URL of the update server, see [document](https://github.com/vector-im/element-desktop/blob/develop/docs/updates.md).
|
||||||
|
2. `web_base_url`: Specifies the Element Web URL when performing actions such as popout widget. Defaults to `https://app.element.io/`.
|
@ -85,8 +85,9 @@ function onLinkContextMenu(ev: Event, params: ContextMenuParams, webContents: We
|
|||||||
if (url.startsWith("vector://vector/webapp")) {
|
if (url.startsWith("vector://vector/webapp")) {
|
||||||
// Avoid showing a context menu for app icons
|
// Avoid showing a context menu for app icons
|
||||||
if (params.hasImageContents) return;
|
if (params.hasImageContents) return;
|
||||||
// Rewrite URL so that it can be used outside of the app
|
const baseUrl = vectorConfig.web_base_url ?? "https://app.element.io/";
|
||||||
url = "https://app.element.io/" + url.substring(23);
|
// Rewrite URL so that it can be used outside the app
|
||||||
|
url = baseUrl + url.substring(23);
|
||||||
}
|
}
|
||||||
|
|
||||||
const popupMenu = new Menu();
|
const popupMenu = new Menu();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user