about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml8
-rw-r--r--config/locales/simple_form.en.yml2
-rw-r--r--config/navigation.rb1
-rw-r--r--config/routes.rb7
4 files changed, 18 insertions, 0 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a03b12a39..ec08f0d78 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -261,6 +261,14 @@ en:
         expired: Expired
         title: Filter
       title: Invites
+    relays:
+      add_new: Add new relay
+      description_html: A <strong>federation relay</strong> is an intermediary server that exchanges large volumes of public toots between servers that subscribe and publish to it. <strong>It can help small and medium servers discover content from the fediverse</strong>, which would otherwise require local users manually following other people on remote servers.
+      enable_hint: Once enabled, your server will subscribe to all public toots from this relay, and will begin sending this server's public toots to it.
+      inbox_url: Relay URL
+      setup: Setup a relay connection
+      status: Status
+      title: Relays
     report_notes:
       created_msg: Report note successfully created!
       destroyed_msg: Report note successfully deleted!
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
index 7d9a5d617..9ff548f40 100644
--- a/config/locales/simple_form.en.yml
+++ b/config/locales/simple_form.en.yml
@@ -13,6 +13,7 @@ en:
           other: <span class="name-counter">%{count}</span> characters left
         fields: You can have up to 4 items displayed as a table on your profile
         header: PNG, GIF or JPG. At most 2MB. Will be downscaled to 700x335px
+        inbox_url: Copy the URL from the frontpage of the relay you want to use
         irreversible: Filtered toots will disappear irreversibly, even if filter is later removed
         locale: The language of the user interface, e-mails and push notifications
         locked: Requires you to manually approve followers
@@ -52,6 +53,7 @@ en:
         expires_in: Expire after
         fields: Profile metadata
         header: Header
+        inbox_url: URL of the relay inbox
         irreversible: Drop instead of hide
         locale: Interface language
         locked: Lock account
diff --git a/config/navigation.rb b/config/navigation.rb
index 3f2e913c6..a13ad6f43 100644
--- a/config/navigation.rb
+++ b/config/navigation.rb
@@ -36,6 +36,7 @@ SimpleNavigation::Configuration.run do |navigation|
     primary.item :admin, safe_join([fa_icon('cogs fw'), t('admin.title')]), proc { current_user.admin? ? edit_admin_settings_url : admin_custom_emojis_url }, if: proc { current_user.staff? } do |admin|
       admin.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), edit_admin_settings_url, if: -> { current_user.admin? }
       admin.item :custom_emojis, safe_join([fa_icon('smile-o fw'), t('admin.custom_emojis.title')]), admin_custom_emojis_url, highlights_on: %r{/admin/custom_emojis}
+      admin.item :relays, safe_join([fa_icon('exchange fw'), t('admin.relays.title')]), admin_relays_url, if: -> { current_user.admin? }, highlights_on: %r{/admin/relays}
       admin.item :subscriptions, safe_join([fa_icon('paper-plane-o fw'), t('admin.subscriptions.title')]), admin_subscriptions_url, if: -> { current_user.admin? }
       admin.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url, link_html: { target: 'sidekiq' }, if: -> { current_user.admin? }
       admin.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url, link_html: { target: 'pghero' }, if: -> { current_user.admin? }
diff --git a/config/routes.rb b/config/routes.rb
index fd26b4aa7..3d0da1a85 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -131,6 +131,13 @@ Rails.application.routes.draw do
     resource :settings, only: [:edit, :update]
     resources :invites, only: [:index, :create, :destroy]
 
+    resources :relays, only: [:index, :new, :create, :destroy] do
+      member do
+        post :enable
+        post :disable
+      end
+    end
+
     resources :instances, only: [:index] do
       collection do
         post :resubscribe