29 lines
1.4 KiB
Plaintext
29 lines
1.4 KiB
Plaintext
.card
|
|
.card-body
|
|
- if @services.count.positive?
|
|
= t 'views.settings.service.enabled'
|
|
- else
|
|
= t 'views.settings.service.none'
|
|
|
|
- APP_CONFIG['sharing'].each do |service, service_options|
|
|
- if service_options['enabled'] && @services.none? { |x| x.provider == service.to_s }
|
|
%p= link_to t('views.settings.service.connect', service: service.capitalize), "/auth/#{service}", method: :post
|
|
|
|
- if @services.count.positive?
|
|
%ul.list-group
|
|
- @services.each do |service|
|
|
%li.list-group-item
|
|
%i{ class: "fa fa-#{service.provider}" }
|
|
%strong= service.provider.capitalize
|
|
(#{service.nickname})
|
|
= link_to t('views.settings.service.disconnect'),
|
|
service_path(service),
|
|
data: { confirm: t('views.settings.service.confirm', service: service.provider.capitalize) },
|
|
method: :delete
|
|
|
|
.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,
|
|
append: f.submit('Update', class: 'btn btn-primary'), maxlength: 20, pattern: '^[^@]*$',
|
|
help: "Automatically append a tag to your shared answers. #{'A # symbol is not automatically prepended.' if service.provider == 'twitter'}"
|