akkounts/app/views/admin/settings/services/_mastodon.html.erb
Râu Cao f0cfde560b
Add Mastodon API service class, auth token config
Add a new REST API service class to keep things DRY
2025-05-17 14:18:16 +04:00

26 lines
844 B
Plaintext

<h3>Mastodon</h3>
<ul role="list">
<%= render FormElements::FieldsetToggleComponent.new(
form: f,
attribute: :mastodon_enabled,
enabled: Setting.mastodon_enabled?,
title: "Enable Mastodon integration",
description: "Mastodon configuration present and features enabled"
) %>
<% if Setting.mastodon_enabled? %>
<%= render FormElements::FieldsetResettableSettingComponent.new(
key: :mastodon_public_url,
title: "Public URL"
) %>
<%= render FormElements::FieldsetResettableSettingComponent.new(
key: :mastodon_address_domain,
title: "User address domain"
) %>
<%= render FormElements::FieldsetResettableSettingComponent.new(
key: :mastodon_auth_token,
type: :password,
title: "API auth token"
) %>
<% end %>
</ul>