<%= if not TeslaMate.Vault.encryption_key_provided?() or (not TeslaMate.Api.signed_in?() and not TeslaMate.Auth.can_decrypt_tokens?()) do %> <% docs_link = link("docs.teslamate.org", to: "https://docs.teslamate.org", target: "_blank", rel: "noopener noreferrer" ) %>

 <%= gettext( "No encryption key provided" ) %>

<%= raw( gettext( "To ensure that your Tesla API tokens are stored securely, an encryption key must be provided to TeslaMate via the ENCRYPTION_KEY environment variable. Otherwise, a login will be required after every restart." ) ) %>

<%= raw( gettext( "The automatically generated encryption key used for the current session can be found in the application logs." ) ) %>

<%= raw( gettext("For more information, see the updated installation guides on %{link}", link: safe_to_string(docs_link) ) ) %>

<% end %> <%= Enum.map(@flash, fn {flash_key, flash_message} -> %>

<%= flash_message %>

<% end) %> <%= @inner_content %>