fix: Use server name in index again
This commit is contained in:
parent
07a935f625
commit
b885e206ce
3 changed files with 4 additions and 14 deletions
|
|
@ -16,22 +16,12 @@ async fn index_handler(
|
|||
#[derive(Debug, Template)]
|
||||
#[template(path = "index.html.j2")]
|
||||
struct Index<'a> {
|
||||
client_domain: &'a str,
|
||||
server_name: &'a str,
|
||||
first_run: bool,
|
||||
}
|
||||
|
||||
let client_domain = services.config.get_client_domain();
|
||||
let host = client_domain
|
||||
.host_str()
|
||||
.expect("client domain should have a host");
|
||||
let client_domain = if let Some(port) = client_domain.port() {
|
||||
&format!("{host}:{port}")
|
||||
} else {
|
||||
host
|
||||
};
|
||||
|
||||
let template = Index {
|
||||
client_domain,
|
||||
server_name: services.globals.server_name().as_str(),
|
||||
first_run: services.firstrun.is_first_run(),
|
||||
};
|
||||
Ok(Html(template.render()?))
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<input
|
||||
type="{{ input.input_type }}"
|
||||
id="{{ input.id }}"
|
||||
autocomplete="{{ input.autocomplete }}
|
||||
autocomplete="{{ input.autocomplete }}"
|
||||
{% if input.type_name.is_some() %}name="{{ input.id }}"{% endif %}
|
||||
{% if input.required %}required{% endif %}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<p>To get started, <em>check the server logs</em> for instructions on how to create the first account.</p>
|
||||
<p>For support, take a look at the <a href="https://continuwuity.org/introduction">documentation</a> or join the <a href="https://matrix.to/#/#continuwuity:continuwuity.org?via=continuwuity.org&via=ellis.link&via=explodie.org&via=matrix.org">Continuwuity Matrix room</a>.</p>
|
||||
{%- else %}
|
||||
<p>To get started, <a href="https://matrix.org/ecosystem/clients">choose a client</a> and connect to <code>{{ client_domain }}</code>.</p>
|
||||
<p>To get started, <a href="https://matrix.org/ecosystem/clients">choose a client</a> and connect to <code>{{ server_name }}</code>.</p>
|
||||
{%- endif %}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue