Change: 単方向の承認だけでフレンドサーバーが有効になるようにする (#74)
* Test: テストを先に作成 * Fix: テスト不備 * Wip: フレンドサーバーのテストを修正 * Wip: エラーを修正 * 項目のラベリングを修正 * 新しい設定が変更できないのを修正 * Wip: 削除時の処理を修正 * フレンド自動承認設定を削除 * Fix: 申請を受けたドメインのINBOXが空になる問題 * Change: #75 フレンドでないサーバーからのローカル公開を未収載に変換 (#77)
This commit is contained in:
parent
521932c802
commit
1eb2d78b5d
24 changed files with 314 additions and 126 deletions
|
@ -7,7 +7,7 @@
|
|||
= t 'admin.friend_servers.disabled'
|
||||
%samp= friend.domain
|
||||
%td
|
||||
- if friend.i_am_accepted?
|
||||
- if friend.accepted?
|
||||
%span.positive-hint
|
||||
= fa_icon('check')
|
||||
= ' '
|
||||
|
@ -16,21 +16,11 @@
|
|||
= fa_icon('hourglass')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.pending'
|
||||
- else
|
||||
%span.negative-hint
|
||||
= fa_icon('times')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.disabled'
|
||||
%td
|
||||
- if friend.they_are_accepted?
|
||||
%span.positive-hint
|
||||
= fa_icon('check')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.enabled'
|
||||
- elsif friend.they_are_pending?
|
||||
= fa_icon('hourglass')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.pending'
|
||||
%span.warning-hint
|
||||
= fa_icon('hourglass')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.pending_you'
|
||||
- else
|
||||
%span.negative-hint
|
||||
= fa_icon('times')
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
.fields-group
|
||||
= f.input :available, as: :boolean, wrapper: :with_label, label: t('admin.friend_servers.edit.available')
|
||||
|
||||
.fields-group
|
||||
= f.input :delivery_local, as: :boolean, wrapper: :with_label, label: t('admin.friend_servers.edit.delivery_local'), hint: t('admin.friend_servers.edit.delivery_local_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :pseudo_relay, as: :boolean, wrapper: :with_label, label: t('admin.friend_servers.edit.pseudo_relay'), hint: t('admin.friend_servers.edit.pseudo_relay_hint')
|
||||
|
||||
.fields-group
|
||||
= f.input :unlocked, as: :boolean, wrapper: :with_label, label: t('admin.friend_servers.edit.unlocked')
|
||||
|
||||
.fields-group
|
||||
= f.input :allow_all_posts, as: :boolean, wrapper: :with_label, label: t('admin.friend_servers.edit.allow_all_posts'), hint: t('admin.friend_servers.edit.allow_all_posts_hint')
|
||||
|
|
|
@ -6,35 +6,14 @@
|
|||
= render 'friend_fields', f: f, friend: @friend
|
||||
|
||||
.fields-group
|
||||
%h4= t('admin.friend_servers.active_status')
|
||||
%h4= t('admin.friend_servers.status')
|
||||
.fields-group
|
||||
- if @friend.i_am_accepted?
|
||||
- if @friend.accepted?
|
||||
%span.positive-hint
|
||||
= fa_icon('check')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.enabled'
|
||||
- elsif @friend.i_am_pending?
|
||||
= fa_icon('hourglass')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.pending'
|
||||
- else
|
||||
%span.negative-hint
|
||||
= fa_icon('times')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.disabled'
|
||||
.action-buttons
|
||||
%div
|
||||
= link_to t('admin.friend_servers.follow'), follow_admin_friend_server_path(@friend), class: 'button', method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if @friend.i_am_idle? || @friend.i_am_rejected?
|
||||
= link_to t('admin.friend_servers.unfollow'), unfollow_admin_friend_server_path(@friend), class: 'button', method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if @friend.i_am_pending? || @friend.i_am_accepted?
|
||||
|
||||
%h4= t('admin.friend_servers.passive_status')
|
||||
.fields-gtoup
|
||||
- if @friend.they_are_accepted?
|
||||
%span.positive-hint
|
||||
= fa_icon('check')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.enabled'
|
||||
- elsif @friend.they_are_pending?
|
||||
- elsif @friend.pending?
|
||||
= fa_icon('hourglass')
|
||||
= ' '
|
||||
= t 'admin.friend_servers.pending'
|
||||
|
@ -45,6 +24,7 @@
|
|||
= t 'admin.friend_servers.disabled'
|
||||
.action-buttons
|
||||
%div
|
||||
= link_to t('admin.friend_servers.follow'), follow_admin_friend_server_path(@friend), class: 'button', method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if @friend.idle?
|
||||
= link_to t('admin.friend_servers.accept'), accept_admin_friend_server_path(@friend), class: 'button', method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if @friend.they_are_pending?
|
||||
= link_to t('admin.friend_servers.reject'), reject_admin_friend_server_path(@friend), class: 'button', method: :post, data: { confirm: t('admin.accounts.are_you_sure') } if @friend.they_are_pending?
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
%thead
|
||||
%tr
|
||||
%th= t('admin.friend_servers.domain')
|
||||
%th= t('admin.friend_servers.active_status')
|
||||
%th= t('admin.friend_servers.passive_status')
|
||||
%th= t('admin.friend_servers.status')
|
||||
%th
|
||||
%tbody
|
||||
- @friends.each do |friend|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue