Fix regression in shared link settings form (#5862)

- As the form was moved to a modal, the help text has been removed unintentionally. This adds it back.
This commit is contained in:
Sanne de Vries 2025-11-03 11:22:16 -06:00 committed by GitHub
parent a44ce24867
commit 7de8526b6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -75,7 +75,7 @@ defmodule PlausibleWeb.Live.Components.Form do
def input(%{type: "select"} = assigns) do def input(%{type: "select"} = assigns) do
~H""" ~H"""
<div class={@mt? && "mt-4"}> <div class={@mt? && "mt-4"}>
<.label for={@id} class="mb-1.5">{@label}</.label> <.label for={@id} class={if @help_text, do: "mb-0.5", else: "mb-1.5"}>{@label}</.label>
<p :if={@help_text} class="text-gray-500 dark:text-gray-400 mb-2 text-sm"> <p :if={@help_text} class="text-gray-500 dark:text-gray-400 mb-2 text-sm">
{@help_text} {@help_text}
@ -177,7 +177,11 @@ defmodule PlausibleWeb.Live.Components.Form do
~H""" ~H"""
<div class={@mt? && "mt-4"}> <div class={@mt? && "mt-4"}>
<.label :if={@label != nil and @label != ""} for={@id} class="mb-1.5"> <.label
:if={@label != nil and @label != ""}
for={@id}
class={if @help_text, do: "mb-0.5", else: "mb-1.5"}
>
{@label} {@label}
</.label> </.label>
<p :if={@help_text} class="text-gray-500 dark:text-gray-400 mb-2 text-sm"> <p :if={@help_text} class="text-gray-500 dark:text-gray-400 mb-2 text-sm">

View File

@ -58,10 +58,10 @@ defmodule PlausibleWeb.Live.SharedLinkSettings.Form do
<.input <.input
field={f[:password]} field={f[:password]}
label="Password (optional)" label="Password (optional)"
help_text="Store the password securely, as it can't be viewed again."
type="password" type="password"
autocomplete="new-password" autocomplete="new-password"
/> />
<.button type="submit" class="w-full"> <.button type="submit" class="w-full">
Create shared link Create shared link
</.button> </.button>