From 1879f983bd6310334996f68eeb8ef28a1dbda29b Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Wed, 22 Sep 2021 10:50:17 +0200 Subject: [PATCH] Use org name when available, otherwise address Signed-off-by: Alexis Sellier --- src/base/orgs/List.svelte | 2 +- src/base/orgs/View.svelte | 2 +- src/base/projects/View.svelte | 2 +- src/profile.ts | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/base/orgs/List.svelte b/src/base/orgs/List.svelte index deff402a1..e70b0a256 100644 --- a/src/base/orgs/List.svelte +++ b/src/base/orgs/List.svelte @@ -61,7 +61,7 @@
{#each profiles as profile}
- +
diff --git a/src/base/orgs/View.svelte b/src/base/orgs/View.svelte index 4decebca4..0f7ab1edd 100644 --- a/src/base/orgs/View.svelte +++ b/src/base/orgs/View.svelte @@ -252,7 +252,7 @@ {:then projects} {#each projects as project}
- +
{/each} {:catch err} diff --git a/src/base/projects/View.svelte b/src/base/projects/View.svelte index e77e3dd6a..5cf6c7429 100644 --- a/src/base/projects/View.svelte +++ b/src/base/projects/View.svelte @@ -86,7 +86,7 @@
{#if result.org} - + / diff --git a/src/profile.ts b/src/profile.ts index f07948338..994a04295 100644 --- a/src/profile.ts +++ b/src/profile.ts @@ -79,6 +79,11 @@ export class Profile { return this.profile?.ens?.seedHost ?? undefined; } + // Get the name, and if not available, the address. + get nameOrAddress(): string { + return this.name ?? this.address; + } + // Return the profile-specific config. This sets various URLs in the config, // based on profile data. config(config: Config): Config {