Add federation relay support (#7998)
* Add federation relay support * Add admin UI for managing relays * Include actor on relay-related activities * Fix i18n
This commit is contained in:
parent
401559c376
commit
e55dce3176
23 changed files with 309 additions and 8 deletions
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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? }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue