More links to front
This commit is contained in:
parent
2a355be5b2
commit
bf7fbdcb67
3 changed files with 25 additions and 8 deletions
|
@ -3,7 +3,9 @@
|
||||||
const { account }: { account: AccountMetadata } = $props();
|
const { account }: { account: AccountMetadata } = $props();
|
||||||
import { Config } from "../../config";
|
import { Config } from "../../config";
|
||||||
</script>
|
</script>
|
||||||
<div id="accountContainer">
|
|
||||||
|
<a id="link" href="{Config.FRONTEND_URL}/profile/{account.did}">
|
||||||
|
<div id="accountContainer">
|
||||||
{#if account.avatarCid}
|
{#if account.avatarCid}
|
||||||
<img
|
<img
|
||||||
id="avatar"
|
id="avatar"
|
||||||
|
@ -11,8 +13,12 @@
|
||||||
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={account.did}&cid={account.avatarCid}"
|
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={account.did}&cid={account.avatarCid}"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<div id="accountName">{account.displayName || account.did}</div>
|
<div id="accountName">
|
||||||
</div>
|
{account.displayName || account.handle || account.did}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
#accountContainer {
|
#accountContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Post } from "./pdsfetch";
|
import { Post } from "./pdsfetch";
|
||||||
import { Config } from "../../config"
|
import { Config } from "../../config";
|
||||||
let { post }: { post: Post } = $props();
|
let { post }: { post: Post } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -13,10 +13,17 @@
|
||||||
alt="avatar of {post.displayName}"
|
alt="avatar of {post.displayName}"
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<div id="headerText">{post.displayName} | {post.authorHandle} | {post.timenotstamp}</div>
|
<div id="headerText">
|
||||||
|
<a href="{Config.FRONTEND_URL}/profile/{post.authorDid}"
|
||||||
|
>{post.displayName} ( {post.authorHandle} )</a
|
||||||
|
>
|
||||||
|
|
|
||||||
|
<a href="{Config.FRONTEND_URL}/profile/{post.authorDid}/post/{post.cid}"
|
||||||
|
>{post.timenotstamp}</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="postContent">
|
<div id="postContent">
|
||||||
<p>{post.text}</p>
|
|
||||||
{#if post.replyingUri}
|
{#if post.replyingUri}
|
||||||
<a
|
<a
|
||||||
id="replyingText"
|
id="replyingText"
|
||||||
|
@ -24,6 +31,8 @@
|
||||||
.replyingUri.rkey}">replying to {post.replyingUri.repo}</a
|
.replyingUri.rkey}">replying to {post.replyingUri.repo}</a
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
|
<p>{post.text}</p>
|
||||||
|
|
||||||
{#if post.quotingUri}
|
{#if post.quotingUri}
|
||||||
<a
|
<a
|
||||||
id="quotingText"
|
id="quotingText"
|
||||||
|
|
|
@ -31,6 +31,7 @@ interface atUriObject {
|
||||||
class Post {
|
class Post {
|
||||||
authorDid: string;
|
authorDid: string;
|
||||||
authorAvatarCid: string | null;
|
authorAvatarCid: string | null;
|
||||||
|
postCid: string;
|
||||||
authorHandle: string;
|
authorHandle: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
text: string;
|
text: string;
|
||||||
|
@ -45,6 +46,7 @@ class Post {
|
||||||
record: ComAtprotoRepoListRecords.Record,
|
record: ComAtprotoRepoListRecords.Record,
|
||||||
account: AccountMetadata,
|
account: AccountMetadata,
|
||||||
) {
|
) {
|
||||||
|
this.postCid = record.cid;
|
||||||
this.authorDid = account.did;
|
this.authorDid = account.did;
|
||||||
this.authorAvatarCid = account.avatarCid;
|
this.authorAvatarCid = account.avatarCid;
|
||||||
this.authorHandle = account.handle;
|
this.authorHandle = account.handle;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue