mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
Change Avatar address prop to title
We wont have always an address available to be passed as title for the Avatar component, e.g. when working with URNs. Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
+2
-2
@@ -59,9 +59,9 @@
|
||||
<div class="address" title={address} class:no-badge={noBadge} class:text-small={small}>
|
||||
{#if !noAvatar}
|
||||
{#if resolve && profile?.avatar}
|
||||
<Avatar inline source={profile.avatar} {address}/>
|
||||
<Avatar inline source={profile.avatar} title={address}/>
|
||||
{:else}
|
||||
<Avatar inline source={address} {address}/>
|
||||
<Avatar inline source={address} title={address}/>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if addressType === AddressType.Org}
|
||||
|
||||
+3
-3
@@ -2,13 +2,13 @@
|
||||
import { createIcon } from '@app/blockies';
|
||||
import { isAddress, isRadicleId } from '@app/utils';
|
||||
|
||||
export let address: string;
|
||||
export let title: string;
|
||||
export let source: string;
|
||||
export let inline = false;
|
||||
export let glowOnHover = false;
|
||||
|
||||
function handleMissingFile() {
|
||||
source = createContainer(address);
|
||||
source = createContainer(title);
|
||||
}
|
||||
|
||||
function createContainer(source: string) {
|
||||
@@ -50,4 +50,4 @@
|
||||
</style>
|
||||
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<img class="avatar" class:inline src={source} title={address} on:error={handleMissingFile} class:glowOnHover />
|
||||
<img class="avatar" class:inline src={source} {title} on:error={handleMissingFile} class:glowOnHover />
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@
|
||||
<div class="card" class:seed={!!seed}>
|
||||
<div class="card-avatar">
|
||||
{#if profile}
|
||||
<Avatar source={profile.avatar ?? profile.address} address={profile.address} />
|
||||
<Avatar source={profile.avatar ?? profile.address} title={profile.address} />
|
||||
{:else if seed}
|
||||
<span class="seed-emoji">
|
||||
{seed.emoji}
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@
|
||||
{#if sessionButtonHover}
|
||||
Disconnect
|
||||
{:else}
|
||||
<Avatar source={profile.avatar ?? address} {address} inline />{formatAddress(address)}
|
||||
<Avatar source={profile.avatar ?? address} title={address} inline />{formatAddress(address)}
|
||||
{/if}
|
||||
{/await}
|
||||
</button>
|
||||
|
||||
+3
-3
@@ -181,7 +181,7 @@
|
||||
<main>
|
||||
<header>
|
||||
<div class="avatar">
|
||||
<Avatar source={profile.avatar ?? profile.address} address={profile.address} />
|
||||
<Avatar source={profile.avatar ?? profile.address} title={profile.address} />
|
||||
</div>
|
||||
<div class="info">
|
||||
<span class="title">
|
||||
@@ -339,7 +339,7 @@
|
||||
<div class="member">
|
||||
<div class="member-icon">
|
||||
<Link to="/{profile.address}">
|
||||
<Avatar source={profile.avatar ?? profile.address} address={profile.address} />
|
||||
<Avatar source={profile.avatar ?? profile.address} title={profile.address} />
|
||||
</Link>
|
||||
</div>
|
||||
<div class="desktop">
|
||||
@@ -370,7 +370,7 @@
|
||||
{:then profile}
|
||||
<div class="member-icon">
|
||||
<Link to="/{profile.address}">
|
||||
<Avatar source={profile.avatar ?? profile.address} address={profile.address} />
|
||||
<Avatar source={profile.avatar ?? profile.address} title={profile.address} />
|
||||
</Link>
|
||||
</div>
|
||||
<div class="desktop">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
>
|
||||
<span class="align">
|
||||
{#if address}
|
||||
<Avatar address={address} source={address} inline />
|
||||
<Avatar title={address} source={address} inline />
|
||||
{/if}
|
||||
{#if connection === Connection.Connecting}
|
||||
<Loading small />
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
<div class="avatars">
|
||||
{#each anchor.confirmations as signee}
|
||||
<Avatar inline source={signee} address={signee} />
|
||||
<Avatar inline source={signee} title={signee} />
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
action = Action.Execute;
|
||||
state = State.Confirm;
|
||||
}} class="tiny execute">
|
||||
<Avatar inline source={account} address={account} /> Execute
|
||||
<Avatar inline source={account} title={account} /> Execute
|
||||
</button>
|
||||
<!-- Check whether or not we've signed this proposal -->
|
||||
{:else if isSigned}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<div class="title bold">
|
||||
{#if project.profile}
|
||||
<a class="org-avatar" title={project.profile.nameOrAddress} href="/{project.profile.nameOrAddress}">
|
||||
<Avatar source={project.profile.avatar || project.profile.address} address={project.profile.address}/>
|
||||
<Avatar source={project.profile.avatar || project.profile.address} title={project.profile.address}/>
|
||||
</a>
|
||||
<span class="divider">/</span>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user