1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

copy common ts code over from browser repo

This commit is contained in:
Kyle Spearrin
2018-01-03 21:20:41 -05:00
parent ace8bd5e85
commit a95632294f
77 changed files with 6179 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { FolderData } from '../data/folderData';
import { CipherString } from './cipherString';
import Domain from './domain';
class Folder extends Domain {
id: string;
name: CipherString;
constructor(obj?: FolderData, alreadyEncrypted: boolean = false) {
super();
if (obj == null) {
return;
}
this.buildDomainModel(this, obj, {
id: null,
name: null,
}, alreadyEncrypted, ['id']);
}
decrypt(): Promise<any> {
const model = {
id: this.id,
};
return this.decryptObj(model, {
name: null,
}, null);
}
}
export { Folder };
(window as any).Folder = Folder;