mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
* Move send in libs/common * Move send in libs/angular * Move send in browser * Move send in cli * Move send in desktop * Move send in web
31 lines
687 B
TypeScript
31 lines
687 B
TypeScript
import { SendTextView } from "@bitwarden/common/tools/send/models/view/send-text.view";
|
|
|
|
export class SendTextResponse {
|
|
static template(text = "Text contained in the send.", hidden = false): SendTextResponse {
|
|
const req = new SendTextResponse();
|
|
req.text = text;
|
|
req.hidden = hidden;
|
|
return req;
|
|
}
|
|
|
|
static toView(text: SendTextResponse, view = new SendTextView()) {
|
|
if (text == null) {
|
|
return null;
|
|
}
|
|
|
|
view.text = text.text;
|
|
view.hidden = text.hidden;
|
|
return view;
|
|
}
|
|
text: string;
|
|
hidden: boolean;
|
|
|
|
constructor(o?: SendTextView) {
|
|
if (o == null) {
|
|
return;
|
|
}
|
|
this.text = o.text;
|
|
this.hidden = o.hidden;
|
|
}
|
|
}
|