mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-27 05:47:05 +08:00
Update non-formatted interpolation syntax
This commit is contained in:
parent
8fdbf77bc8
commit
68cc30f173
17 changed files with 25 additions and 25 deletions
|
|
@ -62,7 +62,7 @@ defmodule LivebookWeb.CoreComponents do
|
||||||
/>
|
/>
|
||||||
<.remix_icon :if={@kind == "warning"} icon="alert-fill" class="text-xl text-yellow-500" />
|
<.remix_icon :if={@kind == "warning"} icon="alert-fill" class="text-xl text-yellow-500" />
|
||||||
<.remix_icon :if={@kind == "error"} icon="error-warning-fill" class="text-xl text-red-500" />
|
<.remix_icon :if={@kind == "error"} icon="error-warning-fill" class="text-xl text-red-500" />
|
||||||
<span class="whitespace-pre-wrap pr-2 max-h-52 overflow-y-auto tiny-scrollbar" phx-no-format><%= message %></span>
|
<span class="whitespace-pre-wrap pr-2 max-h-52 overflow-y-auto tiny-scrollbar" phx-no-format>{message}</span>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
@ -125,7 +125,7 @@ defmodule LivebookWeb.CoreComponents do
|
||||||
:if={@message}
|
:if={@message}
|
||||||
class="whitespace-pre-wrap pr-2 max-h-52 overflow-y-auto tiny-scrollbar"
|
class="whitespace-pre-wrap pr-2 max-h-52 overflow-y-auto tiny-scrollbar"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><%= @message %></div>
|
>{@message}</div>
|
||||||
<%= if @inner_block != [] do %>
|
<%= if @inner_block != [] do %>
|
||||||
{render_slot(@inner_block)}
|
{render_slot(@inner_block)}
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
@ -516,7 +516,7 @@ defmodule LivebookWeb.CoreComponents do
|
||||||
id={"#{@source_id}-highlight"}
|
id={"#{@source_id}-highlight"}
|
||||||
phx-hook="Highlight"
|
phx-hook="Highlight"
|
||||||
data-p-language={hook_prop(@language)}
|
data-p-language={hook_prop(@language)}
|
||||||
><div id={@source_id} data-source><%= @source %></div><div data-target></div></code></pre>
|
><div id={@source_id} data-source>{@source}</div><div data-target></div></code></pre>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
@ -734,7 +734,7 @@ defmodule LivebookWeb.CoreComponents do
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
<.listing items={@packages}>
|
<.listing items={@packages}>
|
||||||
<:item :let={package}><code><%= package.name %></code></:item>
|
<:item :let={package}><code>{package.name}</code></:item>
|
||||||
<:singular_suffix>package</:singular_suffix>
|
<:singular_suffix>package</:singular_suffix>
|
||||||
<:plural_suffix>packages</:plural_suffix>
|
<:plural_suffix>packages</:plural_suffix>
|
||||||
</.listing>
|
</.listing>
|
||||||
|
|
@ -774,8 +774,8 @@ defmodule LivebookWeb.CoreComponents do
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
<.table id="users" rows={@users}>
|
<.table id="users" rows={@users}>
|
||||||
<:col :let={user} label="id"><%= user.id %></:col>
|
<:col :let={user} label="id">{user.id}</:col>
|
||||||
<:col :let={user} label="username"><%= user.username %></:col>
|
<:col :let={user} label="username">{user.username}</:col>
|
||||||
</.table>
|
</.table>
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ defmodule LivebookWeb.FormComponents do
|
||||||
@class
|
@class
|
||||||
]}
|
]}
|
||||||
{@rest}
|
{@rest}
|
||||||
><%= Phoenix.HTML.Form.normalize_value("textarea", @value) %></textarea>
|
>{Phoenix.HTML.Form.normalize_value("textarea", @value)}</textarea>
|
||||||
</.field_wrapper>
|
</.field_wrapper>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ defmodule LivebookWeb.SessionHelpers do
|
||||||
assigns = %{notebook_name: session.notebook_name, file: session.file}
|
assigns = %{notebook_name: session.notebook_name, file: session.file}
|
||||||
|
|
||||||
description = ~H"""
|
description = ~H"""
|
||||||
Are you sure you want to close this session - <span class="font-semibold">“<%= @notebook_name %>”</span>?
|
Are you sure you want to close this session - <span class="font-semibold">“{@notebook_name}”</span>?
|
||||||
<br />
|
<br />
|
||||||
<%= if @file do %>
|
<%= if @file do %>
|
||||||
This won't delete any persisted files.
|
This won't delete any persisted files.
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ defmodule LivebookWeb.FileSelectComponent do
|
||||||
class="mb-4 px-4 py-3 flex space-x-4 items-center border border-gray-200 rounded-lg"
|
class="mb-4 px-4 py-3 flex space-x-4 items-center border border-gray-200 rounded-lg"
|
||||||
>
|
>
|
||||||
<p class="grow text-gray-700 text-sm">
|
<p class="grow text-gray-700 text-sm">
|
||||||
Are you sure you want to irreversibly delete <span class="font-semibold"><%= @deleting_file.path %></span>?
|
Are you sure you want to irreversibly delete <span class="font-semibold">{@deleting_file.path}</span>?
|
||||||
</p>
|
</p>
|
||||||
<div class="flex space-x-4">
|
<div class="flex space-x-4">
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ defmodule LivebookWeb.Hub.NewLive do
|
||||||
class="mr-4 text-brand-pink font-semibold text-xl leading-none"
|
class="mr-4 text-brand-pink font-semibold text-xl leading-none"
|
||||||
id="clipboard-code"
|
id="clipboard-code"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><%= @content %></div>
|
>{@content}</div>
|
||||||
|
|
||||||
<.icon_button phx-click={JS.dispatch("lb:clipcopy", to: "#clipboard-code")} type="button">
|
<.icon_button phx-click={JS.dispatch("lb:clipcopy", to: "#clipboard-code")} type="button">
|
||||||
<.remix_icon icon="clipboard-line" />
|
<.remix_icon icon="clipboard-line" />
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ defmodule LivebookWeb.Hub.SecretListComponent do
|
||||||
assigns = %{name: attrs["name"]}
|
assigns = %{name: attrs["name"]}
|
||||||
|
|
||||||
description = ~H"""
|
description = ~H"""
|
||||||
Are you sure you want to delete this secret - <span class="font-semibold"><%= @name %></span>?
|
Are you sure you want to delete this secret - <span class="font-semibold">{@name}</span>?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
{:noreply,
|
{:noreply,
|
||||||
|
|
|
||||||
|
|
@ -400,7 +400,7 @@ defmodule LivebookWeb.Output do
|
||||||
role="complementary"
|
role="complementary"
|
||||||
aria-label="error message"
|
aria-label="error message"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><%= @message %></div>
|
>{@message}</div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -415,7 +415,7 @@ defmodule LivebookWeb.Output do
|
||||||
role="complementary"
|
role="complementary"
|
||||||
aria-label="error"
|
aria-label="error"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><%= LivebookWeb.ANSIHelpers.ansi_string_to_html(@message) %></div>
|
>{LivebookWeb.ANSIHelpers.ansi_string_to_html(@message)}</div>
|
||||||
<div class="absolute right-2 top-0 z-10 invisible group-hover/error:visible">
|
<div class="absolute right-2 top-0 z-10 invisible group-hover/error:visible">
|
||||||
<.icon_button phx-click={JS.dispatch("lb:clipcopy", to: "##{@id}-message")}>
|
<.icon_button phx-click={JS.dispatch("lb:clipcopy", to: "##{@id}-message")}>
|
||||||
<.remix_icon icon="clipboard-line" />
|
<.remix_icon icon="clipboard-line" />
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ defmodule LivebookWeb.Output.MarkdownComponent do
|
||||||
class="text-gray-700 whitespace-pre-wrap hidden"
|
class="text-gray-700 whitespace-pre-wrap hidden"
|
||||||
phx-update="stream"
|
phx-update="stream"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><span :for={{dom_id, chunk}<- @streams.chunks} id={dom_id}><%= chunk.text %></span></div>
|
><span :for={{dom_id, chunk}<- @streams.chunks} id={dom_id}>{chunk.text}</span></div>
|
||||||
<div data-content class="markdown" id={"#{@id}-content"} phx-update="ignore"></div>
|
<div data-content class="markdown" id={"#{@id}-content"} phx-update="ignore"></div>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ defmodule LivebookWeb.Output.PlainTextComponent do
|
||||||
phx-update="stream"
|
phx-update="stream"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><span
|
><span
|
||||||
:for={{dom_id, chunk}<- @streams.chunks} id={dom_id}><%= chunk.text %></span></div>
|
:for={{dom_id, chunk}<- @streams.chunks} id={dom_id}>{chunk.text}</span></div>
|
||||||
"""
|
"""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,10 @@ defmodule LivebookWeb.Output.TerminalTextComponent do
|
||||||
<div data-template class="hidden" id={"#{@id}-template"} phx-no-format><div
|
<div data-template class="hidden" id={"#{@id}-template"} phx-no-format><div
|
||||||
id={"#{@id}-template-append"}
|
id={"#{@id}-template-append"}
|
||||||
phx-update="stream"
|
phx-update="stream"
|
||||||
><div :for={{dom_id, html_line} <- @streams.html_lines} id={dom_id} data-line><%= [
|
><div :for={{dom_id, html_line} <- @streams.html_lines} id={dom_id} data-line>{[
|
||||||
html_line.html,
|
html_line.html,
|
||||||
"\n"
|
"\n"
|
||||||
] %></div></div><div data-line><%= @last_html_line %></div></div>
|
]}</div></div><div data-line>{@last_html_line}</div></div>
|
||||||
<div
|
<div
|
||||||
data-content
|
data-content
|
||||||
class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
|
class="overflow-auto whitespace-pre font-editor text-gray-500 tiny-scrollbar"
|
||||||
|
|
|
||||||
|
|
@ -445,7 +445,7 @@ defmodule LivebookWeb.SessionLive do
|
||||||
assigns = %{section_name: section.name}
|
assigns = %{section_name: section.name}
|
||||||
|
|
||||||
description = ~H"""
|
description = ~H"""
|
||||||
Are you sure you want to delete this section - <span class="font-semibold">“<%= @section_name %>”</span>?
|
Are you sure you want to delete this section - <span class="font-semibold">“{@section_name}”</span>?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
confirm(socket, on_confirm,
|
confirm(socket, on_confirm,
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ defmodule LivebookWeb.SessionLive.AttachedRuntimeComponent do
|
||||||
Make sure to give the node a name and a cookie, for example:
|
Make sure to give the node a name and a cookie, for example:
|
||||||
</p>
|
</p>
|
||||||
<div class="text-gray-700 markdown">
|
<div class="text-gray-700 markdown">
|
||||||
<pre><code>iex --name <%= test_node() %> --cookie mycookie -S mix</code></pre>
|
<pre><code>iex --name {test_node()} --cookie mycookie -S mix</code></pre>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-gray-700">
|
<p class="text-gray-700">
|
||||||
Then enter the connection information below:
|
Then enter the connection information below:
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,7 @@ defmodule LivebookWeb.SessionLive.FilesListComponent do
|
||||||
assigns = %{name: file_entry.name}
|
assigns = %{name: file_entry.name}
|
||||||
|
|
||||||
description = ~H"""
|
description = ~H"""
|
||||||
Are you sure you want to delete this file - <span class="font-semibold">“<%= @name %>”</span>?
|
Are you sure you want to delete this file - <span class="font-semibold">“{@name}”</span>?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
{:noreply,
|
{:noreply,
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ defmodule LivebookWeb.SessionLive.FlyRuntimeComponent do
|
||||||
class="px-4 py-3 flex space-x-4 items-center border border-gray-200 rounded-lg"
|
class="px-4 py-3 flex space-x-4 items-center border border-gray-200 rounded-lg"
|
||||||
>
|
>
|
||||||
<p class="grow text-gray-700 text-sm">
|
<p class="grow text-gray-700 text-sm">
|
||||||
Are you sure you want to irreversibly delete <span class="font-semibold"><%= @volume_id %></span>?
|
Are you sure you want to irreversibly delete <span class="font-semibold">{@volume_id}</span>?
|
||||||
</p>
|
</p>
|
||||||
<div class="flex space-x-4">
|
<div class="flex space-x-4">
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ defmodule LivebookWeb.SessionLive.K8sRuntimeComponent do
|
||||||
class="px-4 py-3 mt-4 flex space-x-4 items-center border border-gray-200 rounded-lg"
|
class="px-4 py-3 mt-4 flex space-x-4 items-center border border-gray-200 rounded-lg"
|
||||||
>
|
>
|
||||||
<p class="grow text-gray-700 text-sm">
|
<p class="grow text-gray-700 text-sm">
|
||||||
Are you sure you want to irreversibly delete Persistent Volume Claim <span class="font-semibold"><%= @pvc_name %></span>?
|
Are you sure you want to irreversibly delete Persistent Volume Claim <span class="font-semibold">{@pvc_name}</span>?
|
||||||
</p>
|
</p>
|
||||||
<div class="flex space-x-4">
|
<div class="flex space-x-4">
|
||||||
<button
|
<button
|
||||||
|
|
@ -419,7 +419,7 @@ defmodule LivebookWeb.SessionLive.K8sRuntimeComponent do
|
||||||
<div>
|
<div>
|
||||||
Authenticated user has no permission to <span class="font-semibold">{@verb}</span>
|
Authenticated user has no permission to <span class="font-semibold">{@verb}</span>
|
||||||
<code>{@path}</code>
|
<code>{@path}</code>
|
||||||
<span :if={@namespace}> in namespace <code><%= @namespace %></code> (or the namespace doesn't exist)</span>.
|
<span :if={@namespace}> in namespace <code>{@namespace}</code> (or the namespace doesn't exist)</span>.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1310,7 +1310,7 @@ defmodule LivebookWeb.SessionLive.Render do
|
||||||
data-el-heading
|
data-el-heading
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><%= @data_view.notebook_name %></h1>
|
>{@data_view.notebook_name}</h1>
|
||||||
</div>
|
</div>
|
||||||
<.session_menu session={@session} />
|
<.session_menu session={@session} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ defmodule LivebookWeb.SessionLive.SectionComponent do
|
||||||
data-el-heading
|
data-el-heading
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
phx-no-format
|
phx-no-format
|
||||||
><%= @section_view.name %></h2>
|
>{@section_view.name}</h2>
|
||||||
<div
|
<div
|
||||||
class="ml-4 flex space-x-2 items-center"
|
class="ml-4 flex space-x-2 items-center"
|
||||||
data-el-section-actions
|
data-el-section-actions
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue