diff --git a/package.json b/package.json index cbace54..88e7308 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "myrelay.site", "type": "module", - "version": "0.2.10", + "version": "0.2.11", "main": "index.js", "repository": "git@github.com:sandwichfarm/myrelay.site.git", "author": "dskvr ", diff --git a/src/lib/components/blocks/repeatable/feed/feed.svelte b/src/lib/components/blocks/repeatable/feed/feed.svelte index 1c026ec..ed2cd05 100644 --- a/src/lib/components/blocks/repeatable/feed/feed.svelte +++ b/src/lib/components/blocks/repeatable/feed/feed.svelte @@ -25,6 +25,7 @@ const attempts: Writable = writable(0) export let key: string = ""; + export let id: string = ""; const generateFilter = (): NDKFilter => { const filter: NDKFilter = {} diff --git a/src/lib/components/blocks/unique/follows-present/follows-present.svelte b/src/lib/components/blocks/unique/follows-present/follows-present.svelte index 26f518e..c55579f 100644 --- a/src/lib/components/blocks/unique/follows-present/follows-present.svelte +++ b/src/lib/components/blocks/unique/follows-present/follows-present.svelte @@ -13,6 +13,9 @@ const MRP: Writable = getContext(MY_RELAY_PAGE); const MAX_LENGTH = 72 + export let key: string | undefined + export let id: string | undefined + $: authed = $MRP?.nostr?.authed $: followsOnRelay = $MRP?.userFollowsOnRelay > 500? "500+": $MRP.userFollowsOnRelay diff --git a/src/lib/components/blocks/unique/map/map.svelte b/src/lib/components/blocks/unique/map/map.svelte index 22ddaeb..f692d05 100644 --- a/src/lib/components/blocks/unique/map/map.svelte +++ b/src/lib/components/blocks/unique/map/map.svelte @@ -66,6 +66,7 @@ let getPosition = false; let coords: [number, number] | [] = []; export let key: string = "" + export let id: string = "" const pointLabel = (d: MapPoint) => d?.label const pointLabelPosition = (d: MapPoint): MapPointLabelPosition => d.position || MapPointLabelPosition.Bottom @@ -219,7 +220,7 @@ /> {#if showMonitors} - + {/if} diff --git a/src/lib/components/blocks/unique/map/monitors.svelte b/src/lib/components/blocks/unique/map/monitors.svelte index 7ad25b3..3de7315 100644 --- a/src/lib/components/blocks/unique/map/monitors.svelte +++ b/src/lib/components/blocks/unique/map/monitors.svelte @@ -8,25 +8,26 @@ import type { Writable } from 'svelte/store'; export let key: string; - export let mapChange: () => void export let setMonitor: (monitor: MRPMonitor) => void - export let setMonitors: () => void export let resetMonitors: () => void export let updateMapData: () => void const MRP: Writable = getContext(MY_RELAY_PAGE); - const hovered = (monitor: MRPMonitor | boolean): undefined => { + const hovered = (monitor: MRPMonitor | boolean): undefined | void => { if(monitorVis !== 'onhover') return if(!monitor) return resetMonitors() resetMonitors() setMonitor(monitor) - updateMapData() + updateMapData() } + $: monitorVis = $MRP.loader.config.event.blocks?.[key]?.options?.showMonitors $: monitors = $MRP?.nostr?.monitors $: hoverClass = monitorVis !== 'onhover' ? 'cursor-pointer' : '' + +
diff --git a/src/lib/components/blocks/unique/nip11/nip11.svelte b/src/lib/components/blocks/unique/nip11/nip11.svelte index c0a0ba1..23595b3 100644 --- a/src/lib/components/blocks/unique/nip11/nip11.svelte +++ b/src/lib/components/blocks/unique/nip11/nip11.svelte @@ -13,6 +13,8 @@ import type { MyRelayPage } from '$lib/core/MRP'; export let key: string; + export let id: string | undefined + const STATIC_ORDER = -100 @@ -27,7 +29,7 @@ {#if browser} -a + {#if info?.description && options?.showDescription}

diff --git a/src/lib/components/blocks/unique/operator-profile/operator-profile.svelte b/src/lib/components/blocks/unique/operator-profile/operator-profile.svelte index 73dab02..72f834a 100644 --- a/src/lib/components/blocks/unique/operator-profile/operator-profile.svelte +++ b/src/lib/components/blocks/unique/operator-profile/operator-profile.svelte @@ -22,6 +22,8 @@ import Skeleton from '$lib/components/ui/skeleton2/Skeleton.svelte'; export let key: string; + export let id: string | undefined + const mrp_context: Writable = getContext(MY_RELAY_PAGE); diff --git a/src/lib/core/MRP.ts b/src/lib/core/MRP.ts index beb8fb1..dfefc08 100644 --- a/src/lib/core/MRP.ts +++ b/src/lib/core/MRP.ts @@ -15,7 +15,7 @@ export interface MRPState { } export class MyRelayPage extends MRPData { - private readonly defaultRelays: Set = new Set(['wss://purplepag.es', 'wss://user.kindpag.es', 'wss://history.nostr.watch'] as string[]) + private readonly defaultRelays: Set = new Set(['wss://purplepag.es', 'wss://user.kindpag.es', 'wss://history.nostr.watch', 'wss://relaypag.es', 'wss://relay.nostr.watch'] as string[]) private _url: string; private _nostr: MRPNostr; private _editor: MRPEditor; diff --git a/src/lib/core/MRPMonitors.ts b/src/lib/core/MRPMonitors.ts index 69af88d..32656c8 100644 --- a/src/lib/core/MRPMonitors.ts +++ b/src/lib/core/MRPMonitors.ts @@ -8,7 +8,7 @@ import { MRPData } from "./MRPData"; type RelayDiscoveryDictionary = Record export class MRPMonitors extends MRPData { - private readonly monitorEventRelays: string[] = ['wss://history.nostr.watch', 'wss://relaypag.es'] + private readonly monitorEventRelays: string[] = ['wss://history.nostr.watch', 'wss://relaypag.es', 'wss://relay.nostr.watch'] private readonly livenessThreshold: number = Math.round(Date.now()/1000)-60*60*2 private ndk: NDK; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 64cbb69..2c28556 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -69,6 +69,13 @@ + + + + + + +

diff --git a/static/android-chrome-192x192.png b/static/android-chrome-192x192.png new file mode 100644 index 0000000..4aae058 Binary files /dev/null and b/static/android-chrome-192x192.png differ diff --git a/static/android-chrome-256x256.png b/static/android-chrome-256x256.png new file mode 100644 index 0000000..d610cfd Binary files /dev/null and b/static/android-chrome-256x256.png differ diff --git a/static/apple-touch-icon.png b/static/apple-touch-icon.png new file mode 100644 index 0000000..3684f63 Binary files /dev/null and b/static/apple-touch-icon.png differ diff --git a/static/browserconfig.xml b/static/browserconfig.xml new file mode 100644 index 0000000..5cd27e3 --- /dev/null +++ b/static/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #603cba + + + diff --git a/static/favicon-16x16.png b/static/favicon-16x16.png new file mode 100644 index 0000000..1f8c9c1 Binary files /dev/null and b/static/favicon-16x16.png differ diff --git a/static/favicon-32x32.png b/static/favicon-32x32.png new file mode 100644 index 0000000..504e56a Binary files /dev/null and b/static/favicon-32x32.png differ diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..475d467 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/mstile-150x150.png b/static/mstile-150x150.png new file mode 100644 index 0000000..0536395 Binary files /dev/null and b/static/mstile-150x150.png differ diff --git a/static/safari-pinned-tab.svg b/static/safari-pinned-tab.svg new file mode 100644 index 0000000..29f069d --- /dev/null +++ b/static/safari-pinned-tab.svg @@ -0,0 +1,25 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + diff --git a/static/site.webmanifest b/static/site.webmanifest new file mode 100644 index 0000000..de65106 --- /dev/null +++ b/static/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +}