diff --git a/config.ts b/config.ts index af29271..a507eb3 100644 --- a/config.ts +++ b/config.ts @@ -6,11 +6,17 @@ export class Config { * The base URL of the PDS (Personal Data Server) * @default "https://pds.witchcraft.systems" */ - static readonly PDS_URL: string = "https://pds.witchcraft.systems"; + static readonly PDS_URL: string = "https://ap.brid.gy"; /** * The base URL of the frontend service for linking to replies * @default "https://deer.social" */ static readonly FRONTEND_URL: string = "https://deer.social"; + + /** + * Maximum number of posts to fetch from the PDS per user + * @default 10 + */ + static readonly MAX_POSTS_PER_USER: number = 1; } \ No newline at end of file diff --git a/src/App.svelte b/src/App.svelte index a8a0033..c5a024c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -14,9 +14,11 @@

ATProto PDS

Home to {accountsData.length} accounts

+
{#each accountsData as accountObject} {/each} +
{:catch error}

Error: {error.message}

@@ -26,9 +28,11 @@

Loading...

{:then postsData}
+
{#each postsData as postObject} {/each} +
{/await} @@ -48,19 +52,39 @@ } #Feed { width: 65%; - height: 80vh; + height: 100vh; overflow-y: scroll; padding: 20px; + padding-bottom: 0; + padding-top: 0; + margin-top: 0; + margin-bottom: 0; + } + #spacer { + padding: 0; + margin: 0; + height: 10vh; + width: 100%; } #Account { width: 35%; + display: flex; + flex-direction: column; + border: 1px solid #8054f0; + background-color: #0d0620; height: 80vh; - overflow-y: scroll; padding: 20px; - background-color: #070311; - - border-radius: 10px; } + #accountsList { + display: flex; + flex-direction: column; + overflow-y: scroll; + height: 100%; + width: 100%; + padding: 0px; + margin: 0px; + } + #Header { text-align: center; font-size: 2em; diff --git a/src/app.css b/src/app.css index 2232051..988c405 100644 --- a/src/app.css +++ b/src/app.css @@ -6,10 +6,27 @@ ::-webkit-scrollbar { width: 0px; background: transparent; + padding: 0; + margin: 0; +} +::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 0; +} +::-webkit-scrollbar-track { + background: transparent; + border-radius: 0; +} +::-webkit-scrollbar-corner { + background: transparent; + border-radius: 0; +} +::-webkit-scrollbar-button { + background: transparent; + border-radius: 0; } - * { - scrollbar-width: thin; + scrollbar-width: none; scrollbar-color: transparent transparent; -ms-overflow-style: none; /* IE and Edge */ -webkit-overflow-scrolling: touch; @@ -45,8 +62,10 @@ h1 { #app { max-width: 1400px; - margin: 0 auto; - padding: 2rem; + margin: 0; + padding: 0; + margin-left: auto; + margin-right: auto; text-align: center; } diff --git a/src/lib/AccountComponent.svelte b/src/lib/AccountComponent.svelte index 4c987c8..a6093f9 100644 --- a/src/lib/AccountComponent.svelte +++ b/src/lib/AccountComponent.svelte @@ -1,49 +1,48 @@ -
- {#if account.avatarCid} - avatar of {account.displayName} - {/if} -
- {account.displayName || account.handle || account.did} -
+
+ {#if account.avatarCid} + avatar of {account.displayName} + {/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 {