update deps
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
2025-04-05 03:42:43 +00:00
parent 4cca4ee3b7
commit 32094221c2
86 changed files with 841 additions and 20819 deletions

View File

@ -9,49 +9,49 @@
phx-hook="CtrlEnter"
class="flex flex-col justify-start items-stretch space-y-4"
>
<%= text_input(f, :slug,
{text_input(f, :slug,
aria_label: gettext("slug"),
class: "input input-primary",
phx_debounce: 300,
phx_hook: "SanitizeTitles",
placeholder: gettext("slug"),
required: true
) %>
<%= error_tag(f, :slug) %>
)}
{error_tag(f, :slug)}
<%= textarea(f, :content,
{textarea(f, :content,
id: "note-form-content",
class: "input input-primary h-64 min-h-64",
phx_update: "ignore",
placeholder: gettext("use [note-slug] to link to a note"),
aria_label: gettext("use [note-slug] to link to a note"),
phx_debounce: 300
) %>
<%= error_tag(f, :content) %>
)}
{error_tag(f, :content)}
<%= text_input(f, :tags_string,
{text_input(f, :tags_string,
aria_label: gettext("tag1,tag2"),
class: "input input-primary",
id: "tags-input",
phx_debounce: 300,
phx_hook: "SanitizeTags",
placeholder: gettext("tag1,tag2")
) %>
<%= error_tag(f, :tags_string) %>
)}
{error_tag(f, :tags_string)}
<div class="flex justify-center items-stretch space-x-4">
<%= select(f, :visibility, Ecto.Enum.values(Memex.Notes.Note, :visibility),
{select(f, :visibility, Ecto.Enum.values(Memex.Notes.Note, :visibility),
class: "grow input input-primary",
prompt: gettext("select privacy"),
aria_label: gettext("select privacy"),
phx_debounce: 300
) %>
)}
<%= submit(dgettext("actions", "save"),
{submit(dgettext("actions", "save"),
phx_disable_with: gettext("saving..."),
class: "mx-auto btn btn-primary"
) %>
)}
</div>
<%= error_tag(f, :visibility) %>
{error_tag(f, :visibility)}
</.form>
</div>

View File

@ -1,6 +1,6 @@
<div class="flex flex-col justify-center items-start mx-auto space-y-4 max-w-3xl">
<h1 class="text-xl">
<%= gettext("notes") %>
{gettext("notes")}
</h1>
<.form
@ -11,18 +11,18 @@
phx-submit="search"
class="flex flex-col items-stretch self-stretch"
>
<%= text_input(f, :search_term,
{text_input(f, :search_term,
class: "input input-primary",
value: @search,
role: "search",
phx_debounce: 300,
placeholder: gettext("search")
) %>
)}
</.form>
<%= if @notes |> Enum.empty?() do %>
<h1 class="self-center text-primary-500">
<%= gettext("no notes found") %>
{gettext("no notes found")}
</h1>
<% else %>
<.live_component
@ -37,7 +37,7 @@
patch={~p"/notes/#{note}/edit"}
aria-label={dgettext("actions", "edit %{note_slug}", note_slug: note.slug)}
>
<%= dgettext("actions", "edit") %>
{dgettext("actions", "edit")}
</.link>
<.link
:if={@current_user}
@ -47,14 +47,14 @@
data-confirm={dgettext("prompts", "are you sure?")}
aria-label={dgettext("actions", "delete %{note_slug}", note_slug: note.slug)}
>
<%= dgettext("actions", "delete") %>
{dgettext("actions", "delete")}
</.link>
</:actions>
</.live_component>
<% end %>
<.link :if={@current_user} patch={~p"/notes/new"} class="self-end btn btn-primary">
<%= dgettext("actions", "new note") %>
{dgettext("actions", "new note")}
</.link>
</div>

View File

@ -1,11 +1,11 @@
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
<h1 class="text-xl">
<%= @note.slug %>
{@note.slug}
</h1>
<div class="flex flex-wrap space-x-1">
<.link :for={tag <- @note.tags} navigate={~p"/notes/#{tag}"} class="link">
<%= tag %>
{tag}
</.link>
</div>
@ -15,37 +15,37 @@
:if={@note_backlinks ++ @context_backlinks ++ @pipeline_backlinks != []}
class="flex flex-wrap justify-end items-center self-end"
>
<p><%= gettext("Backlinked by:") %></p>
<p>{gettext("Backlinked by:")}</p>
<.link
:for={backlink <- @note_backlinks}
class="m-1 hover:underline"
patch={~p"/note/#{backlink}"}
>
<%= gettext("[%{slug}]", slug: backlink.slug) %>
{gettext("[%{slug}]", slug: backlink.slug)}
</.link>
<.link
:for={backlink <- @context_backlinks}
class="m-1 hover:underline"
patch={~p"/context/#{backlink}"}
>
<%= gettext("[[%{slug}]]", slug: backlink.slug) %>
{gettext("[[%{slug}]]", slug: backlink.slug)}
</.link>
<.link
:for={backlink <- @pipeline_backlinks}
class="m-1 hover:underline"
patch={~p"/pipeline/#{backlink}"}
>
<%= gettext("[[[%{slug}]]]", slug: backlink.slug) %>
{gettext("[[[%{slug}]]]", slug: backlink.slug)}
</.link>
</div>
<p class="self-end">
<%= gettext("Visibility: %{visibility}", visibility: @note.visibility) %>
{gettext("Visibility: %{visibility}", visibility: @note.visibility)}
</p>
<div class="flex self-end space-x-4">
<.link :if={@current_user} class="btn btn-primary" patch={~p"/note/#{@note}/edit"}>
<%= dgettext("actions", "edit") %>
{dgettext("actions", "edit")}
</.link>
<button
:if={@current_user}
@ -55,7 +55,7 @@
data-confirm={dgettext("prompts", "are you sure?")}
aria-label={dgettext("actions", "delete %{note_slug}", note_slug: @note.slug)}
>
<%= dgettext("actions", "delete") %>
{dgettext("actions", "delete")}
</button>
</div>
</div>