Accommodate onion urls

This commit is contained in:
Jon Staab
2025-01-14 15:58:38 -08:00
parent 6fcf0e7f12
commit af91fe129b
6 changed files with 24 additions and 20 deletions

26
package-lock.json generated
View File

@@ -30,16 +30,16 @@
"@types/qrcode": "^1.5.5", "@types/qrcode": "^1.5.5",
"@vite-pwa/assets-generator": "^0.2.6", "@vite-pwa/assets-generator": "^0.2.6",
"@vite-pwa/sveltekit": "^0.6.6", "@vite-pwa/sveltekit": "^0.6.6",
"@welshman/app": "~0.0.36", "@welshman/app": "~0.0.37",
"@welshman/content": "~0.0.15", "@welshman/content": "~0.0.15",
"@welshman/dvm": "~0.0.13", "@welshman/dvm": "~0.0.13",
"@welshman/editor": "~0.0.4", "@welshman/editor": "~0.0.5",
"@welshman/feeds": "~0.0.30", "@welshman/feeds": "~0.0.30",
"@welshman/lib": "~0.0.37", "@welshman/lib": "~0.0.37",
"@welshman/net": "~0.0.45", "@welshman/net": "~0.0.45",
"@welshman/signer": "~0.0.19", "@welshman/signer": "~0.0.19",
"@welshman/store": "~0.0.15", "@welshman/store": "~0.0.15",
"@welshman/util": "~0.0.55", "@welshman/util": "~0.0.57",
"daisyui": "^4.12.10", "daisyui": "^4.12.10",
"date-picker-svelte": "^2.13.0", "date-picker-svelte": "^2.13.0",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
@@ -4843,14 +4843,14 @@
} }
}, },
"node_modules/@welshman/app": { "node_modules/@welshman/app": {
"version": "0.0.36", "version": "0.0.37",
"resolved": "https://registry.npmjs.org/@welshman/app/-/app-0.0.36.tgz", "resolved": "https://registry.npmjs.org/@welshman/app/-/app-0.0.37.tgz",
"integrity": "sha512-ECUaBiDE896P6LXdE3yN49z0I2MCvjA0lO6FOd2BCRfmnmdbTnC+FLcoPGTS262/uDuJz+rr3utBjq8DylugaQ==", "integrity": "sha512-EhhLx10PE6r/soiuaR0GF+NSH9H3ilTaXwmfx2cHHR1PE2LXXvf1oWMJl0ZPFmYe0VWfNiu98SLbTLYwe1Y4dQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/throttle-debounce": "^5.0.2", "@types/throttle-debounce": "^5.0.2",
"@welshman/dvm": "~0.0.13", "@welshman/dvm": "~0.0.13",
"@welshman/feeds": "~0.0.29", "@welshman/feeds": "~0.0.30",
"@welshman/lib": "~0.0.37", "@welshman/lib": "~0.0.37",
"@welshman/net": "~0.0.45", "@welshman/net": "~0.0.45",
"@welshman/signer": "~0.0.19", "@welshman/signer": "~0.0.19",
@@ -4902,9 +4902,9 @@
} }
}, },
"node_modules/@welshman/editor": { "node_modules/@welshman/editor": {
"version": "0.0.4", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/@welshman/editor/-/editor-0.0.4.tgz", "resolved": "https://registry.npmjs.org/@welshman/editor/-/editor-0.0.5.tgz",
"integrity": "sha512-tcMwLuBaBtT2JgON5f+Fd4Cg9oM7QMnXW9voGP+RqH1gJt0W6rjjQCtpqEcgdVtHhmaSL1P+tM4ORmOinoCv+A==", "integrity": "sha512-4WOFoPT6LgX2bjM8RR+6YrfOm7Lk2BLlJ46aMYHFRyDcD737Rx5dtsct0ZlyQ8TzPR85TyYHrv6g98/J0cZKDQ==",
"peerDependencies": { "peerDependencies": {
"@tiptap/core": "^2.9.1", "@tiptap/core": "^2.9.1",
"@tiptap/extension-code": "^2.9.1", "@tiptap/extension-code": "^2.9.1",
@@ -5004,9 +5004,9 @@
} }
}, },
"node_modules/@welshman/util": { "node_modules/@welshman/util": {
"version": "0.0.55", "version": "0.0.57",
"resolved": "https://registry.npmjs.org/@welshman/util/-/util-0.0.55.tgz", "resolved": "https://registry.npmjs.org/@welshman/util/-/util-0.0.57.tgz",
"integrity": "sha512-eqb2522Y/9oPaf+qd+qnsqZh4tDT8TZj29G/XvXCsGuFxXBpOzJ2uOuEVclXD4AeFdy0CgMRKe7kZ7741ZRCgg==", "integrity": "sha512-YflD6sfqdhIfHioJVlLydvyKOgACFL0dAcWHymlDz/FszIAl2k0XQXKgAjf0lT2uoXfrCdPsfSZwMTW7qUAY6Q==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/ws": "^8.5.13", "@types/ws": "^8.5.13",

View File

@@ -59,16 +59,16 @@
"@types/qrcode": "^1.5.5", "@types/qrcode": "^1.5.5",
"@vite-pwa/assets-generator": "^0.2.6", "@vite-pwa/assets-generator": "^0.2.6",
"@vite-pwa/sveltekit": "^0.6.6", "@vite-pwa/sveltekit": "^0.6.6",
"@welshman/app": "~0.0.36", "@welshman/app": "~0.0.37",
"@welshman/content": "~0.0.15", "@welshman/content": "~0.0.15",
"@welshman/dvm": "~0.0.13", "@welshman/dvm": "~0.0.13",
"@welshman/editor": "~0.0.4", "@welshman/editor": "~0.0.5",
"@welshman/feeds": "~0.0.30", "@welshman/feeds": "~0.0.30",
"@welshman/lib": "~0.0.37", "@welshman/lib": "~0.0.37",
"@welshman/net": "~0.0.45", "@welshman/net": "~0.0.45",
"@welshman/signer": "~0.0.19", "@welshman/signer": "~0.0.19",
"@welshman/store": "~0.0.15", "@welshman/store": "~0.0.15",
"@welshman/util": "~0.0.55", "@welshman/util": "~0.0.57",
"daisyui": "^4.12.10", "daisyui": "^4.12.10",
"date-picker-svelte": "^2.13.0", "date-picker-svelte": "^2.13.0",
"dotenv": "^16.4.5", "dotenv": "^16.4.5",

View File

@@ -119,6 +119,10 @@
@apply overflow-hidden text-ellipsis; @apply overflow-hidden text-ellipsis;
} }
[data-tip]::before {
@apply ellipsize;
}
.content-padding-x { .content-padding-x {
@apply px-4 sm:px-8 md:px-12; @apply px-4 sm:px-8 md:px-12;
} }

View File

@@ -376,7 +376,6 @@ export const checkRelayAuth = async (url: string, timeout = 3000) => {
export const attemptRelayAccess = async (url: string, claim = "") => { export const attemptRelayAccess = async (url: string, claim = "") => {
const checks = [ const checks = [
() => checkRelayProfile(url),
() => checkRelayConnection(url), () => checkRelayConnection(url),
() => checkRelayAccess(url, claim), () => checkRelayAccess(url, claim),
() => checkRelayAuth(url), () => checkRelayAuth(url),

View File

@@ -71,7 +71,7 @@
<SecondaryNavSection class="max-h-screen"> <SecondaryNavSection class="max-h-screen">
<div> <div>
<SecondaryNavItem class="w-full !justify-between" on:click={openMenu}> <SecondaryNavItem class="w-full !justify-between" on:click={openMenu}>
<strong>{displayRelayUrl(url)}</strong> <strong class="ellipsize">{displayRelayUrl(url)}</strong>
<Icon icon="alt-arrow-down" /> <Icon icon="alt-arrow-down" />
</SecondaryNavItem> </SecondaryNavItem>
{#if showMenu} {#if showMenu}

View File

@@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import {page} from "$app/stores" import {page} from "$app/stores"
import type {TrustedEvent} from "@welshman/util" import type {TrustedEvent} from "@welshman/util"
import {displayRelayUrl} from "@welshman/util"
import {deriveRelay} from "@welshman/app" import {deriveRelay} from "@welshman/app"
import {fade} from "@lib/transition" import {fade} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte" import Icon from "@lib/components/Icon.svelte"
@@ -79,11 +80,11 @@
</div> </div>
</div> </div>
</div> </div>
<div> <div class="min-w-0">
<h2 class="ellipsize whitespace-nowrap text-xl"> <h2 class="ellipsize whitespace-nowrap text-xl">
<RelayName {url} /> <RelayName {url} />
</h2> </h2>
<p class="text-sm opacity-75">{url}</p> <p class="ellipsize text-sm opacity-75">{displayRelayUrl(url)}</p>
</div> </div>
</div> </div>
<RelayDescription {url} /> <RelayDescription {url} />