Replace uuids with "nanoid"s
This commit is contained in:
@ -19,7 +19,7 @@ defmodule OutlookWeb.HtmlDocComponent do
|
||||
|
||||
def dnode(%{node: %{status: status}} = assigns) do
|
||||
~H"""
|
||||
<.dynamic_tag name="span" class="tunit" uuid={@node.uuid} {Map.get(@node.eph, :attributes, %{})}>
|
||||
<.dynamic_tag name="span" class="tunit" nid={@node.nid} {Map.get(@node.eph, :attributes, %{})}>
|
||||
<%= @node.content |> raw %>
|
||||
</.dynamic_tag>
|
||||
"""
|
||||
@ -27,7 +27,7 @@ defmodule OutlookWeb.HtmlDocComponent do
|
||||
|
||||
def dnode(assigns) when assigns.node.type == :element do
|
||||
~H"""
|
||||
<.dynamic_tag name={@node.name} uuid={@node.uuid} {Map.get(@node.eph, :attributes, %{})}>
|
||||
<.dynamic_tag name={@node.name} nid={@node.nid} {Map.get(@node.eph, :attributes, %{})}>
|
||||
<%= for child_node <- @node.content do %>
|
||||
<.dnode node={child_node} />
|
||||
<% end %>
|
||||
|
||||
@ -33,7 +33,7 @@ defmodule OutlookWeb.HtmlTreeComponent do
|
||||
|
||||
def tree_element(assigns) do
|
||||
~H"""
|
||||
<div uuid={@node.uuid} phx-click={JS.push("select", value: %{uuid: @node.uuid})}>
|
||||
<div nid={@node.nid} phx-click={JS.push("select", value: %{nid: @node.nid})}>
|
||||
<%= "#{String.duplicate(" ", @level)}<#{@node.name}>" %>
|
||||
</div>
|
||||
"""
|
||||
@ -41,7 +41,7 @@ defmodule OutlookWeb.HtmlTreeComponent do
|
||||
|
||||
def tree_text(assigns) do
|
||||
~H"""
|
||||
<div uuid={@node.uuid} phx-click={JS.push("select", value: %{uuid: @node.uuid})}>
|
||||
<div nid={@node.nid} phx-click={JS.push("select", value: %{nid: @node.nid})}>
|
||||
<%= "#{String.duplicate(" ", @level)}\"#{String.slice(@node.content, 0, 15)}...\"\n" %>
|
||||
</div>
|
||||
"""
|
||||
@ -49,7 +49,7 @@ defmodule OutlookWeb.HtmlTreeComponent do
|
||||
|
||||
def tree_comment(assigns) do
|
||||
~H"""
|
||||
<div uuid={@node.uuid} phx-click={JS.push("select", value: %{uuid: @node.uuid})} title={@node.content}>
|
||||
<div nid={@node.nid} phx-click={JS.push("select", value: %{nid: @node.nid})} title={@node.content}>
|
||||
<%= "#{String.duplicate(" ", @level)}<!-- #{String.slice(@node.content, 0, 15)}...-->\n" %>
|
||||
</div>
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user