From 632a9e1379227167f94d4d9f23008882ebae84a8 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 26 Feb 2023 14:21:49 -0500 Subject: [PATCH] remove extraneous aliases --- lib/cannery_web/components/topbar.ex | 23 +++++++++++------------ lib/cannery_web/live/invite_live/index.ex | 2 +- lib/cannery_web/live/tag_live/index.ex | 2 +- lib/cannery_web/views/email_view.ex | 2 +- lib/cannery_web/views/error_view.ex | 2 +- lib/cannery_web/views/layout_view.ex | 2 +- priv/gettext/actions.pot | 4 ++-- priv/gettext/de/LC_MESSAGES/actions.po | 4 ++-- priv/gettext/de/LC_MESSAGES/default.po | 2 +- priv/gettext/de/LC_MESSAGES/prompts.po | 2 +- priv/gettext/default.pot | 2 +- priv/gettext/en/LC_MESSAGES/actions.po | 4 ++-- priv/gettext/en/LC_MESSAGES/default.po | 2 +- priv/gettext/en/LC_MESSAGES/prompts.po | 2 +- priv/gettext/es/LC_MESSAGES/actions.po | 4 ++-- priv/gettext/es/LC_MESSAGES/default.po | 2 +- priv/gettext/es/LC_MESSAGES/prompts.po | 2 +- priv/gettext/fr/LC_MESSAGES/actions.po | 4 ++-- priv/gettext/fr/LC_MESSAGES/default.po | 2 +- priv/gettext/fr/LC_MESSAGES/prompts.po | 2 +- priv/gettext/ga/LC_MESSAGES/actions.po | 4 ++-- priv/gettext/ga/LC_MESSAGES/default.po | 2 +- priv/gettext/ga/LC_MESSAGES/prompts.po | 2 +- priv/gettext/prompts.pot | 2 +- 24 files changed, 40 insertions(+), 41 deletions(-) diff --git a/lib/cannery_web/components/topbar.ex b/lib/cannery_web/components/topbar.ex index 4cfe439..5ad0ce9 100644 --- a/lib/cannery_web/components/topbar.ex +++ b/lib/cannery_web/components/topbar.ex @@ -6,7 +6,7 @@ defmodule CanneryWeb.Components.Topbar do use CanneryWeb, :component alias Cannery.Accounts - alias CanneryWeb.{Endpoint, HomeLive} + alias CanneryWeb.HomeLive def topbar(assigns) do assigns = @@ -81,16 +81,14 @@ defmodule CanneryWeb.Components.Topbar do <%= gettext("Range") %> - <%= if @current_user.role == :admin do %> -
  • - <.link - navigate={Routes.invite_index_path(Endpoint, :index)} - class="text-primary-600 text-white hover:underline" - > - <%= gettext("Invites") %> - -
  • - <% end %> +
  • Accounts.is_already_admin?()} class="mx-2 my-1"> + <.link + navigate={Routes.invite_index_path(Endpoint, :index)} + class="text-primary-600 text-white hover:underline" + > + <%= gettext("Invites") %> + +
  • <.link href={Routes.user_settings_path(Endpoint, :edit)} @@ -110,7 +108,8 @@ defmodule CanneryWeb.Components.Topbar do
  • Accounts.is_already_admin?() and + function_exported?(Routes, :live_dashboard_path, 2) } class="mx-2 my-1" > diff --git a/lib/cannery_web/live/invite_live/index.ex b/lib/cannery_web/live/invite_live/index.ex index 1f3fdf2..dbd6b3f 100644 --- a/lib/cannery_web/live/invite_live/index.ex +++ b/lib/cannery_web/live/invite_live/index.ex @@ -7,7 +7,7 @@ defmodule CanneryWeb.InviteLive.Index do import CanneryWeb.Components.{InviteCard, UserCard} alias Cannery.Accounts alias Cannery.Accounts.{Invite, Invites} - alias CanneryWeb.{Endpoint, HomeLive} + alias CanneryWeb.HomeLive alias Phoenix.LiveView.JS @impl true diff --git a/lib/cannery_web/live/tag_live/index.ex b/lib/cannery_web/live/tag_live/index.ex index f9f8674..268a51b 100644 --- a/lib/cannery_web/live/tag_live/index.ex +++ b/lib/cannery_web/live/tag_live/index.ex @@ -6,7 +6,7 @@ defmodule CanneryWeb.TagLive.Index do use CanneryWeb, :live_view import CanneryWeb.Components.TagCard alias Cannery.{Tags, Tags.Tag} - alias CanneryWeb.{Endpoint, ViewHelpers} + alias CanneryWeb.ViewHelpers @impl true def mount(%{"search" => search}, _session, socket) do diff --git a/lib/cannery_web/views/email_view.ex b/lib/cannery_web/views/email_view.ex index 8cb0ebd..600c5ad 100644 --- a/lib/cannery_web/views/email_view.ex +++ b/lib/cannery_web/views/email_view.ex @@ -3,5 +3,5 @@ defmodule CanneryWeb.EmailView do A view for email-related helper functions """ use CanneryWeb, :view - alias CanneryWeb.{Endpoint, HomeLive} + alias CanneryWeb.HomeLive end diff --git a/lib/cannery_web/views/error_view.ex b/lib/cannery_web/views/error_view.ex index b93bf8d..377a729 100644 --- a/lib/cannery_web/views/error_view.ex +++ b/lib/cannery_web/views/error_view.ex @@ -1,7 +1,7 @@ defmodule CanneryWeb.ErrorView do use CanneryWeb, :view import CanneryWeb.Components.Topbar - alias CanneryWeb.{Endpoint, HomeLive} + alias CanneryWeb.HomeLive def template_not_found(error_path, _assigns) do error_string = diff --git a/lib/cannery_web/views/layout_view.ex b/lib/cannery_web/views/layout_view.ex index e364c65..29531d1 100644 --- a/lib/cannery_web/views/layout_view.ex +++ b/lib/cannery_web/views/layout_view.ex @@ -1,7 +1,7 @@ defmodule CanneryWeb.LayoutView do use CanneryWeb, :view import CanneryWeb.Components.Topbar - alias CanneryWeb.{Endpoint, HomeLive} + alias CanneryWeb.HomeLive # Phoenix LiveDashboard is available only in development by default, # so we instruct Elixir to not warn if the dashboard route is missing. diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot index cf61716..cdca96a 100644 --- a/priv/gettext/actions.pot +++ b/priv/gettext/actions.pot @@ -66,7 +66,7 @@ msgstr "" msgid "Invite someone new!" msgstr "" -#: lib/cannery_web/components/topbar.ex:138 +#: lib/cannery_web/components/topbar.ex:137 #: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:45 @@ -97,7 +97,7 @@ msgstr "" msgid "New Tag" msgstr "" -#: lib/cannery_web/components/topbar.ex:130 +#: lib/cannery_web/components/topbar.ex:129 #: lib/cannery_web/templates/user_confirmation/new.html.heex:28 #: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:37 diff --git a/priv/gettext/de/LC_MESSAGES/actions.po b/priv/gettext/de/LC_MESSAGES/actions.po index 239eae6..5008c7b 100644 --- a/priv/gettext/de/LC_MESSAGES/actions.po +++ b/priv/gettext/de/LC_MESSAGES/actions.po @@ -79,7 +79,7 @@ msgstr "Passwort vergessen?" msgid "Invite someone new!" msgstr "Laden Sie jemanden ein!" -#: lib/cannery_web/components/topbar.ex:138 +#: lib/cannery_web/components/topbar.ex:137 #: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:45 @@ -110,7 +110,7 @@ msgstr "Neuer Behälter" msgid "New Tag" msgstr "Neuer Tag" -#: lib/cannery_web/components/topbar.ex:130 +#: lib/cannery_web/components/topbar.ex:129 #: lib/cannery_web/templates/user_confirmation/new.html.heex:28 #: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:37 diff --git a/priv/gettext/de/LC_MESSAGES/default.po b/priv/gettext/de/LC_MESSAGES/default.po index 827a899..f528ff1 100644 --- a/priv/gettext/de/LC_MESSAGES/default.po +++ b/priv/gettext/de/LC_MESSAGES/default.po @@ -188,7 +188,7 @@ msgstr "Einladung deaktiviert" msgid "Invite Only" msgstr "Nur mit Einladung" -#: lib/cannery_web/components/topbar.ex:90 +#: lib/cannery_web/components/topbar.ex:89 #: lib/cannery_web/live/invite_live/index.ex:42 #: lib/cannery_web/live/invite_live/index.html.heex:3 #, elixir-autogen, elixir-format diff --git a/priv/gettext/de/LC_MESSAGES/prompts.po b/priv/gettext/de/LC_MESSAGES/prompts.po index cd88c04..e785c90 100644 --- a/priv/gettext/de/LC_MESSAGES/prompts.po +++ b/priv/gettext/de/LC_MESSAGES/prompts.po @@ -84,7 +84,7 @@ msgstr "Sind Sie sicher, dass sie diese Munition löschen möchten?" msgid "Are you sure you want to delete your account?" msgstr "Sind Sie sicher, dass sie Ihren Account löschen möchten?" -#: lib/cannery_web/components/topbar.ex:106 +#: lib/cannery_web/components/topbar.ex:104 #, elixir-autogen, elixir-format msgid "Are you sure you want to log out?" msgstr "Wirklich ausloggen?" diff --git a/priv/gettext/default.pot b/priv/gettext/default.pot index 3746679..2e7d5da 100644 --- a/priv/gettext/default.pot +++ b/priv/gettext/default.pot @@ -184,7 +184,7 @@ msgstr "" msgid "Invite Only" msgstr "" -#: lib/cannery_web/components/topbar.ex:90 +#: lib/cannery_web/components/topbar.ex:89 #: lib/cannery_web/live/invite_live/index.ex:42 #: lib/cannery_web/live/invite_live/index.html.heex:3 #, elixir-autogen, elixir-format diff --git a/priv/gettext/en/LC_MESSAGES/actions.po b/priv/gettext/en/LC_MESSAGES/actions.po index d8eb01d..8aa4362 100644 --- a/priv/gettext/en/LC_MESSAGES/actions.po +++ b/priv/gettext/en/LC_MESSAGES/actions.po @@ -66,7 +66,7 @@ msgstr "" msgid "Invite someone new!" msgstr "" -#: lib/cannery_web/components/topbar.ex:138 +#: lib/cannery_web/components/topbar.ex:137 #: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:45 @@ -97,7 +97,7 @@ msgstr "" msgid "New Tag" msgstr "" -#: lib/cannery_web/components/topbar.ex:130 +#: lib/cannery_web/components/topbar.ex:129 #: lib/cannery_web/templates/user_confirmation/new.html.heex:28 #: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:37 diff --git a/priv/gettext/en/LC_MESSAGES/default.po b/priv/gettext/en/LC_MESSAGES/default.po index 3cad647..c657e18 100644 --- a/priv/gettext/en/LC_MESSAGES/default.po +++ b/priv/gettext/en/LC_MESSAGES/default.po @@ -184,7 +184,7 @@ msgstr "" msgid "Invite Only" msgstr "" -#: lib/cannery_web/components/topbar.ex:90 +#: lib/cannery_web/components/topbar.ex:89 #: lib/cannery_web/live/invite_live/index.ex:42 #: lib/cannery_web/live/invite_live/index.html.heex:3 #, elixir-autogen, elixir-format diff --git a/priv/gettext/en/LC_MESSAGES/prompts.po b/priv/gettext/en/LC_MESSAGES/prompts.po index 121c66b..cd96e27 100644 --- a/priv/gettext/en/LC_MESSAGES/prompts.po +++ b/priv/gettext/en/LC_MESSAGES/prompts.po @@ -69,7 +69,7 @@ msgstr "" msgid "Are you sure you want to delete your account?" msgstr "" -#: lib/cannery_web/components/topbar.ex:106 +#: lib/cannery_web/components/topbar.ex:104 #, elixir-autogen, elixir-format msgid "Are you sure you want to log out?" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/actions.po b/priv/gettext/es/LC_MESSAGES/actions.po index cd446ec..c741b72 100644 --- a/priv/gettext/es/LC_MESSAGES/actions.po +++ b/priv/gettext/es/LC_MESSAGES/actions.po @@ -79,7 +79,7 @@ msgstr "¿Has olvidado tu contraseña?" msgid "Invite someone new!" msgstr "¡Invita a alguien nuevo!" -#: lib/cannery_web/components/topbar.ex:138 +#: lib/cannery_web/components/topbar.ex:137 #: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:45 @@ -110,7 +110,7 @@ msgstr "Nuevo Contenedor" msgid "New Tag" msgstr "Nueva Etiqueta" -#: lib/cannery_web/components/topbar.ex:130 +#: lib/cannery_web/components/topbar.ex:129 #: lib/cannery_web/templates/user_confirmation/new.html.heex:28 #: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:37 diff --git a/priv/gettext/es/LC_MESSAGES/default.po b/priv/gettext/es/LC_MESSAGES/default.po index fbabae7..b88ec25 100644 --- a/priv/gettext/es/LC_MESSAGES/default.po +++ b/priv/gettext/es/LC_MESSAGES/default.po @@ -188,7 +188,7 @@ msgstr "Invitación Desactivada" msgid "Invite Only" msgstr "Solo Invitación" -#: lib/cannery_web/components/topbar.ex:90 +#: lib/cannery_web/components/topbar.ex:89 #: lib/cannery_web/live/invite_live/index.ex:42 #: lib/cannery_web/live/invite_live/index.html.heex:3 #, elixir-autogen, elixir-format diff --git a/priv/gettext/es/LC_MESSAGES/prompts.po b/priv/gettext/es/LC_MESSAGES/prompts.po index 5645e41..aad9447 100644 --- a/priv/gettext/es/LC_MESSAGES/prompts.po +++ b/priv/gettext/es/LC_MESSAGES/prompts.po @@ -84,7 +84,7 @@ msgstr "Está seguro que desea eliminar esta munición?" msgid "Are you sure you want to delete your account?" msgstr "Está seguro que desea eliminar su cuenta?" -#: lib/cannery_web/components/topbar.ex:106 +#: lib/cannery_web/components/topbar.ex:104 #, elixir-autogen, elixir-format msgid "Are you sure you want to log out?" msgstr "Está seguro que desea cerrar sesión?" diff --git a/priv/gettext/fr/LC_MESSAGES/actions.po b/priv/gettext/fr/LC_MESSAGES/actions.po index 6e90e09..cad76a4 100644 --- a/priv/gettext/fr/LC_MESSAGES/actions.po +++ b/priv/gettext/fr/LC_MESSAGES/actions.po @@ -79,7 +79,7 @@ msgstr "Mot de passe oublié ?" msgid "Invite someone new!" msgstr "Invitez une nouvelle personne !" -#: lib/cannery_web/components/topbar.ex:138 +#: lib/cannery_web/components/topbar.ex:137 #: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:45 @@ -110,7 +110,7 @@ msgstr "Nouveau conteneur" msgid "New Tag" msgstr "Nouveau tag" -#: lib/cannery_web/components/topbar.ex:130 +#: lib/cannery_web/components/topbar.ex:129 #: lib/cannery_web/templates/user_confirmation/new.html.heex:28 #: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:37 diff --git a/priv/gettext/fr/LC_MESSAGES/default.po b/priv/gettext/fr/LC_MESSAGES/default.po index 9611b27..0a8aa94 100644 --- a/priv/gettext/fr/LC_MESSAGES/default.po +++ b/priv/gettext/fr/LC_MESSAGES/default.po @@ -188,7 +188,7 @@ msgstr "Invitation désactivée" msgid "Invite Only" msgstr "Uniquement sur invitation" -#: lib/cannery_web/components/topbar.ex:90 +#: lib/cannery_web/components/topbar.ex:89 #: lib/cannery_web/live/invite_live/index.ex:42 #: lib/cannery_web/live/invite_live/index.html.heex:3 #, elixir-autogen, elixir-format diff --git a/priv/gettext/fr/LC_MESSAGES/prompts.po b/priv/gettext/fr/LC_MESSAGES/prompts.po index 6ca16ec..8a87ee1 100644 --- a/priv/gettext/fr/LC_MESSAGES/prompts.po +++ b/priv/gettext/fr/LC_MESSAGES/prompts.po @@ -85,7 +85,7 @@ msgstr "Êtes-vous certain·e de supprimer cette munition ?" msgid "Are you sure you want to delete your account?" msgstr "Êtes-vous certain·e de supprimer votre compte ?" -#: lib/cannery_web/components/topbar.ex:106 +#: lib/cannery_web/components/topbar.ex:104 #, elixir-autogen, elixir-format msgid "Are you sure you want to log out?" msgstr "Êtes-vous certain·e de vouloir vous déconnecter ?" diff --git a/priv/gettext/ga/LC_MESSAGES/actions.po b/priv/gettext/ga/LC_MESSAGES/actions.po index ae31283..81f9513 100644 --- a/priv/gettext/ga/LC_MESSAGES/actions.po +++ b/priv/gettext/ga/LC_MESSAGES/actions.po @@ -77,7 +77,7 @@ msgstr "" msgid "Invite someone new!" msgstr "" -#: lib/cannery_web/components/topbar.ex:138 +#: lib/cannery_web/components/topbar.ex:137 #: lib/cannery_web/templates/user_confirmation/new.html.heex:31 #: lib/cannery_web/templates/user_registration/new.html.heex:44 #: lib/cannery_web/templates/user_reset_password/edit.html.heex:45 @@ -108,7 +108,7 @@ msgstr "" msgid "New Tag" msgstr "" -#: lib/cannery_web/components/topbar.ex:130 +#: lib/cannery_web/components/topbar.ex:129 #: lib/cannery_web/templates/user_confirmation/new.html.heex:28 #: lib/cannery_web/templates/user_registration/new.html.heex:3 #: lib/cannery_web/templates/user_registration/new.html.heex:37 diff --git a/priv/gettext/ga/LC_MESSAGES/default.po b/priv/gettext/ga/LC_MESSAGES/default.po index ed92168..2584b2b 100644 --- a/priv/gettext/ga/LC_MESSAGES/default.po +++ b/priv/gettext/ga/LC_MESSAGES/default.po @@ -186,7 +186,7 @@ msgstr "" msgid "Invite Only" msgstr "" -#: lib/cannery_web/components/topbar.ex:90 +#: lib/cannery_web/components/topbar.ex:89 #: lib/cannery_web/live/invite_live/index.ex:42 #: lib/cannery_web/live/invite_live/index.html.heex:3 #, elixir-autogen, elixir-format diff --git a/priv/gettext/ga/LC_MESSAGES/prompts.po b/priv/gettext/ga/LC_MESSAGES/prompts.po index cb2b238..346062d 100644 --- a/priv/gettext/ga/LC_MESSAGES/prompts.po +++ b/priv/gettext/ga/LC_MESSAGES/prompts.po @@ -80,7 +80,7 @@ msgstr "" msgid "Are you sure you want to delete your account?" msgstr "" -#: lib/cannery_web/components/topbar.ex:106 +#: lib/cannery_web/components/topbar.ex:104 #, elixir-autogen, elixir-format msgid "Are you sure you want to log out?" msgstr "" diff --git a/priv/gettext/prompts.pot b/priv/gettext/prompts.pot index 9f06029..d4b5b2b 100644 --- a/priv/gettext/prompts.pot +++ b/priv/gettext/prompts.pot @@ -69,7 +69,7 @@ msgstr "" msgid "Are you sure you want to delete your account?" msgstr "" -#: lib/cannery_web/components/topbar.ex:106 +#: lib/cannery_web/components/topbar.ex:104 #, elixir-autogen, elixir-format msgid "Are you sure you want to log out?" msgstr ""