Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
720405c0
Commit
720405c0
authored
Aug 24, 2018
by
o@immerda.ch
Browse files
various ux improvements
parent
2b34985a
Changes
17
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/app_passwords.coffee
0 → 100644
View file @
720405c0
/
/=
require
qrtoggle
.
js
app/assets/javascripts/application.js
View file @
720405c0
...
...
@@ -12,3 +12,16 @@
//
//= require rails-ujs
//= require activestorage
function
fadeOutNotice
()
{
var
n
=
document
.
getElementById
(
'
flash-notice
'
).
style
;
n
.
opacity
=
1
;
(
function
fade
(){(
n
.
opacity
-=
.
1
)
<
0
?{}:
setTimeout
(
fade
,
100
)})();
}
function
mainOnLoad
()
{
if
(
document
.
getElementById
(
'
flash-notice
'
))
{
window
.
setTimeout
(
fadeOutNotice
,
10000
);
}
}
window
.
addEventListener
(
"
load
"
,
mainOnLoad
)
app/assets/javascripts/mail_crypt.coffee
0 → 100644
View file @
720405c0
/
/=
require
qrtoggle
.
js
app/assets/javascripts/qrtoggle.js
0 → 100644
View file @
720405c0
function
qrtoggle
()
{
if
(
document
.
getElementById
(
'
qr-hidden
'
).
style
.
display
==
'
block
'
)
document
.
getElementById
(
'
qr-hidden
'
).
style
.
display
=
'
none
'
;
else
document
.
getElementById
(
'
qr-hidden
'
).
style
.
display
=
'
block
'
;
}
function
loadQrtoggle
()
{
if
(
document
.
getElementById
(
'
qr-toggle
'
))
{
document
.
getElementById
(
'
qr-hidden
'
).
style
.
display
=
'
none
'
;
document
.
getElementById
(
'
qr-toggle
'
).
addEventListener
(
"
click
"
,
qrtoggle
)
}
}
window
.
addEventListener
(
"
load
"
,
loadQrtoggle
)
app/assets/javascripts/signup.coffee
View file @
720405c0
...
...
@@ -5,3 +5,4 @@
//
=
require
pwstrength
//
=
require
signup_helpers
//
=
require
pwhelp
//
=
require
qrtoggle
.
js
app/controllers/sessions_controller.rb
View file @
720405c0
...
...
@@ -125,7 +125,7 @@ class SessionsController < ApplicationController
@pow_factor
=
session
[
:pow_factor
]
||=
1
@handoff
=
params
[
:handoff
]
@unlock
=
params
[
:unlock
]
if
!
load_page
unless
load_page
.
present?
@news_frame
=
news_frame
end
end
...
...
app/controllers/signup_controller.rb
View file @
720405c0
...
...
@@ -37,7 +37,9 @@ class SignupController < ApplicationController
return
end
if
@recovery_email
.
present?
&&
!
EmailValidation
::
check_external_email
(
@recovery_email
)
if
@recovery_email
.
present?
&&
(
!
EmailValidation
::
check_external_email
(
@recovery_email
)
||
@recovery_email
==
full_email
)
flash
[
:notice
]
=
:invalid_recovery_email
return
end
...
...
app/views/app_passwords/show.html.erb
View file @
720405c0
...
...
@@ -5,8 +5,10 @@
<p>
<div
class=
"app-password"
>
<%=
@app_pw
%>
</div>
<br
/>
<b>
<%=
t
(
:qr_code
)
%>
</b>
<b><a
href=
"#"
id=
"qr-toggle"
>
<%=
t
(
:qr_code
)
%>
</a></b>
<div
id=
"qr-hidden"
>
<div
class=
"qr-field"
>
<%=
raw
(
@qr
.
as_html
)
%>
</div>
</div>
</p>
<%
end
%>
<p>
...
...
app/views/delete_account/show.html.erb
View file @
720405c0
...
...
@@ -6,5 +6,5 @@
<%=
label_tag
(
:pass
,
(
t
:password
))
%>
<%=
password_field_tag
(
:pass
)
%>
<%=
submit_tag
(
t
:delete
)
%>
<%=
link_to
"Cancel"
,
root_path
%>
<%=
link_to
t
(
:back
)
,
root_path
%>
<%
end
%>
app/views/layouts/application.html.erb
View file @
720405c0
...
...
@@ -41,7 +41,7 @@
<div
class=
"content-inner"
>
<%
if
flash
[
:notice
]
%>
<div
class=
"notice"
>
<%=
(
t
flash
[
:notice
])
%>
</div>
<div
id=
"flash-notice"
class=
"notice"
>
<%=
(
t
flash
[
:notice
])
%>
</div>
<%
end
%>
<%=
yield
%>
...
...
app/views/mail_crypt/show.html.erb
View file @
720405c0
...
...
@@ -10,9 +10,11 @@
</p>
<br
/>
<p>
<b>
<%=
t
(
:qr_code
)
%>
</b>
<b><a
href=
"#"
id=
"qr-toggle"
>
<%=
t
(
:qr_code
)
%>
</a></b>
<div
id=
"qr-hidden"
>
<%=
t
(
:qr_token_help
)
%>
<div
class=
"qr-field"
>
<%=
raw
(
@qr
.
as_html
)
%>
</div>
</div>
</p>
<%
else
%>
...
...
app/views/sessions/new.html.erb
View file @
720405c0
...
...
@@ -22,8 +22,8 @@
</p>
<%
end
%>
<hr
style=
"margin-top:100px"
/>
<%
if
@news_frame
%>
<hr
style=
"margin-top:100px"
/>
<div
class=
"news"
>
<div
class=
"news-box"
>
<%=
@news_frame
%>
...
...
app/views/signup/create.html.erb
View file @
720405c0
...
...
@@ -28,6 +28,7 @@
<div
id=
'confirm_ok'
>
</td><td>
</td></tr>
<tr><td
colspan=
"4"
>
<%=
t
:recovery_email_short_help
%>
</td></tr>
<tr><td>
<%=
label_tag
(
:recovery_email
,
(
t
:recovery_email
))
%>
</td><td>
...
...
@@ -36,8 +37,6 @@
</td><td>
</td></tr>
</table>
<%=
t
:recovery_email_short_help
%>
<br
/>
<br
/>
<h4><a
id=
"pw-help-toggle"
href=
"#"
>
<%=
t
(
:password_help
)
%>
</a></h4>
...
...
@@ -49,7 +48,7 @@
<p>
<div
id=
"keep_recovery_token_question"
>
<br
/>
<%=
t
:recovery_token_
short_
help
%>
<%=
t
:recovery_token_help
%>
<br
/>
<input
type=
"radio"
id=
"keep_recovery_token_no"
name=
"keep_recovery_token"
value=
"no"
<%=
if
@keep_recovery_token
==
'no'
then
'checked="checked"'
else
''
end
%>
...
...
app/views/signup/success.html.erb
View file @
720405c0
...
...
@@ -7,28 +7,32 @@
</p>
<p>
<%=
t
(
:new_account_intro_token
)
%>
<br
/>
<%=
t
(
:new_account_intro2
)
%>
</p>
<br/>
<%=
t
(
:recovery_token_short_help
)
%>
<br
/>
<%
if
@mail_crypt_recovery_token
%>
<%=
t
(
:new_account_intro_token_display
)
%>
<br
/>
<br
/>
<b>
<%=
t
(
:recovery_token
)
%>
</b>
<div
class=
"output-box"
>
<%=
@mail_crypt_recovery_token
%>
</div>
</p>
<p>
<b>
<%=
t
(
:qr_code
)
%>
</b>
<%=
t
(
:new_account_intro_token_display
)
%>
<br
/>
<p>
<b><a
href=
"#"
id=
"qr-toggle"
>
<%=
t
(
:qr_code
)
%>
</a></b>
<div
id=
"qr-hidden"
>
<%=
t
(
:qr_token_help
)
%>
<div
class=
"qr-field"
>
<%=
raw
(
@qr
.
as_html
)
%>
</div>
</div>
</p>
<br
/>
<%
else
%>
<%=
t
(
:new_account_intro_token_generate
)
%>
<%
end
%>
<p>
<%=
t
(
:new_account_intro2
)
%>
</p>
<br/>
<p>
<ul
class=
"menu"
>
...
...
config/initializers/assets.rb
View file @
720405c0
...
...
@@ -11,4 +11,4 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules')
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails
.
application
.
config
.
assets
.
precompile
+=
%w( sessions.js password.js signup.js users.js domains.js)
Rails
.
application
.
config
.
assets
.
precompile
+=
%w( sessions.js password.js signup.js users.js domains.js
mail_crypt.js app_passwords.js
)
config/locales/de.yml
View file @
720405c0
...
...
@@ -27,7 +27,7 @@ de:
recovery_token
:
"
Wiederherstellungscode"
recovery_token_short_help
:
"
Deine
Mailbox
ist
mit
deinem
Passwort
gesichert.
Wenn
du
es
vergisst,
kannst
du
die
bestehenden
Mails
nur
mit
einem
Wiederherstellungscode
wieder
lesen."
recovery_token_help
:
"
Deine
Mails
sind
a
uf
unser
n
Server
n
mit
deinem
Passwort
gesichert.
Wenn
du
dein
Passwort
vergisst,
sind
sie
nicht
mehr
lesbar.
Aber
keine
Angst,
du
kannst
Vors
or
g
en
.
Generiere
einen
Wiederherstellungscode
und
bewahre
ihn
sicher
und
gut
auf."
recovery_token_help
:
"
A
uf
unser
em
Server
sind
deine
Mails
kryptographisch
mit
deinem
Passwort
gesichert.
Wenn
du
dein
Passwort
vergisst,
musst
du
uns
einen
Wiederherstellungscode
schicken.
Ohne
diesen
Code,
gehen
deine
alten
Nachrichten
verl
oren
,
wenn
wir
dein
Passwort
zurücksetzen
müssen.
Bewahre
den
Code
sicher
auf."
recovery_token_show
:
"
Anzeigen"
password_for_recovery_token
:
"
Passwort
eingeben,
um
einen
Code
zu
generieren"
...
...
@@ -54,7 +54,7 @@ de:
create
:
"
erstellen"
app_passwords
:
"
Applikations
Passwörter"
app_passwords_short_help
:
"
Um
via
Mail
Programm
einzuloggen,
kannst
du
ein
zusätzliches
Applikations
Passwort
erstellen."
app_passwords_help
:
"
Um
mit
externen
Programmen
einzuloggen,
kannst
du
ein
zusätzliches
Applikations
Passwort.
Damit
du
nicht
dein
Hauptpasswort
in
Thunderbird,
oder
dem
Phone
speichern
musst,
kannst
du
hier
ein
spezifisches
Passwort
generieren.
Gib
dazu
den
Verwendungszweck,
sowie
dein
Hauptpasswort
ein
und
klicke
auf
generieren.
Das
Passwort
wird
dir
danach
angezeigt
und
du
kannst
es
kopieren.
Ebenfalls
kannst
du
hier
bestehende
Applikations
Passwörter
löschen."
app_passwords_help
:
"
Um
mit
externen
Programmen
einzuloggen,
kannst
du
ein
zusätzliches
Applikations
Passwort
erstellen
.
Damit
du
nicht
dein
Hauptpasswort
in
Thunderbird,
oder
dem
Phone
speichern
musst,
kannst
du
hier
ein
spezifisches
Passwort
generieren.
Gib
dazu
den
Verwendungszweck,
sowie
dein
Hauptpasswort
ein
und
klicke
auf
generieren.
Das
Passwort
wird
dir
danach
angezeigt
und
du
kannst
es
kopieren.
Ebenfalls
kannst
du
hier
bestehende
Applikations
Passwörter
löschen."
generate
:
"
generieren"
change_password_short_help
:
"
Das
Hauptpasswort
ändern"
your_main_pw
:
"
Dein
Hauptpasswort"
...
...
@@ -64,13 +64,12 @@ de:
invalid_alias_domain
:
"
Ungültige
Emailadresse"
main_title
:
"
Immerda
Kontoeinstellungen"
new_account_intro1
:
"
Dein
Konto
ist
erstellt!
Hier
ein
paar
infos"
new_account_intro_token
:
"
Deine
Mails
sind
auf
dem
Server
mit
deinem
Passwort
gesichert
abgelegt.
Wenn
du
es
vergisst,
brauchst
du
einen
Wiederherstellungscode,
um
sie
wieder
lesen
zu
können."
new_account_intro_token_display
:
"
Kopiere
den
Code
jetzt
und
bewahre
ihn
sicher
auf."
new_account_intro_token_generate
:
"
Einen
Wiederhestellungscode
kannst
du
in
deinen
Kontoeinstellungen
generieren."
new_account_intro2
:
"
Um
verschlüsselte
Mails
zu
versenden,
empfehlen
wir
dir
im
Webmail
einen
GPG
Schlüssel
zu
erstellen.
Die
Anleitung
findest
du
in
unserem
Willkommens
Email,
das
du
nun
erhalten
hast."
recovery_email
:
"
Backup
Email"
recovery_email_help
:
"
Du
kannst
hier
bestimmen,
von
welcher
Email
Adresse
aus
du
ein
Passwort
zurücksetzen
kannst.
Wenn
du
dies
bereits
getan
hast,
kannst
du
hier
deine
Entscheidung
überschreiben.
Solltest
du
die
gesicherte
Mailablage
aktiviert
haben,
ist
deine
Mailbox
mit
deinem
Passwort
verknüpft.
Wenn
du
es
vergisst
brauchst
du
zusätzlich
einen
Wiederherstellungscode
um
die
alten
Mails
zu
lesen.
Wir
speichern
die
Emailadresse,
so
dass
wir
sie
zwar
vergleichen
können,
sie
aber
nicht
lesen
können.
(Stichwort:
Gehashed)
"
recovery_email_short_help
:
"
Von
dieser
Adresse
aus
kannst
du
dein
Passwort
zurücksetzen."
recovery_email_help
:
"
Du
kannst
hier
bestimmen,
von
welcher
Email
Adresse
aus
du
ein
Passwort
zurücksetzen
kannst.
Wenn
du
dies
bereits
getan
hast,
kannst
du
hier
deine
Entscheidung
überschreiben.
Du
brauchst
zusätzlich
einen
Wiederherstellungscode
,
damit
deine
Mails
beim
Zurücksetzen
nicht
verloren
gehen.
"
recovery_email_short_help
:
"
Von
dieser
Adresse
aus
kannst
du
uns
schreiben,
um
dein
Passwort
zurücksetzen."
invite_token
:
"
Einladungscode"
new_account
:
"
Neues
Konto"
invalid_recovery_email
:
"
Backup
Email
ist
keine
gültige
Adresse"
...
...
config/locales/en.yml
View file @
720405c0
...
...
@@ -27,7 +27,7 @@ en:
recovery_token
:
"
Recovery
Token"
recovery_token_short_help
:
"
Your
mailbox
is
secured
by
your
password.
If
you
forget
your
password,
you
can
only
regain
access
to
your
old
messages
with
a
recovery
token."
recovery_token_help
:
"
Y
our
messages
are
secured
by
your
password.
The
storage
on
our
servers
is
unreadable
without
it.
If
you
forget
your
password,
you
need
a
recovery
token
to
regain
access
to
your
old
messages.
We
can't
res
tore
the
m
in
any
other
way
."
recovery_token_help
:
"
On
our
servers
y
our
messages
are
cryptographically
secured
by
your
password.
If
you
forget
your
password,
you
need
to
send
us
a
recovery
token
.
Without
a
recovery
token,
your
old
messages
will
be
lost,
when
you
ask
us
to
re
set
the
password.
Please
safely
store
the
token
."
recovery_token_show
:
"
show"
password_for_recovery_token
:
"
Enter
your
password
to
generate
a
recovery
token"
...
...
@@ -64,13 +64,12 @@ en:
invalid_alias_domain
:
"
Invalid
emailaddress"
main_title
:
"
Immerda
Account
Settings"
new_account_intro1
:
"
Your
account
is
now
ready!
Here
are
some
things
to
consider"
new_account_intro_token
:
"
On
our
servers
your
messages
are
secured
by
your
password.
If
you
foget
your
password,
you
need
a
recovery
token
to
regain
access
to
old
messages."
new_account_intro_token_display
:
"
Copy
the
token
now
and
store
it
safely."
new_account_intro_token_generate
:
"
You
can
generate
a
recovery
token
in
your
account
settings."
new_account_intro2
:
"
To
encrypt
your
mails,
we
recommend
you
create
a
GPG
key
in
the
webmail.
We
sent
you
a
welcome
email
with
instructions."
recovery_email
:
"
Recovery
Email"
recovery_email_help
:
"
You
can
set
a
recovery
email
here.
From
this
address
you
are
able
to
ask
us
to
reset
your
password.
If
you
already
did
this,
then
submitting
it
again,
will
override
your
former
choice.
If
you
enabled
secured
mail
storage,
then
your
mails
are
tied
to
your
password.
If
you
forget
the
password
you
additionally
need
a
recovery
token
to
regain
access
to
existing
mails.
We
are
storing
the
recovery
email
such
that
we
are
able
to
check
it,
but
not
able
to
read
it
(hashed)
."
recovery_email_short_help
:
"
You
can
request
a
new
password
from
you
r
recovery
email
address."
recovery_email_help
:
"
You
can
set
a
recovery
email
here.
From
this
address
you
are
able
to
ask
us
to
reset
your
password.
If
you
already
did
this,
then
submitting
it
again,
will
override
your
former
choice.
Remember,
if
you
forget
the
password
you
additionally
need
a
recovery
token.
Otherwise
existing
messages
will
get
lost
."
recovery_email_short_help
:
"
You
can
write
us
from
you
recovery
email
address
to
request
a
new
password
."
invite_token
:
"
Invite
Code"
new_account
:
"
New
Account"
invalid_recovery_email
:
"
Recovery
email
is
not
valid"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment