Compare commits
No commits in common. "c3ceb877b2dd4ef10a74e16c1d3ba8849f7cd38f" and "6452f64fec77aa3b71e55706c45a5375759cb708" have entirely different histories.
c3ceb877b2
...
6452f64fec
@ -1,7 +1,3 @@
|
|||||||
# v0.1.3
|
|
||||||
- backlink to other notes in notes
|
|
||||||
- search tags on click
|
|
||||||
|
|
||||||
# v0.1.2
|
# v0.1.2
|
||||||
- fix more typos
|
- fix more typos
|
||||||
- add to faq
|
- add to faq
|
||||||
|
@ -105,17 +105,7 @@ defmodule MemexWeb.Components.ContextsTableComponent do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
||||||
assigns = %{tags: tags}
|
tags |> Enum.join(", ")
|
||||||
|
|
||||||
~H"""
|
|
||||||
<div class="flex flex-wrap justify-center space-x-1">
|
|
||||||
<%= for tag <- @tags do %>
|
|
||||||
<.link patch={Routes.context_index_path(Endpoint, :search, tag)} class="link">
|
|
||||||
<%= tag %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
"""
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:actions, context, %{actions: actions}) do
|
defp get_value_for_key(:actions, context, %{actions: actions}) do
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
defmodule MemexWeb.Components.NoteContent do
|
|
||||||
@moduledoc """
|
|
||||||
Display the content for a note
|
|
||||||
"""
|
|
||||||
use MemexWeb, :component
|
|
||||||
alias Memex.Notes.Note
|
|
||||||
alias Phoenix.HTML
|
|
||||||
|
|
||||||
attr :note, Note, required: true
|
|
||||||
|
|
||||||
def note_content(assigns) do
|
|
||||||
~H"""
|
|
||||||
<div
|
|
||||||
id={"show-note-content-#{@note.id}"}
|
|
||||||
class="input input-primary h-128 min-h-128 inline-block"
|
|
||||||
phx-hook="MaintainAttrs"
|
|
||||||
phx-update="ignore"
|
|
||||||
readonly
|
|
||||||
phx-no-format
|
|
||||||
><p class="inline"><%= add_links_to_content(@note.content) %></p></div>
|
|
||||||
"""
|
|
||||||
end
|
|
||||||
|
|
||||||
defp add_links_to_content(content) do
|
|
||||||
Regex.replace(
|
|
||||||
~r/\[\[([\p{L}\p{N}\-]+)\]\]/,
|
|
||||||
content,
|
|
||||||
fn _whole_match, slug ->
|
|
||||||
link =
|
|
||||||
HTML.Link.link(
|
|
||||||
"[[#{slug}]]",
|
|
||||||
to: Routes.note_show_path(Endpoint, :show, slug),
|
|
||||||
class: "link inline",
|
|
||||||
data: [qa: "note-link-#{slug}"]
|
|
||||||
)
|
|
||||||
|> HTML.Safe.to_iodata()
|
|
||||||
|> IO.iodata_to_binary()
|
|
||||||
|
|
||||||
"</p>#{link}<p class=\"inline\">"
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|> HTML.raw()
|
|
||||||
end
|
|
||||||
end
|
|
@ -105,17 +105,7 @@ defmodule MemexWeb.Components.NotesTableComponent do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
||||||
assigns = %{tags: tags}
|
tags |> Enum.join(", ")
|
||||||
|
|
||||||
~H"""
|
|
||||||
<div class="flex flex-wrap justify-center space-x-1">
|
|
||||||
<%= for tag <- @tags do %>
|
|
||||||
<.link patch={Routes.note_index_path(Endpoint, :search, tag)} class="link">
|
|
||||||
<%= tag %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
"""
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:actions, note, %{actions: actions}) do
|
defp get_value_for_key(:actions, note, %{actions: actions}) do
|
||||||
|
@ -118,17 +118,7 @@ defmodule MemexWeb.Components.PipelinesTableComponent do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
||||||
assigns = %{tags: tags}
|
tags |> Enum.join(", ")
|
||||||
|
|
||||||
~H"""
|
|
||||||
<div class="flex flex-wrap justify-center space-x-1">
|
|
||||||
<%= for tag <- @tags do %>
|
|
||||||
<.link patch={Routes.pipeline_index_path(Endpoint, :search, tag)} class="link">
|
|
||||||
<%= tag %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
"""
|
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:actions, pipeline, %{actions: actions}) do
|
defp get_value_for_key(:actions, pipeline, %{actions: actions}) do
|
||||||
|
@ -3,13 +3,7 @@
|
|||||||
<%= @context.slug %>
|
<%= @context.slug %>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="flex flex-wrap space-x-1">
|
<p><%= if @context.tags, do: @context.tags |> Enum.join(", ") %></p>
|
||||||
<%= for tag <- @context.tags do %>
|
|
||||||
<.link navigate={Routes.context_index_path(Endpoint, :search, tag)} class="link">
|
|
||||||
<%= tag %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<.context_content context={@context} />
|
<.context_content context={@context} />
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
defmodule MemexWeb.NoteLive.Show do
|
defmodule MemexWeb.NoteLive.Show do
|
||||||
use MemexWeb, :live_view
|
use MemexWeb, :live_view
|
||||||
import MemexWeb.Components.NoteContent
|
|
||||||
alias Memex.{Accounts.User, Notes, Notes.Note}
|
alias Memex.{Accounts.User, Notes, Notes.Note}
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
|
@ -3,15 +3,16 @@
|
|||||||
<%= @note.slug %>
|
<%= @note.slug %>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="flex flex-wrap space-x-1">
|
<p><%= if @note.tags, do: @note.tags |> Enum.join(", ") %></p>
|
||||||
<%= for tag <- @note.tags do %>
|
|
||||||
<.link navigate={Routes.note_index_path(Endpoint, :search, tag)} class="link">
|
|
||||||
<%= tag %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<.note_content note={@note} />
|
<textarea
|
||||||
|
id="show-note-content"
|
||||||
|
class="input input-primary h-128 min-h-128"
|
||||||
|
phx-hook="MaintainAttrs"
|
||||||
|
phx-update="ignore"
|
||||||
|
readonly
|
||||||
|
phx-no-format
|
||||||
|
><%= @note.content %></textarea>
|
||||||
|
|
||||||
<p class="self-end">
|
<p class="self-end">
|
||||||
<%= gettext("Visibility: %{visibility}", visibility: @note.visibility) %>
|
<%= gettext("Visibility: %{visibility}", visibility: @note.visibility) %>
|
||||||
|
@ -3,13 +3,7 @@
|
|||||||
<%= @pipeline.slug %>
|
<%= @pipeline.slug %>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="flex flex-wrap space-x-1">
|
<p><%= if @pipeline.tags, do: @pipeline.tags |> Enum.join(", ") %></p>
|
||||||
<%= for tag <- @pipeline.tags do %>
|
|
||||||
<.link navigate={Routes.pipeline_index_path(Endpoint, :search, tag)} class="link">
|
|
||||||
<%= tag %>
|
|
||||||
</.link>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= if @pipeline.description do %>
|
<%= if @pipeline.description do %>
|
||||||
<textarea
|
<textarea
|
||||||
|
2
mix.exs
2
mix.exs
@ -4,7 +4,7 @@ defmodule Memex.MixProject do
|
|||||||
def project do
|
def project do
|
||||||
[
|
[
|
||||||
app: :memex,
|
app: :memex,
|
||||||
version: "0.1.3",
|
version: "0.1.2",
|
||||||
elixir: "~> 1.14",
|
elixir: "~> 1.14",
|
||||||
elixirc_paths: elixirc_paths(Mix.env()),
|
elixirc_paths: elixirc_paths(Mix.env()),
|
||||||
compilers: Mix.compilers(),
|
compilers: Mix.compilers(),
|
||||||
|
@ -56,12 +56,12 @@ msgid "create invite"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/index.html.heex:49
|
#: lib/memex_web/live/context_live/index.html.heex:49
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:40
|
#: lib/memex_web/live/context_live/show.html.heex:34
|
||||||
#: lib/memex_web/live/note_live/index.html.heex:49
|
#: lib/memex_web/live/note_live/index.html.heex:49
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:37
|
#: lib/memex_web/live/note_live/show.html.heex:38
|
||||||
#: lib/memex_web/live/pipeline_live/index.html.heex:49
|
#: lib/memex_web/live/pipeline_live/index.html.heex:49
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:49
|
#: lib/memex_web/live/pipeline_live/show.html.heex:43
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:119
|
#: lib/memex_web/live/pipeline_live/show.html.heex:113
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "delete"
|
msgid "delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -72,12 +72,12 @@ msgid "delete user"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/index.html.heex:38
|
#: lib/memex_web/live/context_live/index.html.heex:38
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:29
|
#: lib/memex_web/live/context_live/show.html.heex:23
|
||||||
#: lib/memex_web/live/note_live/index.html.heex:38
|
#: lib/memex_web/live/note_live/index.html.heex:38
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:26
|
#: lib/memex_web/live/note_live/show.html.heex:27
|
||||||
#: lib/memex_web/live/pipeline_live/index.html.heex:38
|
#: lib/memex_web/live/pipeline_live/index.html.heex:38
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:38
|
#: lib/memex_web/live/pipeline_live/show.html.heex:32
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:108
|
#: lib/memex_web/live/pipeline_live/show.html.heex:102
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "edit"
|
msgid "edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -132,14 +132,14 @@ msgstr ""
|
|||||||
msgid "save"
|
msgid "save"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:22
|
#: lib/memex_web/live/context_live/show.html.heex:16
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:22
|
#: lib/memex_web/live/note_live/show.html.heex:23
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:31
|
#: lib/memex_web/live/pipeline_live/show.html.heex:25
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "back"
|
msgid "back"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:135
|
#: lib/memex_web/live/pipeline_live/show.html.heex:129
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "add step"
|
msgid "add step"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -57,12 +57,12 @@ msgid "create invite"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/index.html.heex:49
|
#: lib/memex_web/live/context_live/index.html.heex:49
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:40
|
#: lib/memex_web/live/context_live/show.html.heex:34
|
||||||
#: lib/memex_web/live/note_live/index.html.heex:49
|
#: lib/memex_web/live/note_live/index.html.heex:49
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:37
|
#: lib/memex_web/live/note_live/show.html.heex:38
|
||||||
#: lib/memex_web/live/pipeline_live/index.html.heex:49
|
#: lib/memex_web/live/pipeline_live/index.html.heex:49
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:49
|
#: lib/memex_web/live/pipeline_live/show.html.heex:43
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:119
|
#: lib/memex_web/live/pipeline_live/show.html.heex:113
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "delete"
|
msgid "delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -73,12 +73,12 @@ msgid "delete user"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/index.html.heex:38
|
#: lib/memex_web/live/context_live/index.html.heex:38
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:29
|
#: lib/memex_web/live/context_live/show.html.heex:23
|
||||||
#: lib/memex_web/live/note_live/index.html.heex:38
|
#: lib/memex_web/live/note_live/index.html.heex:38
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:26
|
#: lib/memex_web/live/note_live/show.html.heex:27
|
||||||
#: lib/memex_web/live/pipeline_live/index.html.heex:38
|
#: lib/memex_web/live/pipeline_live/index.html.heex:38
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:38
|
#: lib/memex_web/live/pipeline_live/show.html.heex:32
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:108
|
#: lib/memex_web/live/pipeline_live/show.html.heex:102
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "edit"
|
msgid "edit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -133,14 +133,14 @@ msgstr ""
|
|||||||
msgid "save"
|
msgid "save"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:22
|
#: lib/memex_web/live/context_live/show.html.heex:16
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:22
|
#: lib/memex_web/live/note_live/show.html.heex:23
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:31
|
#: lib/memex_web/live/pipeline_live/show.html.heex:25
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "back"
|
msgid "back"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:135
|
#: lib/memex_web/live/pipeline_live/show.html.heex:129
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "add step"
|
msgid "add step"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -81,9 +81,9 @@ msgstr ""
|
|||||||
msgid "Uses left"
|
msgid "Uses left"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:17
|
#: lib/memex_web/live/context_live/show.html.heex:11
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:17
|
#: lib/memex_web/live/note_live/show.html.heex:18
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:26
|
#: lib/memex_web/live/pipeline_live/show.html.heex:20
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Visibility: %{visibility}"
|
msgid "Visibility: %{visibility}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -501,7 +501,7 @@ msgstr ""
|
|||||||
msgid "what is this?"
|
msgid "what is this?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:68
|
#: lib/memex_web/live/pipeline_live/show.html.heex:62
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "%{position}. %{title}"
|
msgid "%{position}. %{title}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -526,12 +526,12 @@ msgstr ""
|
|||||||
msgid "add step to %{slug}"
|
msgid "add step to %{slug}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:62
|
#: lib/memex_web/live/pipeline_live/show.html.heex:56
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "no steps"
|
msgid "no steps"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:57
|
#: lib/memex_web/live/pipeline_live/show.html.heex:51
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "steps:"
|
msgid "steps:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -138,12 +138,12 @@ msgid "are you sure you want to make %{invite_name} unlimited?"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/index.html.heex:46
|
#: lib/memex_web/live/context_live/index.html.heex:46
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:37
|
#: lib/memex_web/live/context_live/show.html.heex:31
|
||||||
#: lib/memex_web/live/note_live/index.html.heex:46
|
#: lib/memex_web/live/note_live/index.html.heex:46
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:34
|
#: lib/memex_web/live/note_live/show.html.heex:35
|
||||||
#: lib/memex_web/live/pipeline_live/index.html.heex:46
|
#: lib/memex_web/live/pipeline_live/index.html.heex:46
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:46
|
#: lib/memex_web/live/pipeline_live/show.html.heex:40
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:116
|
#: lib/memex_web/live/pipeline_live/show.html.heex:110
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "are you sure?"
|
msgid "are you sure?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -70,9 +70,9 @@ msgstr ""
|
|||||||
msgid "Uses left"
|
msgid "Uses left"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:17
|
#: lib/memex_web/live/context_live/show.html.heex:11
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:17
|
#: lib/memex_web/live/note_live/show.html.heex:18
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:26
|
#: lib/memex_web/live/pipeline_live/show.html.heex:20
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "Visibility: %{visibility}"
|
msgid "Visibility: %{visibility}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -490,7 +490,7 @@ msgstr ""
|
|||||||
msgid "what is this?"
|
msgid "what is this?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:68
|
#: lib/memex_web/live/pipeline_live/show.html.heex:62
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "%{position}. %{title}"
|
msgid "%{position}. %{title}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -515,12 +515,12 @@ msgstr ""
|
|||||||
msgid "add step to %{slug}"
|
msgid "add step to %{slug}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:62
|
#: lib/memex_web/live/pipeline_live/show.html.heex:56
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "no steps"
|
msgid "no steps"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:57
|
#: lib/memex_web/live/pipeline_live/show.html.heex:51
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "steps:"
|
msgid "steps:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -137,12 +137,12 @@ msgid "are you sure you want to make %{invite_name} unlimited?"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/memex_web/live/context_live/index.html.heex:46
|
#: lib/memex_web/live/context_live/index.html.heex:46
|
||||||
#: lib/memex_web/live/context_live/show.html.heex:37
|
#: lib/memex_web/live/context_live/show.html.heex:31
|
||||||
#: lib/memex_web/live/note_live/index.html.heex:46
|
#: lib/memex_web/live/note_live/index.html.heex:46
|
||||||
#: lib/memex_web/live/note_live/show.html.heex:34
|
#: lib/memex_web/live/note_live/show.html.heex:35
|
||||||
#: lib/memex_web/live/pipeline_live/index.html.heex:46
|
#: lib/memex_web/live/pipeline_live/index.html.heex:46
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:46
|
#: lib/memex_web/live/pipeline_live/show.html.heex:40
|
||||||
#: lib/memex_web/live/pipeline_live/show.html.heex:116
|
#: lib/memex_web/live/pipeline_live/show.html.heex:110
|
||||||
#, elixir-autogen, elixir-format
|
#, elixir-autogen, elixir-format
|
||||||
msgid "are you sure?"
|
msgid "are you sure?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -37,14 +37,6 @@ defmodule MemexWeb.ContextLiveTest do
|
|||||||
assert html =~ context.slug
|
assert html =~ context.slug
|
||||||
end
|
end
|
||||||
|
|
||||||
test "searches by tag", %{conn: conn} do
|
|
||||||
{:ok, index_live, html} = live(conn, Routes.context_index_path(conn, :index))
|
|
||||||
|
|
||||||
assert html =~ "example-tag"
|
|
||||||
assert index_live |> element("a", "example-tag") |> render_click()
|
|
||||||
assert_patch(index_live, Routes.context_index_path(conn, :search, "example-tag"))
|
|
||||||
end
|
|
||||||
|
|
||||||
test "saves new context", %{conn: conn} do
|
test "saves new context", %{conn: conn} do
|
||||||
{:ok, index_live, _html} = live(conn, Routes.context_index_path(conn, :index))
|
{:ok, index_live, _html} = live(conn, Routes.context_index_path(conn, :index))
|
||||||
|
|
||||||
@ -154,14 +146,6 @@ defmodule MemexWeb.ContextLiveTest do
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "searches by tag", %{conn: conn, context: context} do
|
|
||||||
{:ok, show_live, html} = live(conn, Routes.context_show_path(conn, :show, context.slug))
|
|
||||||
|
|
||||||
assert html =~ "example-tag"
|
|
||||||
assert show_live |> element("a", "example-tag") |> render_click()
|
|
||||||
assert_redirect(show_live, Routes.context_index_path(conn, :search, "example-tag"))
|
|
||||||
end
|
|
||||||
|
|
||||||
test "displays context", %{conn: conn, context: context, note: %{slug: note_slug}} do
|
test "displays context", %{conn: conn, context: context, note: %{slug: note_slug}} do
|
||||||
{:ok, show_live, html} = live(conn, Routes.context_show_path(conn, :show, context.slug))
|
{:ok, show_live, html} = live(conn, Routes.context_show_path(conn, :show, context.slug))
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ defmodule MemexWeb.NoteLiveTest do
|
|||||||
|
|
||||||
import Phoenix.LiveViewTest
|
import Phoenix.LiveViewTest
|
||||||
import Memex.NotesFixtures
|
import Memex.NotesFixtures
|
||||||
alias MemexWeb.Endpoint
|
|
||||||
|
|
||||||
@create_attrs %{
|
@create_attrs %{
|
||||||
"content" => "some content",
|
"content" => "some content",
|
||||||
@ -38,14 +37,6 @@ defmodule MemexWeb.NoteLiveTest do
|
|||||||
assert html =~ note.slug
|
assert html =~ note.slug
|
||||||
end
|
end
|
||||||
|
|
||||||
test "searches by tag", %{conn: conn} do
|
|
||||||
{:ok, index_live, html} = live(conn, Routes.note_index_path(conn, :index))
|
|
||||||
|
|
||||||
assert html =~ "example-tag"
|
|
||||||
assert index_live |> element("a", "example-tag") |> render_click()
|
|
||||||
assert_patch(index_live, Routes.note_index_path(conn, :search, "example-tag"))
|
|
||||||
end
|
|
||||||
|
|
||||||
test "saves new note", %{conn: conn} do
|
test "saves new note", %{conn: conn} do
|
||||||
{:ok, index_live, _html} = live(conn, Routes.note_index_path(conn, :index))
|
{:ok, index_live, _html} = live(conn, Routes.note_index_path(conn, :index))
|
||||||
|
|
||||||
@ -141,39 +132,4 @@ defmodule MemexWeb.NoteLiveTest do
|
|||||||
refute has_element?(index_live, "#note-#{note.id}")
|
refute has_element?(index_live, "#note-#{note.id}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "show with note" do
|
|
||||||
setup [:register_and_log_in_user]
|
|
||||||
|
|
||||||
setup %{user: user} do
|
|
||||||
%{slug: note_slug} = note = note_fixture(user)
|
|
||||||
|
|
||||||
[
|
|
||||||
note: note,
|
|
||||||
backlinked_note:
|
|
||||||
note_fixture(%{content: "example with backlink to [[#{note_slug}]] note"}, user)
|
|
||||||
]
|
|
||||||
end
|
|
||||||
|
|
||||||
test "searches by tag", %{conn: conn, note: note} do
|
|
||||||
{:ok, show_live, html} = live(conn, Routes.note_show_path(conn, :show, note.slug))
|
|
||||||
|
|
||||||
assert html =~ "example-tag"
|
|
||||||
assert show_live |> element("a", "example-tag") |> render_click()
|
|
||||||
assert_redirect(show_live, Routes.note_index_path(conn, :search, "example-tag"))
|
|
||||||
end
|
|
||||||
|
|
||||||
test "displays context", %{
|
|
||||||
conn: conn,
|
|
||||||
backlinked_note: %{slug: backlinked_note_slug},
|
|
||||||
note: %{slug: note_slug}
|
|
||||||
} do
|
|
||||||
{:ok, show_live, html} =
|
|
||||||
live(conn, Routes.note_show_path(conn, :show, backlinked_note_slug))
|
|
||||||
|
|
||||||
assert html =~ "context"
|
|
||||||
assert html =~ Routes.note_show_path(Endpoint, :show, note_slug)
|
|
||||||
assert has_element?(show_live, "[data-qa=\"note-link-#{note_slug}\"]")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -48,14 +48,6 @@ defmodule MemexWeb.PipelineLiveTest do
|
|||||||
assert html =~ pipeline.description
|
assert html =~ pipeline.description
|
||||||
end
|
end
|
||||||
|
|
||||||
test "searches by tag", %{conn: conn} do
|
|
||||||
{:ok, index_live, html} = live(conn, Routes.pipeline_index_path(conn, :index))
|
|
||||||
|
|
||||||
assert html =~ "example-tag"
|
|
||||||
assert index_live |> element("a", "example-tag") |> render_click()
|
|
||||||
assert_patch(index_live, Routes.pipeline_index_path(conn, :search, "example-tag"))
|
|
||||||
end
|
|
||||||
|
|
||||||
test "saves new pipeline", %{conn: conn} do
|
test "saves new pipeline", %{conn: conn} do
|
||||||
{:ok, index_live, _html} = live(conn, Routes.pipeline_index_path(conn, :index))
|
{:ok, index_live, _html} = live(conn, Routes.pipeline_index_path(conn, :index))
|
||||||
|
|
||||||
@ -183,14 +175,6 @@ defmodule MemexWeb.PipelineLiveTest do
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "searches by tag", %{conn: conn, pipeline: pipeline} do
|
|
||||||
{:ok, show_live, html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
|
|
||||||
|
|
||||||
assert html =~ "example-tag"
|
|
||||||
assert show_live |> element("a", "example-tag") |> render_click()
|
|
||||||
assert_redirect(show_live, Routes.pipeline_index_path(conn, :search, "example-tag"))
|
|
||||||
end
|
|
||||||
|
|
||||||
test "updates a step", %{conn: conn, pipeline: pipeline, step: step} do
|
test "updates a step", %{conn: conn, pipeline: pipeline, step: step} do
|
||||||
{:ok, show_live, _html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
|
{:ok, show_live, _html} = live(conn, Routes.pipeline_show_path(conn, :show, pipeline.slug))
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ defmodule Memex.ContextsFixtures do
|
|||||||
attrs
|
attrs
|
||||||
|> Enum.into(%{
|
|> Enum.into(%{
|
||||||
content: "some content",
|
content: "some content",
|
||||||
tags: ["example-tag"],
|
tags: [],
|
||||||
slug: random_slug(),
|
slug: random_slug(),
|
||||||
visibility: :private
|
visibility: :private
|
||||||
})
|
})
|
||||||
|
@ -16,7 +16,7 @@ defmodule Memex.NotesFixtures do
|
|||||||
attrs
|
attrs
|
||||||
|> Enum.into(%{
|
|> Enum.into(%{
|
||||||
content: "some content",
|
content: "some content",
|
||||||
tags: ["example-tag"],
|
tags: [],
|
||||||
slug: random_slug(),
|
slug: random_slug(),
|
||||||
visibility: :private
|
visibility: :private
|
||||||
})
|
})
|
||||||
|
@ -16,7 +16,7 @@ defmodule Memex.PipelinesFixtures do
|
|||||||
attrs
|
attrs
|
||||||
|> Enum.into(%{
|
|> Enum.into(%{
|
||||||
description: "some description",
|
description: "some description",
|
||||||
tags: ["example-tag"],
|
tags: [],
|
||||||
slug: random_slug(),
|
slug: random_slug(),
|
||||||
visibility: :private
|
visibility: :private
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user