Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overwriting app.element.io when popping out widgets #1277

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
# Distribution

- [Updates](updates.md)

# Setup

- [Config](config.md)
15 changes: 15 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -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/`.
5 changes: 3 additions & 2 deletions src/webcontents-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ function onLinkContextMenu(ev: Event, params: ContextMenuParams, webContents: We
if (url.startsWith("vector://vector/webapp")) {
// Avoid showing a context menu for app icons
if (params.hasImageContents) return;
// Rewrite URL so that it can be used outside of the app
url = "https://app.element.io/" + url.substring(23);
const baseUrl = vectorConfig.web_base_url ?? "https://app.element.io/";
// Rewrite URL so that it can be used outside the app
url = baseUrl + url.substring(23);
}

const popupMenu = new Menu();
Expand Down
Loading