1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00
Files
browser/src/models/view/fieldView.ts
Kyle Spearrin a3beb04f7e mask field
2018-03-06 08:17:39 -05:00

24 lines
450 B
TypeScript

import { FieldType } from '../../enums/fieldType';
import { View } from './view';
import { Field } from '../domain/field';
export class FieldView implements View {
name: string;
value: string;
type: FieldType;
constructor(f?: Field) {
if (!f) {
return;
}
this.type = f.type;
}
get maskedValue(): string {
return this.value != null ? '••••••••' : null;
}
}