Annotate download nodes to avoid socket disconnection, closes #2367

This commit is contained in:
José Valim 2023-11-21 20:06:23 +08:00
parent c350859e29
commit d6f968df1d
3 changed files with 7 additions and 1 deletions

View file

@ -37,6 +37,7 @@ defmodule LivebookWeb.SessionLive.ExportElixirComponent do
class="icon-button" class="icon-button"
aria-label="download source" aria-label="download source"
href={~p"/sessions/#{@session.id}/export/download/exs"} href={~p"/sessions/#{@session.id}/export/download/exs"}
download
> >
<.remix_icon icon="download-2-line" class="text-lg" /> <.remix_icon icon="download-2-line" class="text-lg" />
</a> </a>

View file

@ -53,6 +53,7 @@ defmodule LivebookWeb.SessionLive.ExportLiveMarkdownComponent do
href={ href={
~p"/sessions/#{@session.id}/download/export/livemd?include_outputs=#{@include_outputs}" ~p"/sessions/#{@session.id}/download/export/livemd?include_outputs=#{@include_outputs}"
} }
download
> >
<.remix_icon icon="download-2-line" class="text-lg" /> <.remix_icon icon="download-2-line" class="text-lg" />
</a> </a>

View file

@ -157,7 +157,11 @@ defmodule LivebookWeb.SessionLive.FilesListComponent do
</button> </button>
</.menu_item> </.menu_item>
<.menu_item> <.menu_item>
<a role="menuitem" href={~p"/sessions/#{@session.id}/download/files/#{file_entry.name}"}> <a
role="menuitem"
href={~p"/sessions/#{@session.id}/download/files/#{file_entry.name}"}
download
>
<.remix_icon icon="download-2-line" /> <.remix_icon icon="download-2-line" />
<span>Download</span> <span>Download</span>
</a> </a>