diff --git a/Changelog.md b/Changelog.md index 0e83f41fc..6dbf4de3c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ ## Bug fixes ## Features +* Suppoert ignore users on mobile [#7884](https://github.com/diaspora/diaspora/pull/7884) # 0.7.8.0 diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index 6447df013..f8b22d5f7 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -350,6 +350,7 @@ footer { } .bottom-bar { + margin: 0; position: static; } } @@ -694,6 +695,21 @@ select#aspect_ids_ { .entypo-camera { margin-right: 0; } } +.mobile-icon-bar { + background: $framed-background; + border-top: 1px solid $border-grey; + display: block; + padding: 1px 6px; + position: relative; +} + +.mobile-icon-bar-button { + color: $text-grey; + float: right; + font-size: large; + padding: 0; +} + #publisher-textarea-wrapper { border-radius: 2px; margin: 12px 0px; diff --git a/app/controllers/blocks_controller.rb b/app/controllers/blocks_controller.rb index 7256a38c8..39d8cb91c 100644 --- a/app/controllers/blocks_controller.rb +++ b/app/controllers/blocks_controller.rb @@ -10,6 +10,7 @@ class BlocksController < ApplicationController respond_to do |format| format.json { head :no_content } + format.any { redirect_back fallback_location: root_path } end end diff --git a/app/views/people/show.mobile.haml b/app/views/people/show.mobile.haml index f35f81cfc..4d8f1deae 100644 --- a/app/views/people/show.mobile.haml +++ b/app/views/people/show.mobile.haml @@ -10,7 +10,23 @@ %span.description = @person.diaspora_handle - if user_signed_in? && @person != current_user.person - = render 'aspect_memberships/aspect_membership_dropdown' + - if @presenter.full_hash[:block] + .pull-right + = link_to t("users.privacy_settings.stop_ignoring"), + block_path(@presenter.full_hash[:block][:id]), + class: "btn btn-danger", + method: :delete + - else + = render "aspect_memberships/aspect_membership_dropdown" + .clear + - if user_signed_in? && @person != current_user.person && !@presenter.full_hash[:block] + .mobile-icon-bar + = link_to "", + blocks_path(block: {person_id: @person.id}), + data: {confirm: t("are_you_sure_ignore_user")}, + method: :post, + confirm: true, + class: "btn entypo-block shield mobile-icon-bar-button" .clear .bottom-bar - if !@person.tag_string.blank? && user_signed_in? diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index fe86d2fa4..7b93ab90f 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -20,6 +20,7 @@ en: email: "Email" are_you_sure: "Are you sure?" are_you_sure_delete_account: "Are you sure you want to close your account? This can’t be undone!" + are_you_sure_ignore_user: "You are going to ignore that user. Are you sure?" fill_me_out: "Fill me out" public: "Public" limited: "Limited"