forked from trent_larson/crowd-funder-for-time-pwa
Chore: convert "unnamed" into constant
- "Unnamed/Unknown" simplified into just "Unnamed" - Phrase variations have their own constants
This commit is contained in:
@@ -88,6 +88,7 @@ import {
|
||||
NOTIFY_GIFTED_DETAILS_NO_IDENTIFIER,
|
||||
NOTIFY_GIFTED_DETAILS_RECORDING_GIVE,
|
||||
} from "@/constants/notifications";
|
||||
import { UNNAMED_ENTITY_NAME } from "@/constants/entities";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -457,7 +458,7 @@ export default class GiftedDialog extends Vue {
|
||||
if (!this.giver || !this.giver.did) {
|
||||
this.giver = {
|
||||
did: "",
|
||||
name: "Unnamed",
|
||||
name: UNNAMED_ENTITY_NAME,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -519,7 +520,7 @@ export default class GiftedDialog extends Vue {
|
||||
if (!this.receiver || !this.receiver.did) {
|
||||
this.receiver = {
|
||||
did: "",
|
||||
name: "Unnamed",
|
||||
name: UNNAMED_ENTITY_NAME,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -596,7 +597,7 @@ export default class GiftedDialog extends Vue {
|
||||
return { ...contact, name: "You" };
|
||||
} else if (!contact.did || contact.did === "") {
|
||||
// If DID is empty/null, create "Unnamed" entity
|
||||
return { ...contact, name: "Unnamed" };
|
||||
return { ...contact, name: UNNAMED_ENTITY_NAME };
|
||||
} else {
|
||||
// Return the contact as-is
|
||||
return contact;
|
||||
|
||||
Reference in New Issue
Block a user