1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-29 08:00:53 +02:00
keeweb/app/scripts/views/fields/field-view-read-only.js
2019-09-18 07:08:23 +02:00

15 lines
384 B
JavaScript

import { FieldView } from 'views/fields/field-view';
import { escape } from 'util/fn';
class FieldViewReadOnly extends FieldView {
readonly = true;
renderValue(value) {
value = value.isProtected ? new Array(value.textLength + 1).join('•') : escape(value);
value = value.replace(/\n/g, '<br/>');
return value;
}
}
export { FieldViewReadOnly };