mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
28 lines
562 B
TypeScript
28 lines
562 B
TypeScript
import { Jsonify } from "type-fest";
|
|
|
|
import { SecureNoteType } from "../../enums/secureNoteType";
|
|
import { SecureNote } from "../domain/secureNote";
|
|
|
|
import { ItemView } from "./itemView";
|
|
|
|
export class SecureNoteView extends ItemView {
|
|
type: SecureNoteType = null;
|
|
|
|
constructor(n?: SecureNote) {
|
|
super();
|
|
if (!n) {
|
|
return;
|
|
}
|
|
|
|
this.type = n.type;
|
|
}
|
|
|
|
get subTitle(): string {
|
|
return null;
|
|
}
|
|
|
|
static fromJSON(obj: Partial<Jsonify<SecureNoteView>>): SecureNoteView {
|
|
return Object.assign(new SecureNoteView(), obj);
|
|
}
|
|
}
|