tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
18
fork
atom
overview
issues
pulls
pipelines
refactor pt3
Florian
2 weeks ago
48dcbf6f
5792abcd
+13
-5
4 changed files
expand all
collapse all
unified
split
src
lib
atproto
settings.ts
helper.ts
routes
[handle=handle]
api
refresh
+server.ts
all
+page.svelte
+11
-2
src/lib/atproto/settings.ts
···
1
export const SITE = 'https://flo-bit.dev';
2
3
-
export const collections: string[] = ['xyz.statusphere.status'];
0
0
0
0
0
0
0
0
0
4
5
export const rpcCalls: Record<string, string | string[]> = {
6
//'did:web:api.bsky.app#bsky_appview': ['app.bsky.actor.getProfile']
7
};
8
9
-
export const blobs = ['video/*', 'text/html'] as string | string[] | undefined;
10
11
export const signUpPDS = 'https://pds.rip/';
···
1
export const SITE = 'https://flo-bit.dev';
2
3
+
export const collections: string[] = [
4
+
'app.blento.card',
5
+
'app.blento.page',
6
+
'app.blento.settings',
7
+
'app.blento.comment',
8
+
'app.blento.guestbook.entry',
9
+
'site.standard.publication',
10
+
'site.standard.document',
11
+
'xyz.statusphere.status'
12
+
];
13
14
export const rpcCalls: Record<string, string | string[]> = {
15
//'did:web:api.bsky.app#bsky_appview': ['app.bsky.actor.getProfile']
16
};
17
18
+
export const blobs = ['*/*'] as string | string[] | undefined;
19
20
export const signUpPDS = 'https://pds.rip/';
+2
-2
src/lib/helper.ts
···
274
275
if (now - (data.updatedAt || 0) > TEN_MINUTES) {
276
try {
277
-
await fetch('/' + data.handle + '/api/refreshData');
278
console.log('successfully refreshed data', data.handle);
279
} catch (error) {
280
console.error('error refreshing data', error);
···
486
487
await Promise.all(promises);
488
489
-
fetch('/' + data.handle + '/api/refreshData').then(() => {
490
console.log('data refreshed!');
491
});
492
console.log('refreshing data');
···
274
275
if (now - (data.updatedAt || 0) > TEN_MINUTES) {
276
try {
277
+
await fetch('/' + data.handle + '/api/refresh');
278
console.log('successfully refreshed data', data.handle);
279
} catch (error) {
280
console.error('error refreshing data', error);
···
486
487
await Promise.all(promises);
488
489
+
fetch('/' + data.handle + '/api/refresh').then(() => {
490
console.log('data refreshed!');
491
});
492
console.log('refreshing data');
src/routes/[handle=handle]/api/refreshData/+server.ts
src/routes/[handle=handle]/api/refresh/+server.ts
-1
src/routes/all/+page.svelte
···
1
<script lang="ts">
2
import { createEmptyCard, refreshData } from '$lib/helper.js';
3
import Website from '$lib/website/Website.svelte';
4
-
import { onMount } from 'svelte';
5
6
let { data } = $props();
7
···
1
<script lang="ts">
2
import { createEmptyCard, refreshData } from '$lib/helper.js';
3
import Website from '$lib/website/Website.svelte';
0
4
5
let { data } = $props();
6