Merge pull request #8407 from Flaburgan/4821-help-mobile

Tell users that there is no help in mobile version, allow to switch to desktop
This commit is contained in:
Benjamin Neff 2022-11-04 02:06:47 +01:00
commit b0b2083fea
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
5 changed files with 15 additions and 7 deletions

View file

@ -68,6 +68,7 @@ We use yarn to install the frontend dependencies now, so you need to have that i
* Show total and active pods count in the pods list for podmins [#8383](https://github.com/diaspora/diaspora/pull/8383)
* Allow to select multiple aspects when posting on mobile [#8217](https://github.com/diaspora/diaspora/pull/8217)
* Add info links to drawer in mobile UI [#8405](https://github.com/diaspora/diaspora/pull/8405)
* Tell users that there is no help in mobile version, allow to switch to desktop [#8407](https://github.com/diaspora/diaspora/pull/8407)
# 0.7.18.1

View file

@ -2,4 +2,6 @@
= t(".pod_network")
.alert.alert-warning
!= t(".pod_desktop_view", desktop_link: link_to(t(".pod_desktop_link"), toggle_mobile_path))
!= t("error_messages.mobile_not_available",
desktop_link: link_to(t("error_messages.desktop_view_link"),
toggle_mobile_path))

View file

@ -0,0 +1,6 @@
%h1= t("_help")
.alert.alert-warning
!= t("error_messages.mobile_not_available",
desktop_link: link_to(t("error_messages.desktop_view_link"),
toggle_mobile_path))

View file

@ -89,6 +89,8 @@ en:
correct_the_following_errors_and_try_again: "Correct the following errors and try again."
need_javascript: "This website requires JavaScript to function properly. If you disabled JavaScript, please enable it and refresh this page."
csrf_token_fail: "The CSRF token is invalid. Please sign in and try again."
mobile_not_available: "This page is not available on mobile view, please switch to %{desktop_link}."
desktop_view_link: "desktop view"
admins:
admin_bar:
@ -192,8 +194,6 @@ en:
tag_name: "Tag name: %{name_tag} Count: %{count_tag}"
pods:
pod_network: "Pod network"
pod_desktop_view: "This page is not available on mobile view, please switch to %{desktop_link}."
pod_desktop_link: "desktop view"
aspects:
edit:
confirm_remove_aspect: "Are you sure you want to delete this aspect?"

View file

@ -7,10 +7,9 @@ describe HelpController, type: :controller do
expect(response).to be_successful
end
it "fails on mobile" do
expect {
get :faq, format: :mobile
}.to raise_error ActionController::UnknownFormat
it "succeeds on mobile" do
get :faq, format: :mobile
expect(response).to be_successful
end
end
end