frenzy/lib/frenzy_web/templates/account/show.html.eex

67 lines
2.2 KiB
Elixir
Raw Normal View History

2019-11-09 18:21:45 +00:00
<h1>Account Settings</h1>
2019-11-10 16:48:41 +00:00
<h2>Username: <code><%= @user.username %></code></h2>
2019-03-31 15:52:20 +00:00
2019-04-01 15:29:03 +00:00
2019-11-10 16:48:41 +00:00
<section class="card mt-4">
<h4 class="card-header">Import/Export Data</h4>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<%= form_for @conn, Routes.account_path(@conn, :import), [method: :post, multipart: true], fn f -> %>
<%= file_input f, :file, required: true %>
<%= submit "Import OPML", class: "btn btn-primary" %>
<% end %>
</li>
<li class="list-group-item">
2020-06-07 15:14:01 +00:00
<%= form_for @conn, Routes.account_path(@conn, :export), [method: :post, class: "mt-2"], fn _f -> %>
2019-11-10 16:48:41 +00:00
<%= submit "Export OPML", class: "btn btn-primary" %>
<% end %>
</li>
</ul>
2019-08-30 18:27:52 +00:00
</section>
2019-04-01 15:29:03 +00:00
2019-11-10 16:48:41 +00:00
<section class="card mt-4">
2023-06-25 22:19:11 +00:00
<h4 class="card-header">Security</h4>
2019-08-30 18:27:52 +00:00
2023-06-25 22:19:11 +00:00
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="<%= Routes.account_path(@conn, :change_password) %>" class="btn btn-secondary">Change Password</a>
<a href="<%= Routes.account_path(@conn, :change_fever_password) %>" class="btn btn-secondary">Change Fever Password</a>
</li>
<%= if @can_link_oidc do %>
2019-11-10 16:48:41 +00:00
<li class="list-group-item">
2023-06-25 22:19:11 +00:00
<a href="<%= Routes.account_path(@conn, :link_oidc) %>" class="btn btn-secondary">Link OIDC</a>
2019-11-10 16:48:41 +00:00
</li>
2023-06-25 22:19:11 +00:00
<% end %>
<li class="list-group-item">
2019-11-10 16:48:41 +00:00
<h5 class="card-title">Approved Clients</h5>
2023-06-25 22:19:11 +00:00
<table class="table table-striped">
<thead>
<tr>
<th>Client</th>
<th>Revoke Access</th>
</tr>
</thead>
<tbody>
<%= for {approved, fervor} <- @clients do %>
<tr>
<td>
<%= if fervor.website do %>
<a href="<%= fervor.website %>"><%= fervor.client_name %></a>
<% else %>
<%= fervor.client_name %>
<% end %>
</td>
<td>
<%= form_tag Routes.account_path(@conn, :remove_client), method: :post do %>
<input type="hidden" name="client_id" value="<%= approved.client_id %>">
<%= submit "Revoke", class: "btn btn-danger" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</li>
</ul>
2019-08-30 18:27:52 +00:00
</section>