|
|
|
@ -8,6 +8,7 @@
|
|
|
|
<%= render 'shared/clipboard_copy', icon: 'copy', text: current_user.access_token.token, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
|
|
|
|
<%= render 'shared/clipboard_copy', icon: 'copy', text: current_user.access_token.token, class: 'base-button', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if @webhook_url.new_record? %>
|
|
|
|
<%= form_for @webhook_url, url: settings_webhooks_path, method: :post, html: { autocomplete: 'off' }, data: { turbo_frame: :_top } do |f| %>
|
|
|
|
<%= form_for @webhook_url, url: settings_webhooks_path, method: :post, html: { autocomplete: 'off' }, data: { turbo_frame: :_top } do |f| %>
|
|
|
|
<%= f.label :url, 'Webhook URL', class: 'text-sm font-semibold' %>
|
|
|
|
<%= f.label :url, 'Webhook URL', class: 'text-sm font-semibold' %>
|
|
|
|
<div class="space-y-2 md:flex-nowrap mt-2">
|
|
|
|
<div class="space-y-2 md:flex-nowrap mt-2">
|
|
|
|
@ -15,4 +16,13 @@
|
|
|
|
<%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button w-full' %>
|
|
|
|
<%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button w-full' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<%= form_for @webhook_url, url: settings_webhook_path(@webhook_url), method: :put, html: { autocomplete: 'off' }, data: { turbo_frame: :_top } do |f| %>
|
|
|
|
|
|
|
|
<%= f.label :url, 'Webhook URL', class: 'text-sm font-semibold' %>
|
|
|
|
|
|
|
|
<div class="space-y-2 md:flex-nowrap mt-2">
|
|
|
|
|
|
|
|
<%= f.url_field :url, class: 'base-input w-full', placeholder: 'https://example.com/hook', required: true %>
|
|
|
|
|
|
|
|
<%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button w-full' %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|