Add UI for remove thumbnail photo.

This commit is contained in:
voussoir 2021-01-20 18:25:15 -08:00
parent d6f155afbd
commit 322d459063
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -156,6 +156,17 @@ const ALBUM_ID = undefined;
Delete
</button>
{% if album.thumbnail_photo %}
<button
class="red_button button_with_confirm"
data-onclick="return remove_thumbnail_photo_form();"
data-prompt="Remove?"
data-cancel-class="gray_button"
>
Remove thumbnail
</button>
{% endif %}
<button
class="green_button button_with_confirm"
data-is-input="1"
@ -296,6 +307,11 @@ function refresh_associated_directories_form()
api.albums.refresh_directories(ALBUM_ID, common.refresh_or_alert);
}
function remove_thumbnail_photo_form()
{
api.albums.remove_thumbnail_photo(ALBUM_ID, common.refresh_or_alert);
}
function paste_photo_clipboard()
{
const photo_ids = Array.from(photo_clipboard.clipboard);