diff --git a/.erb-lint.yml b/.erb-lint.yml index f6ab4ce..384fcec 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -9,7 +9,10 @@ linters: enabled: true PartialInstanceVariable: enabled: true - # DeprecatedClasses: - # enabled: true - # HardCodedString: - # enabled: true + DeprecatedClasses: + enabled: true + HardCodedString: + enabled: true + exclude: + - "app/views/dashboard/show.html.erb" + - "app/views/public/landing_page.html.erb" diff --git a/.rubocop.yml b/.rubocop.yml index 6a02b2a..6d05743 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,4 @@ inherit_gem: standard: config/base.yml +AllCops: + SuggestExtensions: false diff --git a/app/components/navbar/account_selector/component.html.erb b/app/components/navbar/account_selector/component.html.erb index 34b96d4..e26dde0 100644 --- a/app/components/navbar/account_selector/component.html.erb +++ b/app/components/navbar/account_selector/component.html.erb @@ -6,9 +6,15 @@ <%= Current.account.name %> <% if Current.account.personal? %> - Personal account + + + <%= t('.personal_account') %> + <% else %> - Team account + + + <%= t('.team_account') %> + <% end %> @@ -16,7 +22,10 @@ <% end %> - Switch account + + <%= t('.switch_button') %> + + <%= link_to dashboard_path(account_id: nil), class: "flex items-center justify-between px-4 py-2.5 hover:bg-background" do %> <%= Current.user.personal_account.name %> @@ -30,5 +39,5 @@ <% end %> <% end %> - <%= link_to "Create a new team", "#", class: "block px-4 py-2.5 hover:bg-background" %> + <%= link_to t('.new_account_button'), "#", class: "block px-4 py-2.5 hover:bg-background" %> <% end %> diff --git a/app/components/navbar/account_selector/component.yml b/app/components/navbar/account_selector/component.yml new file mode 100644 index 0000000..3e4a66c --- /dev/null +++ b/app/components/navbar/account_selector/component.yml @@ -0,0 +1,5 @@ +en: + personal_account: Personal account + team_account: Team account + switch_button: Switch account + new_account_button: Create a new team diff --git a/app/views/accounts/edit.html.erb b/app/views/accounts/edit.html.erb index 4c78378..f63092b 100644 --- a/app/views/accounts/edit.html.erb +++ b/app/views/accounts/edit.html.erb @@ -1,4 +1,4 @@ <% title "Edit your account profile" %> <%= render(PageLayouts::Settings::Component.new) do %> - <%= render "form", account: %> + <%= render "form", account: @account %> <% end %> diff --git a/app/views/partials/navigations/_settings.html.erb b/app/views/partials/navigations/_settings.html.erb index bd68eb4..1f2fcd1 100644 --- a/app/views/partials/navigations/_settings.html.erb +++ b/app/views/partials/navigations/_settings.html.erb @@ -1,23 +1,23 @@