Skip to content

Commit b8b10e7

Browse files
committed
Update button href dynamically
also make button a link 'cos buttons can't have hrefs
1 parent 845fbac commit b8b10e7

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/vector/mobile_guide/index.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
cursor: pointer;
3333
padding: 12px 22px;
3434
word-break: break-word;
35+
text-decoration: none;
3536
}
3637

3738
.mx_Center {
@@ -360,7 +361,7 @@ <h2>1: Install the app</h2>
360361
<div class="mx_HomePage_row">
361362
<div>
362363
<h2>2: Configure your app</h2>
363-
<button class="mx_Button" id="configure_riot_button" href="#">Configure</button>
364+
<a class="mx_Button" id="configure_riot_button" href="#">Configure</a>
364365
<p class="mx_Subtext">Tap the button above, or manually enable <em>Use custom server</em> and enter:</p>
365366
<p class="mx_Subtext">Homeserver: <em id="hs_url"></em></p>
366367
<p class="mx_Subtext" id="default_is">Identity Server: <em>https://vector.im</em> (default)</p>

‎src/vector/mobile_guide/index.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ async function initPage() {
9292
if (isUrl && !isUrl.endsWith('/')) isUrl += '/';
9393

9494
if (hsUrl !== 'https://matrix.org/') {
95+
document.getElementById('configure_riot_button').href =
96+
"https://riot.im/config/config?hs_url=" + encodeURIComponent(hsUrl) +
97+
"&is_url=" + encodeURIComponent(isUrl);
9598
document.getElementById('step2_container').style.display = 'block';
9699
document.getElementById('hs_url').innerText = hsUrl;
97100
document.getElementById('step_login_header').innerHTML= '3: Launch the app';

0 commit comments

Comments
 (0)