Skip to content

Commit e23195f

Browse files
committed
Conditionally show custom server bit
1 parent 9c8ef42 commit e23195f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/vector/mobile_guide/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h3 class="mx_Spacer">Android</h3>
341341
</div>
342342
</div>
343343
</div>
344-
<div class="mx_HomePage_col mx_HomePage_toprow">
344+
<div id="step2_container" class="mx_HomePage_col mx_HomePage_toprow" style="display: none; ">
345345
<div class="mx_HomePage_row">
346346
<div>
347347
<h2>Step 2: Use a custom server</h2>
@@ -373,7 +373,7 @@ <h2>Step 2: Use a custom server</h2>
373373
<div class="mx_HomePage_col mx_HomePage_toprow">
374374
<div class="mx_HomePage_row">
375375
<div>
376-
<h2>Step 3: Register or Log in</h2>
376+
<h2 id="step_login_header">Step 2: Register or Log in</h2>
377377
<p>Create a new account if you don&apos;t have one, or log in to your existing account.</p>
378378
</div>
379379
</div>

src/vector/mobile_guide/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ async function initPage() {
99
document.getElementById('back_to_riot_button').onclick = onBackToRiotClick;
1010

1111
const config = await getVectorConfig('..');
12-
let hsUrl = 'https://matrix.org/';
12+
let hsUrl;
1313
if (config && config['default_hs_url']) {
1414
hsUrl = config['default_hs_url'];
1515
}
16-
document.getElementById('hs_url').innerHTML = hsUrl;
16+
if (hsUrl && hsUrl !== 'https://matrix.org/') {
17+
document.getElementById('step2_container').style.display = 'block';
18+
document.getElementById('hs_url').innerHTML = hsUrl;
19+
document.getElementById('step_login_header').innerHTML= 'Step 3: Register or Log in';
20+
}
1721
}
1822

1923
initPage();

0 commit comments

Comments
 (0)