bitwarden-estensione-browser/libs/common/src/models/view/secureNoteView.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
544 B
TypeScript
Raw Normal View History

import { SecureNoteType } from "../../enums/secureNoteType";
2022-02-22 15:39:11 +01:00
import { SecureNote } from "../domain/secureNote";
2018-01-24 17:33:15 +01:00
import { ItemView } from "./itemView";
2018-01-24 17:33:15 +01:00
export class SecureNoteView extends ItemView {
2019-01-25 15:30:21 +01:00
type: SecureNoteType = null;
2018-01-24 17:33:15 +01:00
2018-01-25 20:57:42 +01:00
constructor(n?: SecureNote) {
super();
2018-01-25 20:57:42 +01:00
if (!n) {
return;
2018-01-24 17:33:15 +01:00
}
2018-01-24 22:58:34 +01:00
2018-01-24 17:33:15 +01:00
this.type = n.type;
2021-12-16 13:36:21 +01:00
}
2018-01-24 22:58:34 +01:00
get subTitle(): string {
return null;
}
2022-06-24 02:38:55 +02:00
2022-06-29 06:00:05 +02:00
static fromJSON(obj: Partial<SecureNoteView>): SecureNoteView {
2022-06-29 02:23:01 +02:00
const view = new SecureNoteView();
view.type = obj.type;
return view;
2022-06-24 02:38:55 +02:00
}
2018-01-24 17:33:15 +01:00
}