2020-04-25 08:04:23 -07:00
|
|
|
.card
|
|
|
|
.card-body
|
2020-05-10 01:40:48 -07:00
|
|
|
- if @services.count.positive?
|
2020-04-25 08:04:23 -07:00
|
|
|
= t 'views.settings.service.enabled'
|
|
|
|
- else
|
|
|
|
= t 'views.settings.service.none'
|
|
|
|
|
|
|
|
- APP_CONFIG['sharing'].each do |service, service_options|
|
2020-05-10 01:40:48 -07:00
|
|
|
- if service_options['enabled'] && @services.none? { |x| x.provider == service.to_s }
|
2022-01-15 08:37:44 -08:00
|
|
|
%p= button_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}", method: :post, class: 'btn btn-info'
|
2020-04-25 08:04:23 -07:00
|
|
|
|
2020-05-10 01:40:48 -07:00
|
|
|
- if @services.count.positive?
|
2020-04-25 08:04:23 -07:00
|
|
|
%ul.list-group
|
|
|
|
- @services.each do |service|
|
|
|
|
%li.list-group-item
|
2020-05-10 01:40:48 -07:00
|
|
|
%i{ class: "fa fa-#{service.provider}" }
|
2020-04-25 08:04:23 -07:00
|
|
|
%strong= service.provider.capitalize
|
|
|
|
(#{service.nickname})
|
2022-01-15 08:37:44 -08:00
|
|
|
= button_to t('views.settings.service.disconnect'),
|
2020-05-10 01:40:48 -07:00
|
|
|
service_path(service),
|
|
|
|
data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) },
|
2022-01-15 08:37:44 -08:00
|
|
|
method: :delete,
|
|
|
|
class: 'btn btn-link',
|
|
|
|
form: { class: 'd-inline' }
|
2022-01-04 16:00:18 -08:00
|
|
|
|
|
|
|
.col-md-6.mt-2
|
|
|
|
= bootstrap_form_for(service, as: 'service', url: update_service_path(service)) do |f|
|
|
|
|
= f.text_field :post_tag, class: 'form-control', label: 'tag', label_as_placeholder: true,
|
2022-01-05 10:48:07 -08:00
|
|
|
append: f.submit('Update', class: 'btn btn-primary'), maxlength: 20, pattern: '^[^@]*$',
|
2022-01-04 16:00:18 -08:00
|
|
|
help: "Automatically append a tag to your shared answers. #{'A # symbol is not automatically prepended.' if service.provider == 'twitter'}"
|