mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-21 02:25:56 +08:00
Make file dropzone ids unique (#1699)
This commit is contained in:
parent
60d8c6fb54
commit
52bc694059
|
@ -185,7 +185,7 @@ defmodule LivebookWeb.FileSelectComponent do
|
|||
class="grow -m-1 p-1 h-full rounded-lg overflow-y-auto tiny-scrollbar"
|
||||
tabindex="-1"
|
||||
phx-hook="Dropzone"
|
||||
id="upload-file-dropzone"
|
||||
id="file-select-upload-dropzone"
|
||||
>
|
||||
<form phx-change="file_validate" phx-drop-target={@uploads.folder.ref} phx-target={@myself}>
|
||||
<%= live_file_input(@uploads.folder, class: "hidden", aria_labelledby: "import-from-file") %>
|
||||
|
|
|
@ -28,7 +28,7 @@ defmodule LivebookWeb.HomeLive.ImportFileUploadComponent do
|
|||
<div
|
||||
class="flex flex-col justify-center items-center w-full rounded-xl border-2 border-dashed border-gray-400 h-48"
|
||||
phx-hook="Dropzone"
|
||||
id="upload-file-dropzone"
|
||||
id="import-file-upload-dropzone"
|
||||
>
|
||||
<%= if @uploads.notebook.entries == [] do %>
|
||||
<span name="placeholder" class="font-medium text-gray-400">Drop your notebook here</span>
|
||||
|
|
|
@ -35,7 +35,7 @@ defmodule LivebookWeb.Output.FileInputComponent do
|
|||
class="inline-flex flex-col gap-4 p-4 border-2 border-dashed border-gray-200 rounded-lg cursor-pointer"
|
||||
phx-drop-target={@uploads.file.ref}
|
||||
phx-hook="Dropzone"
|
||||
id="upload-file-dropzone"
|
||||
id={"#{@id}-upload-dropzone"}
|
||||
>
|
||||
<div class="flex justify-center text-gray-500">
|
||||
<%= if @value do %>
|
||||
|
|
Loading…
Reference in a new issue