mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
[PM-328] Move Send to Tools (#5104)
* 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
This commit is contained in:
committed by
GitHub
parent
e645688f8a
commit
e238ea20a9
28
libs/common/src/tools/send/models/view/send-text.view.ts
Normal file
28
libs/common/src/tools/send/models/view/send-text.view.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { View } from "../../../../models/view/view";
|
||||
import { DeepJsonify } from "../../../../types/deep-jsonify";
|
||||
import { SendText } from "../domain/send-text";
|
||||
|
||||
export class SendTextView implements View {
|
||||
text: string = null;
|
||||
hidden: boolean;
|
||||
|
||||
constructor(t?: SendText) {
|
||||
if (!t) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.hidden = t.hidden;
|
||||
}
|
||||
|
||||
get maskedText(): string {
|
||||
return this.text != null ? "••••••••" : null;
|
||||
}
|
||||
|
||||
static fromJSON(json: DeepJsonify<SendTextView>) {
|
||||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.assign(new SendTextView(), json);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user