Merge remote-tracking branch 'upstream/pull/3398'

This commit is contained in:
Tom Hughes 2022-02-16 18:13:16 +00:00
commit 1f8df781be
10 changed files with 142 additions and 5 deletions

View file

@ -0,0 +1,38 @@
<% content_for :heading do %>
<h1><%= t ".title" %></h1>
<% end %>
<%= render :partial => "settings_menu" %>
<div class="alert alert-danger row mx-0 p-3 align-items-center">
<div class="col-auto">
<picture>
<source srcset="<%= image_path "notice.svg" %>" type="image/svg+xml"></source>
<%= image_tag("notice.png", :srcset => image_path("notice.svg")) %>
</picture>
</div>
<div class="col">
<p class="mb-0"><%= t ".warning" %></p>
</div>
</div>
<p><%= t ".delete_introduction" %></p>
<ul>
<li><%= t ".delete_profile" %></li>
<li><%= t ".delete_display_name" %></li>
</ul>
<p><%= t ".retain_caveats" %></p>
<ul>
<li><%= t ".retain_edits" %></li>
<li><%= t ".retain_traces" %></li>
<li><%= t ".retain_diary_entries" %></li>
<li><%= t ".retain_notes" %></li>
<li><%= t ".retain_changeset_discussions" %></li>
<li><%= t ".retain_email" %></li>
</ul>
<%= link_to t(".delete_account"), account_path, { :method => :delete, :class => "btn btn-danger", :data => { :confirm => t(".confirm_delete") } } %>
<%= link_to t(".cancel"), edit_account_path, :class => "btn btn-link" %>

View file

@ -54,7 +54,14 @@
</span>
</div>
<%= f.primary t(".save changes button") %>
<div class="row justify-content-between">
<div class="col-auto btn-wrapper">
<%= f.primary t(".save changes button") %>
</div>
<div class="col-auto btn-wrapper">
<%= link_to t(".delete_account"), account_deletion_path, :class => "btn btn-outline-danger" %>
</div>
</div>
<% end %>
<% unless current_user.data_public? %>

View file

@ -3,7 +3,7 @@
<% content_for :heading do %>
<ul class="nav nav-tabs flex-column flex-sm-row">
<li class="nav-item">
<%= link_to t(".account_settings"), edit_account_path, :class => "nav-link #{'active' if controller_name == 'accounts'}" %>
<%= link_to t(".account_settings"), edit_account_path, :class => "nav-link #{'active' if %w[accounts deletions].include?(controller_name)}" %>
</li>
<li class="nav-item">
<%= link_to t(".oauth1_settings"), oauth_clients_path(current_user), :class => "nav-link #{'active' if controller_name == 'oauth_clients'}" %>