1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

apply collection and folder views

This commit is contained in:
Kyle Spearrin
2018-01-25 14:57:42 -05:00
parent 8d2a90e496
commit 3869dcaf7b
10 changed files with 74 additions and 36 deletions

View File

@@ -0,0 +1,18 @@
import { View } from './view';
import { Collection } from '../domain/collection';
export class CollectionView implements View {
id: string;
organizationId: string;
name: string;
constructor(c?: Collection) {
if (!c) {
return;
}
this.id = c.id;
this.organizationId = c.organizationId;
}
}

View File

@@ -0,0 +1,16 @@
import { View } from './view';
import { Folder } from '../domain/folder';
export class FolderView implements View {
id: string;
name: string;
constructor(f?: Folder) {
if (!f) {
return;
}
this.id = f.id;
}
}

View File

@@ -7,7 +7,11 @@ import { SecureNote } from '../domain/secureNote';
export class SecureNoteView implements View {
type: SecureNoteType;
constructor(n: SecureNote) {
constructor(n?: SecureNote) {
if (!n) {
return;
}
this.type = n.type;
}