mirror of https://github.com/vector-im/riot-web
Conditionally show custom server bit
parent
9c8ef4240c
commit
e23195fd86
|
@ -341,7 +341,7 @@ body {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx_HomePage_col mx_HomePage_toprow">
|
||||
<div id="step2_container" class="mx_HomePage_col mx_HomePage_toprow" style="display: none; ">
|
||||
<div class="mx_HomePage_row">
|
||||
<div>
|
||||
<h2>Step 2: Use a custom server</h2>
|
||||
|
@ -373,7 +373,7 @@ body {
|
|||
<div class="mx_HomePage_col mx_HomePage_toprow">
|
||||
<div class="mx_HomePage_row">
|
||||
<div>
|
||||
<h2>Step 3: Register or Log in</h2>
|
||||
<h2 id="step_login_header">Step 2: Register or Log in</h2>
|
||||
<p>Create a new account if you don't have one, or log in to your existing account.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,11 +9,15 @@ async function initPage() {
|
|||
document.getElementById('back_to_riot_button').onclick = onBackToRiotClick;
|
||||
|
||||
const config = await getVectorConfig('..');
|
||||
let hsUrl = 'https://matrix.org/';
|
||||
let hsUrl;
|
||||
if (config && config['default_hs_url']) {
|
||||
hsUrl = config['default_hs_url'];
|
||||
}
|
||||
document.getElementById('hs_url').innerHTML = hsUrl;
|
||||
if (hsUrl && hsUrl !== 'https://matrix.org/') {
|
||||
document.getElementById('step2_container').style.display = 'block';
|
||||
document.getElementById('hs_url').innerHTML = hsUrl;
|
||||
document.getElementById('step_login_header').innerHTML= 'Step 3: Register or Log in';
|
||||
}
|
||||
}
|
||||
|
||||
initPage();
|
||||
|
|
Loading…
Reference in New Issue