Disable Choose button if draft file is a directory (#823)

* Disable Choose button if draft file is a directory

* Fix warnings

* Decide if choose is disabled on handle info

* Revert "Decide if choose is disabled on handle info"

This reverts commit 43a2cbc5ea.

* Use the disabled attribute
This commit is contained in:
Benjamin Philip 2021-12-25 04:23:48 +05:30 committed by GitHub
parent 39fedd43ca
commit fc3fad6543
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,6 +118,7 @@ defmodule LivebookWeb.SessionLive.PersistenceLive do
</button>
<button class="button-base button-blue"
phx-click="confirm_file"
disabled={FileSystem.File.dir?(@draft_file)}
tabindex="-1">
Choose
</button>