mirror of https://github.com/keeweb/keeweb.git
15 lines
384 B
JavaScript
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 };
|