From 497c647983c740544f6209925fa3b77fa2b76286 Mon Sep 17 00:00:00 2001 From: Janakas Date: Thu, 28 Dec 2017 18:20:15 +0100 Subject: [PATCH] Rearrange userdata-export section and change timestamp to timeago --- app/assets/stylesheets/settings.scss | 4 ++++ app/views/users/_edit.haml | 18 ++++++++---------- config/locales/diaspora/en.yml | 2 +- features/desktop/change_settings.feature | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/settings.scss b/app/assets/stylesheets/settings.scss index 11cb5b13f..15a4c6622 100644 --- a/app/assets/stylesheets/settings.scss +++ b/app/assets/stylesheets/settings.scss @@ -36,3 +36,7 @@ max-width: 100%; min-width: 100%; } + +.account-data h6 { + color: $text-grey; +} diff --git a/app/views/users/_edit.haml b/app/views/users/_edit.haml index 5b6ad6172..f0a141514 100644 --- a/app/views/users/_edit.haml +++ b/app/views/users/_edit.haml @@ -181,35 +181,33 @@ %hr .row - .col-md-6#account_data + .col-md-6.account-data %h3= t(".export_data") + %h4= t("profile") .form-group - if current_user.exporting .export-in-progress= t(".export_in_progress") - elsif current_user.export.present? - = link_to t(".request_export_update"), export_profile_user_path, method: :post, - class: "btn btn-default" - .small-horizontal-spacer = link_to t(".download_export"), download_profile_user_path, class: "btn btn-success" - .small-horizontal-spacer + = link_to t(".request_export_update"), export_profile_user_path, method: :post, + class: "btn btn-default" %h6 - = t(".last_exported_at", timestamp: current_user.exported_at) + = t(".last_exported_html", timeago: timeago(current_user.exported_at)) - else = link_to t(".request_export"), export_profile_user_path, method: :post, class: "btn btn-default" + %h4= t("javascripts.profile.photos") .form-group - if current_user.exporting_photos .export-in-progress= t(".export_photos_in_progress") - elsif current_user.exported_photos_file.present? + = link_to t(".download_export_photos"), download_photos_user_path, class: "btn btn-success" = link_to t(".request_export_photos_update"), export_photos_user_path, method: :post, class: "btn btn-default" - .small-horizontal-spacer - = link_to t(".download_export_photos"), download_photos_user_path, class: "btn btn-success" - .small-horizontal-spacer %h6 - = t(".last_exported_at", timestamp: current_user.exported_photos_at) + = t(".last_exported_html", timeago: timeago(current_user.exported_photos_at)) - else = link_to t(".request_export_photos"), export_photos_user_path, method: :post, class: "btn btn-default" diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 562b52b96..b05035dca 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -1213,7 +1213,7 @@ en: request_export_update: "Refresh my profile data" export_data: "Export data" export_in_progress: "We are currently processing your data. Please check back in a few moments." - last_exported_at: "(Last updated at %{timestamp})" + last_exported_html: "(Last updated %{timeago})" download_export_photos: "Download my photos" request_export_photos: "Request my photos" request_export_photos_update: "Refresh my photos" diff --git a/features/desktop/change_settings.feature b/features/desktop/change_settings.feature index d30f6f137..ce60f7422 100644 --- a/features/desktop/change_settings.feature +++ b/features/desktop/change_settings.feature @@ -55,6 +55,6 @@ Feature: Change settings Then I should see "Public" within ".aspect-dropdown" Scenario: exporting profile data - When I click on the first selector "#account_data a" + When I click on the first selector ".account-data a" Then I should see "Download my profile" And I should have 1 email delivery