- {#if account.avatarCid}
-

- {/if}
-
- {account.displayName || account.handle || account.did}
-
+
+ {#if account.avatarCid}
+

+ {/if}
+
+ {account.displayName || account.handle || account.did}
+
diff --git a/src/lib/PostComponent.svelte b/src/lib/PostComponent.svelte
index f077582..b240c95 100644
--- a/src/lib/PostComponent.svelte
+++ b/src/lib/PostComponent.svelte
@@ -25,18 +25,17 @@
{#if post.replyingUri}
-
replying to {post.replyingUri.repo}
+
replying to {post.replyingUri.repo}
{/if}
-
{post.text}
-
+
{post.text}
{#if post.quotingUri}
quoting {post.quotingUri.repo}
{/if}
@@ -66,7 +65,8 @@
flex-direction: column;
border: 1px solid #8054f0;
background-color: black;
- margin-bottom: -1px;
+ margin-bottom: 15px;
+ overflow-wrap: break-word;
}
#postHeader {
display: flex;
@@ -78,6 +78,7 @@
height: fit-content;
border-bottom: 1px solid #8054f0;
font-weight: bold;
+ overflow-wrap: break-word;
}
#postContent {
display: flex;
@@ -86,22 +87,25 @@
padding: 10px;
background-color: #0d0620;
color: white;
+ overflow-wrap: break-word;
}
#replyingText {
font-size: 0.7em;
- color: white;
margin: 0;
- margin-bottom: 10px;
padding: 0;
+ padding-bottom: 5px;
}
#postText {
margin: 0;
+ margin-bottom: 5px;
padding: 0;
}
#headerText {
margin-left: 10px;
font-size: 0.9em;
text-align: start;
+ overflow-wrap: break-word;
+ overflow: hidden;
}
#avatar {
width: 50px;
diff --git a/src/lib/pdsfetch.ts b/src/lib/pdsfetch.ts
index ed24c45..61be9bf 100644
--- a/src/lib/pdsfetch.ts
+++ b/src/lib/pdsfetch.ts
@@ -164,7 +164,7 @@ const fetchPosts = async (did: string) => {
params: {
repo: did as At.Identifier,
collection: "app.bsky.feed.post",
- limit: 5,
+ limit: Config.MAX_POSTS_PER_USER,
},
});
return {
From ebca274e5a1773bc5ce994bf730f7ccd61e43de9 Mon Sep 17 00:00:00 2001
From: Astra
Date: Sun, 20 Apr 2025 20:08:13 +0900
Subject: [PATCH 02/27] "Final-ish" design
---
config.ts | 10 +-
src/App.svelte | 3 +
src/app.css | 1 +
src/lib/PostComponent.svelte | 219 ++++++++++++++++++++++++++++++-----
src/lib/pdsfetch.ts | 2 +
5 files changed, 202 insertions(+), 33 deletions(-)
diff --git a/config.ts b/config.ts
index a507eb3..b8284a6 100644
--- a/config.ts
+++ b/config.ts
@@ -6,7 +6,7 @@ export class Config {
* The base URL of the PDS (Personal Data Server)
* @default "https://pds.witchcraft.systems"
*/
- static readonly PDS_URL: string = "https://ap.brid.gy";
+ static readonly PDS_URL: string = "https://pds.witchcraft.systems";
/**
* The base URL of the frontend service for linking to replies
@@ -18,5 +18,11 @@ export class Config {
* Maximum number of posts to fetch from the PDS per user
* @default 10
*/
- static readonly MAX_POSTS_PER_USER: number = 1;
+ static readonly MAX_POSTS_PER_USER: number = 22;
+
+ /**
+ * Footer text for the dashboard
+ * @default "Astrally projected from witchcraft.systems"
+ */
+ static readonly FOOTER_TEXT: string = "Astrally projected from witchcraft.systems";
}
\ No newline at end of file
diff --git a/src/App.svelte b/src/App.svelte
index c5a024c..fbf59f1 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -2,6 +2,7 @@
import PostComponent from "./lib/PostComponent.svelte";
import AccountComponent from "./lib/AccountComponent.svelte";
import { fetchAllPosts, Post, getAllMetadataFromPds } from "./lib/pdsfetch";
+ import { Config } from "../config";
const postsPromise = fetchAllPosts();
const accountsPromise = getAllMetadataFromPds();
@@ -19,6 +20,7 @@
{/each}
+
{#if post.replyingUri}
-
replying to {post.replyingUri.repo}
+
replying to {post.replyingUri.repo}
{/if}
-
{post.text}
{#if post.quotingUri}
quoting {post.quotingUri.repo}
{/if}
- {#if post.imagesCid}
-
- {#each post.imagesCid as imageLink}
-

- {/each}
+
{post.text}
+ {#if post.imagesCid && post.imagesCid.length > 0}
+
+

+
+ {#if post.imagesCid.length > 1}
+
+
+
+ {#each post.imagesCid as _, i}
+
+ {/each}
+
+
+
+ {/if}
{/if}
{#if post.videosLinkCid}
+ controls
+ >
{/if}
diff --git a/src/lib/pdsfetch.ts b/src/lib/pdsfetch.ts
index 61be9bf..d48e1b9 100644
--- a/src/lib/pdsfetch.ts
+++ b/src/lib/pdsfetch.ts
@@ -32,6 +32,7 @@ class Post {
authorDid: string;
authorAvatarCid: string | null;
postCid: string;
+ recordName: string;
authorHandle: string;
displayName: string;
text: string;
@@ -47,6 +48,7 @@ class Post {
account: AccountMetadata,
) {
this.postCid = record.cid;
+ this.recordName = record.uri.split("/").slice(-1)[0];
this.authorDid = account.did;
this.authorAvatarCid = account.avatarCid;
this.authorHandle = account.handle;
From 686ef007c4e9642c0b245e1a3f102c32133b94f8 Mon Sep 17 00:00:00 2001
From: Astra