add placeholder for empty notes and contexts

This commit is contained in:
shibao 2025-02-15 02:45:38 +00:00
parent 64bf39da29
commit c3d066016b
8 changed files with 41 additions and 4 deletions

@ -1,6 +1,7 @@
# v0.1.18 # v0.1.18
- Update deps - Update deps
- Fix content not escaping HTML properly - Fix content not escaping HTML properly
- Add placeholder for empty notes and contexts
# v0.1.17 # v0.1.17
- Fix new invite button not working - Fix new invite button not working

@ -1,8 +1,11 @@
<div <div
:if={@context.content} :if={@context.content}
id={"show-context-content-#{@context.id}"} id={"show-context-content-#{@context.id}"}
class="input input-primary h-128 min-h-128 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto resize-y" class="inline-block overflow-y-auto overflow-x-hidden whitespace-pre-wrap resize-y input input-primary h-128 min-h-128"
phx-update="ignore" phx-update="ignore"
readonly readonly
phx-no-format phx-no-format
><p class="inline"><%= display_links(@context) %></p></div> ><p class="inline"><%= display_links(@context) %></p></div>
<div :if={!@context.content} class="text-sm italic text-center text-gray-600">
<%= gettext("(This context is empty)") %>
</div>

@ -1,8 +1,11 @@
<div <div
:if={@note.content} :if={@note.content}
id={"show-note-content-#{@note.id}"} id={"show-note-content-#{@note.id}"}
class="input input-primary h-128 min-h-128 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto resize-y" class="inline-block overflow-y-auto overflow-x-hidden whitespace-pre-wrap resize-y input input-primary h-128 min-h-128"
phx-update="ignore" phx-update="ignore"
readonly readonly
phx-no-format phx-no-format
><p class="inline"><%= display_links(@note) %></p></div> ><p class="inline"><%= display_links(@note) %></p></div>
<div :if={!@note.content} class="text-sm italic text-center text-gray-600">
<%= gettext("(This note is empty)") %>
</div>

@ -1,7 +1,7 @@
<div <div
:if={@pipeline.description} :if={@pipeline.description}
id={"show-pipeline-description-#{@pipeline.id}"} id={"show-pipeline-description-#{@pipeline.id}"}
class="input input-primary h-32 min-h-32 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto resize-y" class="inline-block overflow-y-auto overflow-x-hidden h-32 whitespace-pre-wrap resize-y input input-primary min-h-32"
phx-update="ignore" phx-update="ignore"
readonly readonly
phx-no-format phx-no-format

@ -1,7 +1,7 @@
<div <div
:if={@step.content} :if={@step.content}
id={"show-step-content-#{@step.id}"} id={"show-step-content-#{@step.id}"}
class="input input-primary h-32 min-h-32 inline-block whitespace-pre-wrap overflow-x-hidden overflow-y-auto resize-y" class="inline-block overflow-y-auto overflow-x-hidden h-32 whitespace-pre-wrap resize-y input input-primary min-h-32"
phx-update="ignore" phx-update="ignore"
readonly readonly
phx-no-format phx-no-format

@ -711,3 +711,13 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "note, context and pipeline slugs must be unique, and you are free to link to notes not written by you." msgid "note, context and pipeline slugs must be unique, and you are free to link to notes not written by you."
msgstr "" msgstr ""
#: lib/memex_web/components/core_components/context_content.html.heex:10
#, elixir-autogen, elixir-format
msgid "(This context is empty)"
msgstr ""
#: lib/memex_web/components/core_components/note_content.html.heex:10
#, elixir-autogen, elixir-format
msgid "(This note is empty)"
msgstr ""

@ -709,3 +709,13 @@ msgstr ""
#, elixir-autogen, elixir-format #, elixir-autogen, elixir-format
msgid "note, context and pipeline slugs must be unique, and you are free to link to notes not written by you." msgid "note, context and pipeline slugs must be unique, and you are free to link to notes not written by you."
msgstr "" msgstr ""
#: lib/memex_web/components/core_components/context_content.html.heex:10
#, elixir-autogen, elixir-format
msgid "(This context is empty)"
msgstr ""
#: lib/memex_web/components/core_components/note_content.html.heex:10
#, elixir-autogen, elixir-format
msgid "(This note is empty)"
msgstr ""

@ -710,3 +710,13 @@ msgstr ""
#, elixir-autogen, elixir-format, fuzzy #, elixir-autogen, elixir-format, fuzzy
msgid "note, context and pipeline slugs must be unique, and you are free to link to notes not written by you." msgid "note, context and pipeline slugs must be unique, and you are free to link to notes not written by you."
msgstr "" msgstr ""
#: lib/memex_web/components/core_components/context_content.html.heex:10
#, elixir-autogen, elixir-format
msgid "(This context is empty)"
msgstr ""
#: lib/memex_web/components/core_components/note_content.html.heex:10
#, elixir-autogen, elixir-format
msgid "(This note is empty)"
msgstr ""