Commit 4e7a7afc authored by o@immerda.ch's avatar o@immerda.ch
Browse files

fix app_pw and gpgkey view on mobile

parent a283a689
......@@ -25,12 +25,6 @@
}
}
@media only screen and (max-width: 500px) {
input[type="text"], input[type="password"] {
width: 130px !important;
}
}
.content {
margin: 120px auto 0 auto;
padding: 0 2em;
......
......@@ -14,31 +14,28 @@
<%= link_to t(:back), app_passwords_path %>
<% else %>
<div class="alert" role="alert">
<%= t(:app_passwords_help) %>
</div>
<div class="alert" role="alert">
<%= t(:app_passwords_help) %>
</div>
<% if @passwords.present? %>
<table class="table table-hover">
<thead>
<tr class="border">
<th scope="col"><%= t(:app_name) %></th>
<th scope="col"><%= t(:last_used) %></th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<ul class="list-group">
<% @passwords.each do |pw, lastlogin| %>
<tr class="border">
<td class="align-middle"><%= pw %></td>
<td class="align-middle"><%- if lastlogin %><%= t(:last_used) %>: <%= lastlogin %><%- else %><%= t(:never_used) %><%- end %></td>
<td><%= form_tag(app_passwords_path, method: "post") do %><%= hidden_field_tag(:delete, '', value: pw) %><%= submit_tag(t(:delete), class: "btn btn-danger") %><% end %></td>
</tr>
<li class="list-group-item">
<%= form_tag(app_passwords_path, method: "post") do %>
<%= pw %>
(<%- if lastlogin %>
<%= t(:last_used) %>: <%= lastlogin %><%- else %><%= t(:never_used) %><%- end %>)
<%= hidden_field_tag(:delete, '', value: pw) %>
<%= submit_tag(t(:delete), class: "btn btn-danger") %>
<% end %>
</li>
<% end %>
</tbody>
</table>
</ul>
<% end %>
<div class="pt-3"></div>
<div class="card">
<div class="card-body">
<h5 class="card-title"><%= t(:new_app_passwords) %></h5>
......
......@@ -49,5 +49,6 @@
</div>
</div>
<%= link_to (t :logout), '/logout_local', class: 'list-group-item list-group-item-action' %>
<b><%= current_user %></b>
</div>
</div>
......@@ -3,40 +3,31 @@
<%= simple_format(t(:pgpkeys_help)) %>
</div>
<div class="card-body">
<table class='table'>
<thead>
<tr>
<th scope="col"><%= t(:pgpkeys_emailaddress) %></th>
<th scope="col"><%= t(:pgpkeys_published_key) %></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><%= current_user %></td>
<td>
<% if @pgpkey_description.present? %>
<pre class='pgpkey-description'><%= @pgpkey_description %></pre>
<% else %>
---
<% if @pgpkey_description.present? %>
<h5><%= t(:pgpkeys_published_key) %></h5>
<ul class="list-group">
<li class="list-group-item">
<%= form_tag(pgpkeys_path, method: "delete") do %>
<b><%= current_user %></b>
<pre class="pt-2"><%= @pgpkey_description %></pre>
<%= submit_tag(t(:delete), class: "btn btn-danger") %>
<% end %>
</td>
<td>
<%= link_to t(:delete), pgpkeys_path, method: :delete, title: t(:delete) if @pgpkey_description.present? %>
</td>
</tr>
</tbody>
</table>
</div>
<br />
</li>
</ul>
<% end %>
<div class="pt-3"></div>
<div class="card">
<div class="card-body">
<h5 class="card-title"><%= t(:pgpkeys_upload_key) %></h5>
<%= form_tag(pgpkeys_path, multipart: true) do %>
<%= file_field_tag 'pgpkey' %>
<%= submit_tag t(:pgpkeys_submit_button), class: 'btn btn-primary' %>
<div class="form-group">
<%= file_field_tag 'pgpkey' %>
</div>
<div class="form-group">
<%= submit_tag t(:pgpkeys_submit_button), class: 'btn btn-primary' %>
</div>
<% end %>
</div>
</div>
......@@ -27,7 +27,7 @@
</div>
<div class="form-group">
<%= label_tag(:totp, t(:current_totp)) %>
<%= text_field_tag(:current_totp, nil, autofocus: true, autocomplete: :off, class: "form-control") %>
<%= text_field_tag(:current_totp, nil, autocomplete: :off, class: "form-control") %>
</div>
<div class="form-group">
<%= submit_tag(t(:create), class: "btn btn-primary") %>
......
......@@ -180,7 +180,7 @@ de:
pgpkeys_key_published: ✓ Dein Schlüssel wurde im Web Key Directory veröffentlicht.
pgpkeys_upload_key: 'Lade einen neuen oder anderen Schlüssel hoch:'
pgpkeys_submit_button: Absenden
pgpkeys_error_message: 'Es ist etwas schief gegangen! Der Server antwortete: %{error_message}'
pgpkeys_error_message: 'Der Server antwortete: %{error_message}'
activerecord:
errors:
......
......@@ -182,7 +182,7 @@ en:
pgpkeys_key_published: ✓ Your key was published in the Web Key Directory.
pgpkeys_upload_key: 'Upload a new or different key:'
pgpkeys_submit_button: Send
pgpkeys_error_message: 'Something went wrong! The server responded with: %{error_message}'
pgpkeys_error_message: 'The server responded with: %{error_message}'
activerecord:
errors:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment