Skip to content

Commit

Permalink
fix favicon issue correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Jul 28, 2024
1 parent 2cc2568 commit 927e54d
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "myrelay.site",
"type": "module",
"version": "0.2.10",
"version": "0.2.11",
"main": "index.js",
"repository": "[email protected]:sandwichfarm/myrelay.site.git",
"author": "dskvr <[email protected]>",
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/blocks/repeatable/feed/feed.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
const attempts: Writable<number> = writable(0)
export let key: string = "";
export let id: string = "";
const generateFilter = (): NDKFilter => {
const filter: NDKFilter = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
const MRP: Writable<MyRelayPage> = 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
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/blocks/unique/map/map.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -219,7 +220,7 @@
/>
</VisSingleContainer>
{#if showMonitors}
<Monitors {key} {setMonitor} {resetMonitors} {setMapPoints} {updateMapData} />
<Monitors {key} {setMonitor} {resetMonitors} {updateMapData} />
{/if}
</svelte:fragment>
</Block>
Expand Down
9 changes: 5 additions & 4 deletions src/lib/components/blocks/unique/map/monitors.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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<MyRelayPage> = 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' : ''
</script>

<div class="text-center mt-10">
Expand Down
4 changes: 3 additions & 1 deletion src/lib/components/blocks/unique/nip11/nip11.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import type { MyRelayPage } from '$lib/core/MRP';
export let key: string;
export let id: string | undefined
const STATIC_ORDER = -100
Expand All @@ -27,7 +29,7 @@
</script>
{#if browser}
<Block noClass={true} sortable={false} {key}>a
<Block noClass={true} sortable={false} {key}>
<svelte:fragment slot="content">
{#if info?.description && options?.showDescription}
<p class="text-md md:text-xl text-muted-foreground mb-3 mt-0 pt-0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<MRPRelay> = getContext(MY_RELAY_PAGE);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/MRP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface MRPState {
}

export class MyRelayPage extends MRPData {
private readonly defaultRelays: Set<string> = new Set(['wss://purplepag.es', 'wss://user.kindpag.es', 'wss://history.nostr.watch'] as string[])
private readonly defaultRelays: Set<string> = 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;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/MRPMonitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MRPData } from "./MRPData";
type RelayDiscoveryDictionary = Record<string, RelayDiscovery[]>

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;
Expand Down
7 changes: 7 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@

<svelte:head>
<link id="theme" rel="stylesheet" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#603cba">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="#ffffff">
</svelte:head>

<div id="mrp-bg-tint" class="flex flex-col min-h-screen relative overflow-hidden">
Expand Down
Binary file added static/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/android-chrome-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions static/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#603cba</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added static/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon.ico
Binary file not shown.
Binary file added static/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions static/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 927e54d

Please sign in to comment.