diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 98dc8071..de002cbe 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -90,6 +90,13 @@ hr { text-align:center; } } + .flex { + display: flex; width: 100%;column-gap: 10px; + @media screen and (max-width: 767px) { + display: block; + column-gap: 0px; + } + } } .s-inspiration { diff --git a/app/controllers/entries_controller.rb b/app/controllers/entries_controller.rb index 41ffa692..6c7ac395 100644 --- a/app/controllers/entries_controller.rb +++ b/app/controllers/entries_controller.rb @@ -265,8 +265,12 @@ def review { name: sentiment, data: base_data.merge(data) } end end + elsif current_user.entries.any? + prev_year = current_user.entries.first.date.year.to_s + flash[:alert] = "No entries in #{@year} - sending you back to #{prev_year}" + redirect_to review_path(prev_year) else - flash[:notice] = "No entries in #{@year} - nothing to review :(" + flash[:alert] = "No entries to review :(" redirect_to entries_path end end diff --git a/app/views/devise/registrations/_user_settings.html.haml b/app/views/devise/registrations/_user_settings.html.haml index 68ce0997..4a8b78f6 100644 --- a/app/views/devise/registrations/_user_settings.html.haml +++ b/app/views/devise/registrations/_user_settings.html.haml @@ -25,7 +25,8 @@ %em{style: "color: #666;"} %span<> Visit = link_to "Account Security", security_path, class: "s-delete", style: "opacity: 100%;margin-left: 5px;" - to change your email, password, two-factor settings, or delete your account. + to change your email, password, + =link_to("two-factor authentication", user_otp_token_path, class: "s-delete", style: "opacity: 100%;") + ", or delete your account." %br .col-md-8.col-md-offset-2 diff --git a/app/views/devise/registrations/security.html.haml b/app/views/devise/registrations/security.html.haml index f69d4644..b9feeeb3 100644 --- a/app/views/devise/registrations/security.html.haml +++ b/app/views/devise/registrations/security.html.haml @@ -26,7 +26,7 @@ %br .col-md-8.col-md-offset-2 - %strong= link_to (resource.otp_enabled? ? "✅ Change Two-Factor Authentication" : "⚠️ Setup Two-Factor Authentication"), "users/otp/token" + %strong= link_to (resource.otp_enabled? ? "✅ Change Two-Factor Authentication" : "⚠️ Setup Two-Factor Authentication"), user_otp_token_path %br %br diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml index 009f1a7d..e334e248 100644 --- a/app/views/shared/_footer.html.haml +++ b/app/views/shared/_footer.html.haml @@ -1,8 +1,8 @@ %footer.footer .container %hr - .row - .col-sm-5 + .flex + %div{style: "flex: none;"} %p.muted.float-left =link_to "CONTACT & FAQS", faqs_path, title: "Contact & FAQs"  ·  @@ -12,8 +12,13 @@ -if current_user && current_user.is_free?  ·  =link_to "SUBSCRIBE TO PRO", subscribe_path, title: "Subscribe Now" - .col-sm-2 - .col-sm-5 + %div.muted{style: "font-size: 13px; flex: 1 1 0%;text-align: center;margin-bottom: 10px;"} + - two_factor_marketing = !current_user.otp_enabled? && current_user.created_at < 1.day.ago && Date.today.between?(Date.parse("2024-01-15"), Date.parse("2024-02-15")) + - if two_factor_marketing + %span.label.label-default{style: "margin-right: 4px; position: relative;top:-2px;font-weight: normal; font-size: 10px; font-family: sans-serif;padding: 3px 5px;"} NEW + Protect your account by setting up + = link_to("two-factor authentication", user_otp_token_path, style: "color: #649cc7") + "." + %div{style: "flex: none;"} %p.muted.float-right    = link_to 'https://paularterburn.com/', title: "Made by Paul Arterburn" do