fix(android): a note's line breaks show in view, not only in the editor
white-space defaults to normal, which folds newlines into spaces: the body of a note read as one run-on paragraph, while the editor showed it correctly. The formatting looked lost until you opened the pencil - the worst kind of mismatch, since it invites re-typing what was already there. The same rows also drop break-all, which cuts mid-word. That suits a password and not prose; they break only where they must.
This commit is contained in:
@@ -237,6 +237,14 @@
|
||||
-webkit-user-select: text; user-select: text;
|
||||
}
|
||||
.field .val.mask { letter-spacing: 2px; }
|
||||
/* PRESERVER LES RETOURS A LA LIGNE A L'AFFICHAGE AUSSI. La valeur par defaut
|
||||
de white-space les replie en espaces : le corps d'une note se lisait en un
|
||||
seul paragraphe, alors que l'editeur, lui, les montrait - la mise en forme
|
||||
avait l'air perdue jusqu'a ce qu'on ouvre le crayon.
|
||||
Et break-all coupe au milieu des mots, ce qui convient a un mot de passe
|
||||
et pas a de la prose : on ne coupe qu'a la necessite. */
|
||||
.field .val.multi { white-space: pre-wrap; word-break: normal;
|
||||
overflow-wrap: anywhere; }
|
||||
.field.totp .val { font-size: 30px; font-weight: 300; letter-spacing: 2px; }
|
||||
.bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.18);
|
||||
margin-top: 10px; overflow: hidden; }
|
||||
@@ -742,6 +750,7 @@ function renderDetail(d) {
|
||||
var r = detailRows[i];
|
||||
html += '<div class="field"><div class="cap">' + esc(r.c) + '</div>'
|
||||
+ '<div class="line"><div class="val' + (r.s ? ' mask' : '')
|
||||
+ (r.m ? ' multi' : '')
|
||||
+ '" data-v="' + i + '">'
|
||||
+ (r.s ? '•'.repeat(Math.min(r.v.length, 14)) : esc(r.v))
|
||||
+ '</div>'
|
||||
|
||||
Reference in New Issue
Block a user