2018-02-19 19:07:19 +01:00
|
|
|
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
|
|
|
|
2021-11-02 23:03:37 +01:00
|
|
|
import { ItemView } from "./itemView";
|
2018-01-24 17:33:15 +01:00
|
|
|
|
2021-11-02 23:03:37 +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) {
|
2021-11-02 23:03:37 +01:00
|
|
|
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
|
|
|
}
|