mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-04 03:00:32 +08:00
Use org name when available, otherwise address
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<div class="list">
|
||||
{#each profiles as profile}
|
||||
<div class="org">
|
||||
<Link to={`/orgs/${profile.address}`}>
|
||||
<Link to={`/orgs/${profile.nameOrAddress}`}>
|
||||
<div class="org-avatar">
|
||||
<Avatar source={profile.avatar ?? profile.address} />
|
||||
</div>
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
{:then projects}
|
||||
{#each projects as project}
|
||||
<div class="project">
|
||||
<Project {project} org={profile.name ?? org.address} config={profile.config(config)} />
|
||||
<Project {project} org={profile.nameOrAddress} config={profile.config(config)} />
|
||||
</div>
|
||||
{/each}
|
||||
{:catch err}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<header>
|
||||
<div class="title bold">
|
||||
{#if result.org}
|
||||
<a class="org-avatar" title={result.org.name || result.org.address} href={`/orgs/${org}`}>
|
||||
<a class="org-avatar" title={result.org.nameOrAddress} href={`/orgs/${result.org.nameOrAddress}`}>
|
||||
<Avatar source={result.org.avatar || org}/>
|
||||
</a>
|
||||
<span class="divider">/</span>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user