Configuration options
This commit is contained in:
parent
fe96164f4e
commit
164571ec19
2 changed files with 20 additions and 3 deletions
16
config.ts
Normal file
16
config.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
* Configuration module for the PDS Dashboard
|
||||
*/
|
||||
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";
|
||||
|
||||
/**
|
||||
* The base URL of the frontend service for linking to replies
|
||||
* @default "https://deer.social"
|
||||
*/
|
||||
static readonly FRONTEND_URL: string = "https://deer.social";
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { Post } from "./pdsfetch";
|
||||
import { Config } from "../../config"
|
||||
let { post }: { post: Post } = $props();
|
||||
</script>
|
||||
|
||||
|
@ -8,8 +9,8 @@
|
|||
{#if post.authorAvatarCid}
|
||||
<img
|
||||
id="avatar"
|
||||
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.authorAvatarCid}"
|
||||
alt="avatar of {post.displayName}"
|
||||
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.authorAvatarCid}"
|
||||
/>
|
||||
{/if}
|
||||
<p>{post.displayName} | {post.timenotstamp}</p>
|
||||
|
@ -25,7 +26,7 @@
|
|||
<img
|
||||
id="embedImages"
|
||||
alt="Post Image"
|
||||
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={imageLink}"
|
||||
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={imageLink}"
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
|
@ -33,7 +34,7 @@
|
|||
{#if post.videosLinkCid}
|
||||
<video
|
||||
id="embedVideo"
|
||||
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.videosLinkCid}"
|
||||
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.videosLinkCid}"
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue