uploads: change loading indicator for upload widget.
Change the loading indicator from a progress bar to a spinner. Fixes issue with the <progress> element having a different appearance on different browsers.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class ApplicationComponent < ViewComponent::Base
|
||||
delegate :link_to_user, :time_ago_in_words_tagged, :format_text, :external_link_to, :tag_class, :current_page_path, to: :helpers
|
||||
delegate :edit_icon, :delete_icon, :undelete_icon, :flag_icon, :upvote_icon, :downvote_icon, :link_icon, :sticky_icon, :unsticky_icon, :hashtag_icon, :caret_down_icon, :image_icon, to: :helpers
|
||||
delegate :edit_icon, :delete_icon, :undelete_icon, :flag_icon, :upvote_icon, :downvote_icon, :link_icon, :sticky_icon, :unsticky_icon, :hashtag_icon, :caret_down_icon, :image_icon, :spinner_icon, to: :helpers
|
||||
|
||||
def policy(subject)
|
||||
Pundit.policy!(current_user, subject)
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<%= f.input :source, label: false, as: :string, placeholder: "Paste URL here", input_html: { value: url, class: "text-center" }, wrapper_html: { class: "px-4 text-center" } %>
|
||||
<%= f.input :referer_url, as: :hidden, input_html: { value: referer_url } %>
|
||||
<%= f.submit "Upload", class: "button-primary text-center mx-auto hidden", "data-disable-with": false %>
|
||||
|
||||
<progress class="w-full hidden"></progress>
|
||||
<% end %>
|
||||
|
||||
<%= spinner_icon(class: "hidden animate-spin absolute inset-0 m-auto h-12 link-color") %>
|
||||
|
||||
<template class="dropzone-preview-template">
|
||||
<div class="dz-preview dz-file-preview flex flex-col text-center space-y-4">
|
||||
<img class="object-contain px-8 max-h-360px max-w-full" data-dz-thumbnail>
|
||||
|
||||
Reference in New Issue
Block a user