Browse Source

Chore: lint fix

pull/155/head
Jose Olarte III 2 weeks ago
parent
commit
ec53452220
  1. 8
      src/components/EntitySummaryButton.vue
  2. 2
      src/components/GiftedDialog.vue
  3. 2
      src/components/PersonCard.vue
  4. 2
      src/constants/entities.ts
  5. 2
      src/constants/notifications.ts
  6. 26
      src/views/ContactGiftingView.vue

8
src/components/EntitySummaryButton.vue

@ -144,12 +144,12 @@ export default class EntitySummaryButton extends Vue {
*/ */
get nameClasses(): string { get nameClasses(): string {
const baseClasses = "font-semibold truncate"; const baseClasses = "font-semibold truncate";
// Add italic styling for special "Unnamed" or entities without set names // Add italic styling for special "Unnamed" or entities without set names
if (!this.entity?.name || this.entity?.did === "") { if (!this.entity?.name || this.entity?.did === "") {
return `${baseClasses} italic text-slate-500`; return `${baseClasses} italic text-slate-500`;
} }
return baseClasses; return baseClasses;
} }
@ -161,12 +161,12 @@ export default class EntitySummaryButton extends Vue {
if (this.entity?.name) { if (this.entity?.name) {
return this.entity.name; return this.entity.name;
} }
// If the entity is the special "Unnamed", use "Unnamed" // If the entity is the special "Unnamed", use "Unnamed"
if (this.entity?.did === "") { if (this.entity?.did === "") {
return UNNAMED_ENTITY_NAME; return UNNAMED_ENTITY_NAME;
} }
// If the entity does not have a set name, but is not the special "Unnamed", use their DID // If the entity does not have a set name, but is not the special "Unnamed", use their DID
return this.entity?.did; return this.entity?.did;
} }

2
src/components/GiftedDialog.vue

@ -227,8 +227,6 @@ export default class GiftedDialog extends Vue {
this.allMyDids = await retrieveAccountDids(); this.allMyDids = await retrieveAccountDids();
if ( if (
this.giverEntityType === "project" || this.giverEntityType === "project" ||
this.recipientEntityType === "project" this.recipientEntityType === "project"

2
src/components/PersonCard.vue

@ -114,7 +114,7 @@ export default class PersonCard extends Vue {
if (this.person.name) { if (this.person.name) {
return this.person.name; return this.person.name;
} }
// If the entity does not have a set name // If the entity does not have a set name
return this.person.did; return this.person.did;
} }

2
src/constants/entities.ts

@ -12,5 +12,3 @@ export const UNNAMED_PERSON = "unnamed person";
// Project-related unnamed entities // Project-related unnamed entities
export const UNNAMED_PROJECT = "Unnamed Project"; export const UNNAMED_PROJECT = "Unnamed Project";

2
src/constants/notifications.ts

@ -874,7 +874,7 @@ export const NOTIFY_CONTACT_LINK_COPIED = {
// Template for registration success message // Template for registration success message
// Used in: ContactsView.vue (register method - registration success with contact name) // Used in: ContactsView.vue (register method - registration success with contact name)
export const getRegisterPersonSuccessMessage = (name?: string): string => export const getRegisterPersonSuccessMessage = (name?: string): string =>
`${name || THAT_UNNAMED_PERSON} ${NOTIFY_REGISTER_PERSON_SUCCESS.message}`; `${name || THAT_UNNAMED_PERSON} ${NOTIFY_REGISTER_PERSON_SUCCESS.message}`;
// Template for visibility success message // Template for visibility success message
// Used in: ContactsView.vue (setVisibility method - visibility success with contact name) // Used in: ContactsView.vue (setVisibility method - visibility success with contact name)

26
src/views/ContactGiftingView.vue

@ -42,7 +42,9 @@
icon="circle-question" icon="circle-question"
class="text-slate-400 text-4xl shrink-0" class="text-slate-400 text-4xl shrink-0"
/> />
<span class="text-ellipsis overflow-hidden italic text-slate-500">{{ unnamedEntityName }}</span> <span class="text-ellipsis overflow-hidden italic text-slate-500">{{
unnamedEntityName
}}</span>
</span> </span>
<span class="text-right"> <span class="text-right">
<button <button
@ -61,14 +63,22 @@
class="border-b border-slate-300 py-3" class="border-b border-slate-300 py-3"
> >
<h2 class="text-base flex gap-4 items-center"> <h2 class="text-base flex gap-4 items-center">
<span class="grow flex gap-2 items-center font-medium overflow-hidden"> <span
class="grow flex gap-2 items-center font-medium overflow-hidden"
>
<EntityIcon <EntityIcon
:contact="contact" :contact="contact"
:icon-size="34" :icon-size="34"
class="inline-block align-middle border border-slate-300 rounded-full overflow-hidden shrink-0" class="inline-block align-middle border border-slate-300 rounded-full overflow-hidden shrink-0"
/> />
<span v-if="contact.name" class="text-ellipsis overflow-hidden">{{ contact.name }}</span> <span v-if="contact.name" class="text-ellipsis overflow-hidden">{{
<span v-else class="text-ellipsis overflow-hidden italic text-slate-500">{{ contact.did }}</span> contact.name
}}</span>
<span
v-else
class="text-ellipsis overflow-hidden italic text-slate-500"
>{{ contact.did }}</span
>
</span> </span>
<span class="text-right"> <span class="text-right">
<button <button
@ -268,7 +278,10 @@ export default class ContactGiftingView extends Vue {
return { giver, recipient }; return { giver, recipient };
} else { } else {
// We're selecting a recipient, so the selected entity becomes the recipient // We're selecting a recipient, so the selected entity becomes the recipient
const recipient = selectedEntity || { did: "", name: UNNAMED_ENTITY_NAME }; const recipient = selectedEntity || {
did: "",
name: UNNAMED_ENTITY_NAME,
};
const giver = this.createGiverFromContext(); const giver = this.createGiverFromContext();
return { giver, recipient }; return { giver, recipient };
} }
@ -329,8 +342,6 @@ export default class ContactGiftingView extends Vue {
return UNNAMED_ENTITY_NAME; return UNNAMED_ENTITY_NAME;
} }
get shouldShowYouEntity(): boolean { get shouldShowYouEntity(): boolean {
if (this.stepType === "giver") { if (this.stepType === "giver") {
// When selecting a giver, show "You" if the current recipient is not "You" // When selecting a giver, show "You" if the current recipient is not "You"
@ -356,4 +367,3 @@ export default class ContactGiftingView extends Vue {
} }
} }
</script> </script>

Loading…
Cancel
Save