From 3c6282952558f62cdd1f4c30a29d3a9c75753cdd Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 10 Sep 2019 18:27:57 +0100 Subject: [PATCH] Update button href dynamically also make button a link 'cos buttons can't have hrefs --- src/vector/mobile_guide/index.html | 3 ++- src/vector/mobile_guide/index.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vector/mobile_guide/index.html b/src/vector/mobile_guide/index.html index 4a0a379e0f..e1d54744bb 100644 --- a/src/vector/mobile_guide/index.html +++ b/src/vector/mobile_guide/index.html @@ -32,6 +32,7 @@ body { cursor: pointer; padding: 12px 22px; word-break: break-word; + text-decoration: none; } .mx_Center { @@ -360,7 +361,7 @@ body {

2: Configure your app

- + Configure

Tap the button above, or manually enable Use custom server and enter:

Homeserver:

Identity Server: https://vector.im (default)

diff --git a/src/vector/mobile_guide/index.js b/src/vector/mobile_guide/index.js index e78992b7de..28e7470490 100644 --- a/src/vector/mobile_guide/index.js +++ b/src/vector/mobile_guide/index.js @@ -92,6 +92,9 @@ async function initPage() { if (isUrl && !isUrl.endsWith('/')) isUrl += '/'; if (hsUrl !== 'https://matrix.org/') { + document.getElementById('configure_riot_button').href = + "https://riot.im/config/config?hs_url=" + encodeURIComponent(hsUrl) + + "&is_url=" + encodeURIComponent(isUrl); document.getElementById('step2_container').style.display = 'block'; document.getElementById('hs_url').innerText = hsUrl; document.getElementById('step_login_header').innerHTML= '3: Launch the app';