Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Use org name when available, otherwise address
Alexis Sellier committed 4 years ago
commit 1879f983bd6310334996f68eeb8ef28a1dbda29b
parent abc62b02fd696c58b16c8a777f00ed6483aac6c2
4 files changed +8 -3
modified src/base/orgs/List.svelte
@@ -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>
modified src/base/orgs/View.svelte
@@ -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}
modified src/base/projects/View.svelte
@@ -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>
modified 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 {