Simplify Avatar component and get rid of extra requests

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-04-10 14:39:50 +02:00
parent 7caa83e1b6
commit 045890d2e1
5 changed files with 12 additions and 28 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
import type { Item } from "@app/components/Dropdown.svelte";
import Authorship from "@app/components/Authorship.svelte";
import Avatar from "@app/components/Comment/Avatar.svelte";
import Avatar from "@app/components/Avatar.svelte";
import Badge from "@app/components/Badge.svelte";
import Button from "@app/components/Button.svelte";
import CobHeader from "@app/views/projects/Cob/CobHeader.svelte";
@@ -259,7 +259,7 @@
validate={item => Boolean(parseNodeId(item))}
validateAdd={(item, items) => validateAssignee(item, items)}>
<svelte:fragment let:item>
<Avatar inline source={item} title={item} />
<Avatar inline nodeId={item} />
<span>{formatNodeId(item)}</span>
</svelte:fragment>
</CobSideInput>
+2 -2
View File
@@ -5,7 +5,7 @@
import * as modal from "@app/lib/modal";
import AuthenticationErrorModal from "@app/views/session/AuthenticationErrorModal.svelte";
import Authorship from "@app/components/Authorship.svelte";
import Avatar from "@app/components/Comment/Avatar.svelte";
import Avatar from "@app/components/Avatar.svelte";
import Badge from "@app/components/Badge.svelte";
import Button from "@app/components/Button.svelte";
import CobHeader from "@app/views/projects/Cob/CobHeader.svelte";
@@ -145,7 +145,7 @@
validate={item => Boolean(parseNodeId(item))}
validateAdd={(item, items) => validateTag(item, items)}>
<svelte:fragment let:item>
<Avatar inline source={item} title={item} />
<Avatar inline nodeId={item} />
<span>{formatNodeId(item)}</span>
</svelte:fragment>
</CobSideInput>