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">
|
<script lang="ts">
|
||||||
import { Post } from "./pdsfetch";
|
import { Post } from "./pdsfetch";
|
||||||
|
import { Config } from "../../config"
|
||||||
let { post }: { post: Post } = $props();
|
let { post }: { post: Post } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -8,8 +9,8 @@
|
||||||
{#if post.authorAvatarCid}
|
{#if post.authorAvatarCid}
|
||||||
<img
|
<img
|
||||||
id="avatar"
|
id="avatar"
|
||||||
|
src="{Config.PDS_URL}/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.authorAvatarCid}"
|
||||||
alt="avatar of {post.displayName}"
|
alt="avatar of {post.displayName}"
|
||||||
src="https://pds.witchcraft.systems/xrpc/com.atproto.sync.getBlob?did={post.authorDid}&cid={post.authorAvatarCid}"
|
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<p>{post.displayName} | {post.timenotstamp}</p>
|
<p>{post.displayName} | {post.timenotstamp}</p>
|
||||||
|
@ -25,7 +26,7 @@
|
||||||
<img
|
<img
|
||||||
id="embedImages"
|
id="embedImages"
|
||||||
alt="Post Image"
|
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}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +34,7 @@
|
||||||
{#if post.videosLinkCid}
|
{#if post.videosLinkCid}
|
||||||
<video
|
<video
|
||||||
id="embedVideo"
|
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}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue