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

update app pw api

parent 10feffe2
......@@ -2,7 +2,8 @@ class AppPasswordsController < ApplicationController
def show
begin
res = ApiBackend::app_passwords(current_user)
@passwords = res['names']
puts res
@passwords = res['res']
if session[:app_pw]
@app_pw = session[:app_pw]
begin
......
......@@ -16,12 +16,18 @@
<% if @passwords && !@passwords.empty? %>
<ul>
<% @passwords.each do |pw| %>
<% @passwords.each do |pw, lastlogin| %>
<li>
<%= form_tag(app_passwords_path, method: "post") do %>
<%= pw %>
<%= hidden_field_tag(:delete, '', value: pw) %>
&nbsp;<%= submit_tag(t :delete) %>
<%= pw %> (
<%- if lastlogin %>
<%= t(:last_used) %>: <%= lastlogin %>
<%- else %>
<%= t(:never_used) %>
<%- end %>)
<%= hidden_field_tag(:delete, '', value: pw) %>
&nbsp;<%= submit_tag(t :delete) %>
<% end %>
</li>
<% end %>
......
......@@ -84,6 +84,8 @@ de:
password_help: "Wie finde ich ein gutes Passwort?"
weak_password_hint: "Du verwendest ein einfach zu erratendes Passwort. Bite ändere es."
qr_token_help: "Du kannst diesen QrCode scannen und den Code in einem Passwortmanager abspeichern (wie zum Beispiel Keepass2Android auf Android)."
last_used: "zuletzt verwendet"
never_used: "nie verwendet"
activerecord:
errors:
......
......@@ -82,6 +82,8 @@ en:
password_help: "How do I come up wit a good password?"
weak_password_hint: "You are using an easily guessable password. Please change it."
qr_token_help: "You can scan this QrCode and store the Token in a password store (like Keepass2Android on Android)."
last_used: "last used"
never_used: "never used"
activerecord:
......
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