mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[SM-288] Rename models to follow naming convention (#3795)
This commit is contained in:
39
libs/common/src/models/domain/send-text.ts
Normal file
39
libs/common/src/models/domain/send-text.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { SendTextData } from "../data/send-text.data";
|
||||
import { SendTextView } from "../view/send-text.view";
|
||||
|
||||
import Domain from "./domain-base";
|
||||
import { EncString } from "./enc-string";
|
||||
import { SymmetricCryptoKey } from "./symmetric-crypto-key";
|
||||
|
||||
export class SendText extends Domain {
|
||||
text: EncString;
|
||||
hidden: boolean;
|
||||
|
||||
constructor(obj?: SendTextData) {
|
||||
super();
|
||||
if (obj == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.hidden = obj.hidden;
|
||||
this.buildDomainModel(
|
||||
this,
|
||||
obj,
|
||||
{
|
||||
text: null,
|
||||
},
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
decrypt(key: SymmetricCryptoKey): Promise<SendTextView> {
|
||||
return this.decryptObj(
|
||||
new SendTextView(this),
|
||||
{
|
||||
text: null,
|
||||
},
|
||||
null,
|
||||
key
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user