Added mastodon and mastodon_instance settings to user profiles
This commit is contained in:
@@ -54,6 +54,13 @@
|
||||
<%= f.select :skype_public, [["Staff only", false], ["All users", true]], {}, { disabled: !can_edit? } %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mastodon</td>
|
||||
<td style="display:inline;padding:0px">
|
||||
<%= f.text_field :mastodon, placeholder: "Mastodon username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)), style: "width:49%;float:left;margin-right:2%" %>
|
||||
<%= f.text_field :mastodon_instance, placeholder: "Mastodon instance", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)), style: "width:49%" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>YouTube Channel ID</td>
|
||||
<td>
|
||||
|
||||
@@ -58,6 +58,17 @@
|
||||
<td><%= link_to @user.skype, "skype:#{@user.skype}?chat", target: "_blank" %></a></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@user.mastodon.blank? %>
|
||||
<tr>
|
||||
<td><b>Mastodon</b></td>
|
||||
<td>
|
||||
<% if @user.mastodon_instance %>
|
||||
<%= link_to "@#{@user.mastodon}", "https://#{CGI.escape(@user.mastodon_instance)}/@#{CGI.escape(@user.mastodon)}", :target => "_blank" %></td>
|
||||
<% else %>
|
||||
<%= @user.mastodon %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% if !@user.youtube.blank? && !@user.youtube_channelname.blank? %>
|
||||
<tr>
|
||||
<td><b>YouTube</b></td>
|
||||
|
||||
Reference in New Issue
Block a user