Minor verbiage updates

pull/1589/head
Rick Carlino 2019-11-23 10:03:04 -06:00
parent 18cb99f1f3
commit 71a5c5c122
5 changed files with 13 additions and 2 deletions

View File

@ -107,6 +107,9 @@ class DashboardController < ApplicationController
render json: ""
end
def logout
end
private
def load_css_assets

View File

@ -0,0 +1,6 @@
<script>
localStorage.clear();
location.assign("/");
</script>
Redirecting to the <%= link_to "FarmBot Web App", front_page_url %>.

View File

@ -1 +1 @@
You have not logged into your <%= link_to "FarmBot Web App", front_page_url %> account in <%= time_ago_in_words(@user.last_sign_in_at) %>. If you do not login within the next 14 days, your account will be automatically deleted. If you wish to keep your account, please <%= link_to "login now", front_page_url %>.
You have not logged into the <%= link_to "FarmBot Web App", logout_url %> account for <%= @user.email %> in <%= time_ago_in_words(@user.last_sign_in_at) %>. If you do not login within the next 14 days, your account will be automatically deleted. If you wish to keep your account, please <%= link_to "login now", logout_url %>.

View File

@ -106,6 +106,7 @@ FarmBot::Application.routes.draw do
# NON-API (USER FACING) URLS:
# =======================================================================
get "/" => "dashboard#front_page", as: :front_page
get "/logout" => "dashboard#logout", as: :logout
get "/app" => "dashboard#main_app", as: :dashboard
get "/app/controls" => "dashboard#main_app", as: :app_landing_page

View File

@ -21,7 +21,8 @@ describe InactiveAccountJob do
expect(mail.to).to include(yes.email)
subject = "Your FarmBot account will be deleted due to inactivity"
expect(mail.subject).to include(subject)
expect(mail.body.encoded).to include("You have not logged in about 3 years.")
expect(mail.body.encoded).to include("in about 3 years.")
expect(mail.body.encoded).to include(yes.email)
# === Wind back the clock to simulate inactivty.
yes.update!(inactivity_warning_sent_at: 15.days.ago)