From 6125e5e63ae8a4e65131c35d14edea8a9bd78961 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 2 Nov 2022 14:16:32 -0500 Subject: [PATCH] Add note about restricted mode on index page --- templates/index.rs.html | 158 +++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 73 deletions(-) diff --git a/templates/index.rs.html b/templates/index.rs.html index 8e16464..b0c28f9 100644 --- a/templates/index.rs.html +++ b/templates/index.rs.html @@ -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) - - - - @config.hostname() | ActivityPub Relay - - - -
-
-

@Config::software_name()@Config::software_version()

-

on @config.hostname()

-
-
-
-
-

Connected Servers

- @if nodes.is_empty() { -

There are no connected servers at this time.

- } else { -
    - @for node in nodes { - @if let Some(inst) = node.instance.as_ref() { -
  • - @:instance(inst, node.info.as_ref().map(|info| { info.software.as_ref() }), node.contact.as_ref(), &node.base) -
  • - } else { - @if let Some(inf) = node.info.as_ref() { -
  • - @:info(inf, &node.base) -
  • - } - } - } -
- } -
-
-

Joining

-
-

- If you are the admin of a server that supports activitypub relays, you can add - this relay to your server. -

-

Mastodon

-

- Mastodon admins can add this relay by adding -

@config.generate_url(UrlKind::Inbox)
in their relay settings. -

-

Pleroma

-

- Pleroma admins can add this relay by adding -

@config.generate_url(UrlKind::Actor)
- to their relay settings (I don't actually know how pleroma handles adding - relays, is it still a mix command?). -

-

Others

-

- Consult the documentation for your server. It's likely that it follows either - Mastodon or Pleroma's relay formatting. -

-
-
-
- - + + + + + @config.hostname() | ActivityPub Relay + + + + +
+
+

@Config::software_name()@Config::software_version()

+

on @config.hostname()

+
+
+
+
+

Connected Servers

+ @if nodes.is_empty() { +

There are no connected servers at this time.

+ } else { +
    + @for node in nodes { + @if let Some(inst) = node.instance.as_ref() { +
  • + @:instance(inst, node.info.as_ref().map(|info| { info.software.as_ref() }), node.contact.as_ref(), &node.base) +
  • + } else { + @if let Some(inf) = node.info.as_ref() { +
  • + @:info(inf, &node.base) +
  • + } + } + } +
+ } +
+
+

Joining

+
+ @if config.restricted_mode() { +

+ This relay is Restricted +

+

+ 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. +

+ } +

+ If you are the admin of a server that supports activitypub relays, you can add + this relay to your server. +

+

Mastodon

+

+ Mastodon admins can add this relay by adding +

@config.generate_url(UrlKind::Inbox)
in their relay settings. +

+

Pleroma

+

+ Pleroma admins can add this relay by adding +

@config.generate_url(UrlKind::Actor)
+ to their relay settings (I don't actually know how pleroma handles adding + relays, is it still a mix command?). +

+

Others

+

+ Consult the documentation for your server. It's likely that it follows either + Mastodon or Pleroma's relay formatting. +

+
+
+
+ + +