diff options
author | Eugen <eugen@zeonfederated.com> | 2017-04-24 00:38:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-24 00:38:37 +0200 |
commit | 501514960a9de238e23cd607d2e8f4c1ff9f16c1 (patch) | |
tree | cf15e7726e7dfda032502c237af4e91cc92ed46a /app/views/settings | |
parent | ef5937da1ff2d6caca244439dd9b9b9ed85fb278 (diff) |
Followers-only post federation (#2111)
* Make private toots get PuSHed to subscription URLs that belong to domains where you have approved followers * Authorized followers controller, stub for bulk action * Soft block in the background * Add simple test for new controller * Rename Settings::FollowersController to Settings::FollowerDomainsController, paginate results, rename "private" post setting to "followers-only", fix pagination style, improve post privacy preferences style, improve warning style * Extract compose form warnings into own container, show warning when posting to followers-only with unlocked account
Diffstat (limited to 'app/views/settings')
-rw-r--r-- | app/views/settings/follower_domains/show.html.haml | 33 | ||||
-rw-r--r-- | app/views/settings/preferences/show.html.haml | 2 |
2 files changed, 34 insertions, 1 deletions
diff --git a/app/views/settings/follower_domains/show.html.haml b/app/views/settings/follower_domains/show.html.haml new file mode 100644 index 000000000..dad2770f1 --- /dev/null +++ b/app/views/settings/follower_domains/show.html.haml @@ -0,0 +1,33 @@ +- content_for :page_title do + = t('settings.followers') + += form_tag settings_follower_domains_path, method: :patch, class: 'table-form' do + - unless @account.locked? + .warning + %strong + = fa_icon('warning') + = t('followers.unlocked_warning_title') + = t('followers.unlocked_warning_html', lock_link: link_to(t('followers.lock_link'), settings_profile_url)) + + %p= t('followers.explanation_html') + %p= t('followers.true_privacy_html') + + %table.table + %thead + %tr + %th + %th= t('followers.domain') + %th= t('followers.followers_count') + %tbody + - @domains.each do |domain| + %tr + %td + = check_box_tag 'select[]', domain.domain, false, disabled: !@account.locked? unless domain.domain.nil? + %td + %samp= domain.domain.presence || Rails.configuration.x.local_domain + %td= number_with_delimiter domain.accounts_from_domain + + .action-pagination + .actions + = button_tag t('followers.purge'), type: :submit, class: 'button', disabled: !@account.locked? + = paginate @domains diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index d009e51ec..8a4113ab4 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -7,7 +7,7 @@ .fields-group = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| human_locale(locale) } - = f.input :setting_default_privacy, collection: Status.visibilities.keys - ['direct'], wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| I18n.t("statuses.visibilities.#{visibility}") }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + = f.input :setting_default_privacy, collection: Status.visibilities.keys - ['direct'], wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| safe_join([I18n.t("statuses.visibilities.#{visibility}"), content_tag(:span, I18n.t("statuses.visibilities.#{visibility}_long"), class: 'hint')]) }, required: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' .fields-group = f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff| |