mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-28 17:50:28 +08:00
Migrate to the heartwood protocol stack
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Author } from "@app/lib/cobs";
|
||||
|
||||
import {
|
||||
formatNodeId,
|
||||
formatRadicleId,
|
||||
formatTimestamp,
|
||||
} from "@app/lib/utils";
|
||||
import { formatNodeId, formatTimestamp } from "@app/lib/utils";
|
||||
|
||||
export let author: Author;
|
||||
export let timestamp: number;
|
||||
@@ -37,13 +33,9 @@
|
||||
</style>
|
||||
|
||||
<span class="authorship txt-tiny">
|
||||
<span class="id highlight layout-desktop">
|
||||
{window.HEARTWOOD ? formatNodeId(author.id) : formatRadicleId(author.id)}
|
||||
</span>
|
||||
<span class="id highlight layout-desktop">{formatNodeId(author.id)}</span>
|
||||
<span class="id highlight layout-mobile">
|
||||
{window.HEARTWOOD
|
||||
? formatNodeId(author.id).replace("did:key:", "")
|
||||
: formatRadicleId(author.id)}
|
||||
{formatNodeId(author.id).replace("did:key:", "")}
|
||||
</span>
|
||||
<span class="caption"> {caption} </span>
|
||||
<span class="date">
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { createIcon } from "@app/lib/blockies";
|
||||
import { isPeerId, isRadicleId } from "@app/lib/utils";
|
||||
import { isNodeId } from "@app/lib/utils";
|
||||
|
||||
export let title: string;
|
||||
export let source: string;
|
||||
export let inline = false;
|
||||
export let grayscale = false;
|
||||
|
||||
function handleMissingFile() {
|
||||
console.warn("Not able to locate", source);
|
||||
@@ -23,10 +22,9 @@
|
||||
return avatar.toDataURL();
|
||||
}
|
||||
|
||||
if (isRadicleId(source) || isPeerId(source)) {
|
||||
if (isNodeId(source)) {
|
||||
source = createContainer(source);
|
||||
}
|
||||
grayscale = isPeerId(title) || isRadicleId(title);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -41,9 +39,6 @@
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.grayscale {
|
||||
filter: grayscale();
|
||||
}
|
||||
.inline {
|
||||
display: inline-block !important;
|
||||
width: 1rem;
|
||||
@@ -58,5 +53,4 @@
|
||||
class="avatar"
|
||||
alt="avatar"
|
||||
on:error={handleMissingFile}
|
||||
class:inline
|
||||
class:grayscale />
|
||||
class:inline />
|
||||
|
||||
Reference in New Issue
Block a user