mirror of
https://git.asonix.dog/asonix/relay.git
synced 2024-11-26 15:32:18 +00:00
Add note about restricted mode on index page
This commit is contained in:
parent
a2bd41a00f
commit
6125e5e63a
|
@ -1,81 +1,93 @@
|
|||
@use crate::{
|
||||
config::{Config, UrlKind},
|
||||
data::Node,
|
||||
templates::{info, instance, statics::index_css},
|
||||
config::{Config, UrlKind},
|
||||
data::Node,
|
||||
templates::{info, instance, statics::index_css},
|
||||
};
|
||||
|
||||
@(nodes: &[Node], config: &Config)
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>@config.hostname() | ActivityPub Relay</title>
|
||||
<link rel="stylesheet" href="/static/@index_css.name" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="header-text">
|
||||
<h1>@Config::software_name()<span class="smaller">@Config::software_version()</span></h1>
|
||||
<p>on @config.hostname()</p>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<section>
|
||||
<h3>Connected Servers</h3>
|
||||
@if nodes.is_empty() {
|
||||
<p>There are no connected servers at this time.</p>
|
||||
} else {
|
||||
<ul>
|
||||
@for node in nodes {
|
||||
@if let Some(inst) = node.instance.as_ref() {
|
||||
<li>
|
||||
@:instance(inst, node.info.as_ref().map(|info| { info.software.as_ref() }), node.contact.as_ref(), &node.base)
|
||||
</li>
|
||||
} else {
|
||||
@if let Some(inf) = node.info.as_ref() {
|
||||
<li>
|
||||
@:info(inf, &node.base)
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</section>
|
||||
<section>
|
||||
<h3>Joining</h3>
|
||||
<article class="joining">
|
||||
<p>
|
||||
If you are the admin of a server that supports activitypub relays, you can add
|
||||
this relay to your server.
|
||||
</p>
|
||||
<h4>Mastodon</h4>
|
||||
<p>
|
||||
Mastodon admins can add this relay by adding
|
||||
<pre>@config.generate_url(UrlKind::Inbox)</pre> in their relay settings.
|
||||
</p>
|
||||
<h4>Pleroma</h4>
|
||||
<p>
|
||||
Pleroma admins can add this relay by adding
|
||||
<pre>@config.generate_url(UrlKind::Actor)</pre>
|
||||
to their relay settings (I don't actually know how pleroma handles adding
|
||||
relays, is it still a mix command?).
|
||||
</p>
|
||||
<h4>Others</h4>
|
||||
<p>
|
||||
Consult the documentation for your server. It's likely that it follows either
|
||||
Mastodon or Pleroma's relay formatting.
|
||||
</p>
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<p>
|
||||
The source code for this project can be found at
|
||||
<a href="@config.source_code()">@config.source_code()</a>
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
<head lang="en">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>@config.hostname() | ActivityPub Relay</title>
|
||||
<link rel="stylesheet" href="/static/@index_css.name" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<div class="header-text">
|
||||
<h1>@Config::software_name()<span class="smaller">@Config::software_version()</span></h1>
|
||||
<p>on @config.hostname()</p>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<section>
|
||||
<h3>Connected Servers</h3>
|
||||
@if nodes.is_empty() {
|
||||
<p>There are no connected servers at this time.</p>
|
||||
} else {
|
||||
<ul>
|
||||
@for node in nodes {
|
||||
@if let Some(inst) = node.instance.as_ref() {
|
||||
<li>
|
||||
@:instance(inst, node.info.as_ref().map(|info| { info.software.as_ref() }), node.contact.as_ref(), &node.base)
|
||||
</li>
|
||||
} else {
|
||||
@if let Some(inf) = node.info.as_ref() {
|
||||
<li>
|
||||
@:info(inf, &node.base)
|
||||
</li>
|
||||
}
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</section>
|
||||
<section>
|
||||
<h3>Joining</h3>
|
||||
<article class="joining">
|
||||
@if config.restricted_mode() {
|
||||
<h4>
|
||||
This relay is Restricted
|
||||
</h4>
|
||||
<p>
|
||||
This relay is currently in Restricted Mode, which means servers need to be approved ahead of time by the relay
|
||||
administrator. Please contact the admin before attempting to join.
|
||||
</p>
|
||||
}
|
||||
<p>
|
||||
If you are the admin of a server that supports activitypub relays, you can add
|
||||
this relay to your server.
|
||||
</p>
|
||||
<h4>Mastodon</h4>
|
||||
<p>
|
||||
Mastodon admins can add this relay by adding
|
||||
<pre>@config.generate_url(UrlKind::Inbox)</pre> in their relay settings.
|
||||
</p>
|
||||
<h4>Pleroma</h4>
|
||||
<p>
|
||||
Pleroma admins can add this relay by adding
|
||||
<pre>@config.generate_url(UrlKind::Actor)</pre>
|
||||
to their relay settings (I don't actually know how pleroma handles adding
|
||||
relays, is it still a mix command?).
|
||||
</p>
|
||||
<h4>Others</h4>
|
||||
<p>
|
||||
Consult the documentation for your server. It's likely that it follows either
|
||||
Mastodon or Pleroma's relay formatting.
|
||||
</p>
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<p>
|
||||
The source code for this project can be found at
|
||||
<a href="@config.source_code()">@config.source_code()</a>
|
||||
</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue
Block a user