mirror of
https://github.com/we-promise/sure.git
synced 2026-05-22 03:55:01 +00:00
13 lines
816 B
Plaintext
13 lines
816 B
Plaintext
<%# locals: (provider_key:, last_synced_at: nil) %>
|
|
<% recently_synced = last_synced_at.present? && last_synced_at > 60.seconds.ago %>
|
|
<% button_label = recently_synced ? t("settings.providers.recently_synced") : t("settings.providers.sync_provider") %>
|
|
<%= button_to sync_provider_settings_providers_path(provider_key: provider_key),
|
|
method: :post,
|
|
disabled: recently_synced,
|
|
title: button_label,
|
|
aria: { label: button_label },
|
|
class: "inline-flex items-center p-1 rounded text-secondary hover:text-primary hover:bg-alpha-black-50 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
form: { onclick: "event.stopPropagation()", class: "inline-flex" } do %>
|
|
<%= icon "refresh-cw", class: "w-3.5 h-3.5" %>
|
|
<% end %>
|