mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Update button href dynamically
also make button a link 'cos buttons can't have hrefs
This commit is contained in:
parent
ae18186290
commit
3c62829525
@ -32,6 +32,7 @@ body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 12px 22px;
|
padding: 12px 22px;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_Center {
|
.mx_Center {
|
||||||
@ -360,7 +361,7 @@ body {
|
|||||||
<div class="mx_HomePage_row">
|
<div class="mx_HomePage_row">
|
||||||
<div>
|
<div>
|
||||||
<h2>2: Configure your app</h2>
|
<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">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">Homeserver: <em id="hs_url"></em></p>
|
||||||
<p class="mx_Subtext" id="default_is">Identity Server: <em>https://vector.im</em> (default)</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 (isUrl && !isUrl.endsWith('/')) isUrl += '/';
|
||||||
|
|
||||||
if (hsUrl !== 'https://matrix.org/') {
|
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('step2_container').style.display = 'block';
|
||||||
document.getElementById('hs_url').innerText = hsUrl;
|
document.getElementById('hs_url').innerText = hsUrl;
|
||||||
document.getElementById('step_login_header').innerHTML= '3: Launch the app';
|
document.getElementById('step_login_header').innerHTML= '3: Launch the app';
|
||||||
|
Loading…
Reference in New Issue
Block a user