Update button href dynamically
also make button a link 'cos buttons can't have hrefspull/10810/head
parent
845fbacd11
commit
b8b10e79fe
|
@ -32,6 +32,7 @@ body {
|
|||
cursor: pointer;
|
||||
padding: 12px 22px;
|
||||
word-break: break-word;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.mx_Center {
|
||||
|
@ -360,7 +361,7 @@ body {
|
|||
<div class="mx_HomePage_row">
|
||||
<div>
|
||||
<h2>2: Configure your app</h2>
|
||||
<button class="mx_Button" id="configure_riot_button" href="#">Configure</button>
|
||||
<a class="mx_Button" id="configure_riot_button" href="#">Configure</a>
|
||||
<p class="mx_Subtext">Tap the button above, or manually enable <em>Use custom server</em> and enter:</p>
|
||||
<p class="mx_Subtext">Homeserver: <em id="hs_url"></em></p>
|
||||
<p class="mx_Subtext" id="default_is">Identity Server: <em>https://vector.im</em> (default)</p>
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue