diff --git a/.env.example b/.env.example index c6fc1173f..0f33b8eb9 100644 --- a/.env.example +++ b/.env.example @@ -62,6 +62,10 @@ POSTGRES_USER=postgres # This is the domain that your Sure instance will be hosted at. It is used to generate links in emails and other places. APP_DOMAIN= +# Product/Brand Name +PRODUCT_NAME= +BRAND_NAME= + # Disable enforcing SSL connections # DISABLE_SSL=true diff --git a/app/assets/images/apple-logo.png b/app/assets/images/apple-logo.png deleted file mode 100644 index 107a7858e..000000000 Binary files a/app/assets/images/apple-logo.png and /dev/null differ diff --git a/app/assets/images/empower-logo.jpeg b/app/assets/images/empower-logo.jpeg deleted file mode 100644 index 7193dcc29..000000000 Binary files a/app/assets/images/empower-logo.jpeg and /dev/null differ diff --git a/app/assets/images/logo-color.png b/app/assets/images/logo-color.png index f536c33e4..c5ef890f7 100644 Binary files a/app/assets/images/logo-color.png and b/app/assets/images/logo-color.png differ diff --git a/app/assets/images/logomark-color.svg b/app/assets/images/logomark-color.svg index d7556c509..3eec59196 100644 --- a/app/assets/images/logomark-color.svg +++ b/app/assets/images/logomark-color.svg @@ -1,35 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + \ No newline at end of file diff --git a/app/assets/images/logomark.svg b/app/assets/images/logomark.svg index 332f7bd32..a8f2dc7d2 100644 --- a/app/assets/images/logomark.svg +++ b/app/assets/images/logomark.svg @@ -1,36 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bfd6bc208..3bb144300 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,6 +1,14 @@ module ApplicationHelper include Pagy::Frontend + def product_name + Rails.configuration.x.product_name + end + + def brand_name + Rails.configuration.x.brand_name + end + def styled_form_with(**options, &block) options[:builder] = StyledFormBuilder form_with(**options, &block) diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 7ab4f5d27..cbf81594b 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,25 @@ class ApplicationMailer < ActionMailer::Base - default from: email_address_with_name(ENV.fetch("EMAIL_SENDER", "sender@sure.local"), "Sure Finance") + default from: email_address_with_name( + ENV.fetch("EMAIL_SENDER", "sender@sure.local"), + "#{Rails.configuration.x.brand_name} #{Rails.configuration.x.product_name}" + ) layout "mailer" + + before_action :assign_branding + + helper_method :product_name, :brand_name + + private + def assign_branding + @product_name = product_name + @brand_name = brand_name + end + + def product_name + Rails.configuration.x.product_name + end + + def brand_name + Rails.configuration.x.brand_name + end end diff --git a/app/mailers/email_confirmation_mailer.rb b/app/mailers/email_confirmation_mailer.rb index 3ad99b965..dafea19e9 100644 --- a/app/mailers/email_confirmation_mailer.rb +++ b/app/mailers/email_confirmation_mailer.rb @@ -6,7 +6,7 @@ class EmailConfirmationMailer < ApplicationMailer # def confirmation_email @user = params[:user] - @subject = t(".subject") + @subject = t(".subject", product_name: product_name) @cta = t(".cta") @confirmation_url = new_email_confirmation_url(token: @user.generate_token_for(:email_confirmation)) diff --git a/app/mailers/invitation_mailer.rb b/app/mailers/invitation_mailer.rb index d43a42fe6..9b90676c5 100644 --- a/app/mailers/invitation_mailer.rb +++ b/app/mailers/invitation_mailer.rb @@ -5,7 +5,11 @@ class InvitationMailer < ApplicationMailer mail( to: @invitation.email, - subject: t(".subject", inviter: @invitation.inviter.display_name) + subject: t( + ".subject", + inviter: @invitation.inviter.display_name, + product: product_name + ) ) end end diff --git a/app/mailers/password_mailer.rb b/app/mailers/password_mailer.rb index 8bacfbfab..d842c8985 100644 --- a/app/mailers/password_mailer.rb +++ b/app/mailers/password_mailer.rb @@ -1,7 +1,7 @@ class PasswordMailer < ApplicationMailer def password_reset @user = params[:user] - @subject = t(".subject") + @subject = t(".subject", product_name: product_name) @cta = t(".cta") mail to: @user.email, subject: @subject diff --git a/app/models/demo/generator.rb b/app/models/demo/generator.rb index e45771dfa..6e623cdcd 100644 --- a/app/models/demo/generator.rb +++ b/app/models/demo/generator.rb @@ -146,10 +146,6 @@ class Demo::Generator raise ActiveRecord::RecordNotFound, "No admin user with email #{email} found in family ##{family.id}" end - def partner_email_for(email) - "partner_#{email}" - end - def create_family_and_users!(family_name, email, onboarded:, subscribed:) family = Family.create!( name: family_name, diff --git a/app/models/provider/simplefin.rb b/app/models/provider/simplefin.rb index 264f0aa30..eca6e77fe 100644 --- a/app/models/provider/simplefin.rb +++ b/app/models/provider/simplefin.rb @@ -1,7 +1,7 @@ class Provider::Simplefin include HTTParty - headers "User-Agent" => "Sure Finance SimpleFin Client" + headers "User-Agent" => "#{Rails.configuration.x.product_name} Finance SimpleFin Client" default_options.merge!(verify: true, ssl_verify_mode: :peer) def initialize diff --git a/app/views/accounts/_account_sidebar_tabs.html.erb b/app/views/accounts/_account_sidebar_tabs.html.erb index e3f44c671..8aba2d7c9 100644 --- a/app/views/accounts/_account_sidebar_tabs.html.erb +++ b/app/views/accounts/_account_sidebar_tabs.html.erb @@ -12,7 +12,7 @@ <%= icon("chevron-down", color: "warning", class: "group-open:transform group-open:rotate-180") %>
-

Sure uses third party providers to fetch historical exchange rates, security prices, and more. This data is required to calculate accurate historical account balances.

+

<%= product_name %> uses third party providers to fetch historical exchange rates, security prices, and more. This data is required to calculate accurate historical account balances.

<%= link_to "Configure your providers here.", settings_hosting_path, class: "text-yellow-600 underline" %> diff --git a/app/views/doorkeeper/authorizations/new.html.erb b/app/views/doorkeeper/authorizations/new.html.erb index 6bd9859dd..c925ec722 100644 --- a/app/views/doorkeeper/authorizations/new.html.erb +++ b/app/views/doorkeeper/authorizations/new.html.erb @@ -71,6 +71,6 @@

- By authorizing, you allow this app to access your Sure data according to the permissions above. + By authorizing, you allow this app to access your <%= product_name %> data according to the permissions above.

diff --git a/app/views/import/confirms/_mappings.html.erb b/app/views/import/confirms/_mappings.html.erb index bd27ff328..2bb31ee8f 100644 --- a/app/views/import/confirms/_mappings.html.erb +++ b/app/views/import/confirms/_mappings.html.erb @@ -43,7 +43,7 @@

<%= t(".csv_mapping_label", mapping: mapping_label(mapping_class)) %>

-

<%= t(".maybe_mapping_label", mapping: mapping_label(mapping_class)) %>

+

<%= t(".sure_mapping_label", mapping: mapping_label(mapping_class), product_name: product_name) %>

<%= t(".rows_label") %>

diff --git a/app/views/invitation_mailer/invite_email.html.erb b/app/views/invitation_mailer/invite_email.html.erb index 04a702914..0f45f9d44 100644 --- a/app/views/invitation_mailer/invite_email.html.erb +++ b/app/views/invitation_mailer/invite_email.html.erb @@ -1,9 +1,12 @@ -

<%= t(".greeting") %>

+

<%= t(".greeting", product: product_name) %>

- <%= t(".body", + <%= t( + ".body", inviter: @invitation.inviter.display_name, - family: @invitation.family.name).html_safe %> + family: @invitation.family.name, + product: product_name + ).html_safe %>

<%= link_to t(".accept_button"), @accept_url, class: "button" %> diff --git a/app/views/invitations/new.html.erb b/app/views/invitations/new.html.erb index 6968f72dc..9dfebe959 100644 --- a/app/views/invitations/new.html.erb +++ b/app/views/invitations/new.html.erb @@ -1,5 +1,5 @@ <%= render DS::Dialog.new do |dialog| %> - <% dialog.with_header(title: t(".title"), subtitle: t(".subtitle")) %> + <% dialog.with_header(title: t(".title"), subtitle: t(".subtitle", product: product_name)) %> <% dialog.with_body do %> <%= styled_form_with model: @invitation, class: "space-y-4", data: { turbo: false } do |form| %> diff --git a/app/views/layouts/auth.html.erb b/app/views/layouts/auth.html.erb index 56be3236b..5622cf46a 100644 --- a/app/views/layouts/auth.html.erb +++ b/app/views/layouts/auth.html.erb @@ -26,7 +26,7 @@ <% end %> <% if controller_name == "sessions" %> <% elsif controller_name == "registrations" %>