Normalize relay URLs
This commit is contained in:
@@ -99,7 +99,8 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</FieldInline>
|
</FieldInline>
|
||||||
<p class="text-sm">
|
<p class="text-sm">
|
||||||
Forgot your password? <Button class="link" onclick={loginWithOTP}>Log in with a one-time access code</Button
|
Forgot your password? <Button class="link" onclick={loginWithOTP}
|
||||||
|
>Log in with a one-time access code</Button
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
|
|||||||
@@ -111,8 +111,8 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</FieldInline>
|
</FieldInline>
|
||||||
<p class="text-sm">
|
<p class="text-sm">
|
||||||
To keep your key as safe a possible, you will receive <strong>three separate emails</strong>.
|
To keep your key as safe a possible, you will receive <strong>three separate emails</strong>. Be
|
||||||
Be sure to enter all three codes!
|
sure to enter all three codes!
|
||||||
</p>
|
</p>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {loadProfile} from "@welshman/app"
|
import {getProfile, loadProfile} from "@welshman/app"
|
||||||
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -22,7 +22,8 @@
|
|||||||
|
|
||||||
<div class="flex pr-3">
|
<div class="flex pr-3">
|
||||||
{#each visiblePubkeys.toSorted().slice(0, 15) as pubkey (pubkey)}
|
{#each visiblePubkeys.toSorted().slice(0, 15) as pubkey (pubkey)}
|
||||||
<div class="z-feature -mr-3 inline-block flex items-center justify-center bg-base-100 rounded-full h-8 w-8">
|
<div
|
||||||
|
class="z-feature -mr-3 inline-block flex h-8 w-8 items-center justify-center rounded-full bg-base-100">
|
||||||
<ProfileCircle class="h-8 w-8 bg-base-300" {pubkey} {size} />
|
<ProfileCircle class="h-8 w-8 bg-base-300" {pubkey} {size} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
if (password.trim().length < 12) {
|
if (password.trim().length < 12) {
|
||||||
return pushToast({
|
return pushToast({
|
||||||
theme: "error",
|
theme: "error",
|
||||||
message: "Password must be at least 12 characters long.",
|
message: "Password must be at least 12 characters long.",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
loading = true
|
loading = true
|
||||||
|
|||||||
@@ -68,7 +68,8 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
</FieldInline>
|
</FieldInline>
|
||||||
<p class="text-sm">
|
<p class="text-sm">
|
||||||
We just sent a one-time confirmation code to {email}. Once you receive it, you can enter it above.
|
We just sent a one-time confirmation code to {email}. Once you receive it, you can enter it
|
||||||
|
above.
|
||||||
</p>
|
</p>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||||
|
|||||||
@@ -138,13 +138,15 @@ export const ENABLE_ZAPS = Capacitor.getPlatform() != "ios"
|
|||||||
|
|
||||||
export const NOTIFIER_PUBKEY = import.meta.env.VITE_NOTIFIER_PUBKEY
|
export const NOTIFIER_PUBKEY = import.meta.env.VITE_NOTIFIER_PUBKEY
|
||||||
|
|
||||||
export const NOTIFIER_RELAY = import.meta.env.VITE_NOTIFIER_RELAY
|
|
||||||
|
|
||||||
export const VAPID_PUBLIC_KEY = import.meta.env.VITE_VAPID_PUBLIC_KEY
|
export const VAPID_PUBLIC_KEY = import.meta.env.VITE_VAPID_PUBLIC_KEY
|
||||||
|
|
||||||
export const INDEXER_RELAYS = fromCsv(import.meta.env.VITE_INDEXER_RELAYS)
|
export const NOTIFIER_RELAY = normalizeRelayUrl(import.meta.env.VITE_NOTIFIER_RELAY)
|
||||||
|
|
||||||
export const SIGNER_RELAYS = fromCsv(import.meta.env.VITE_SIGNER_RELAYS)
|
export const SIGNER_RELAYS = fromCsv(import.meta.env.VITE_SIGNER_RELAYS).map(normalizeRelayUrl)
|
||||||
|
|
||||||
|
export const INDEXER_RELAYS = fromCsv(import.meta.env.VITE_INDEXER_RELAYS).map(normalizeRelayUrl)
|
||||||
|
|
||||||
|
export const PLATFORM_RELAYS = fromCsv(import.meta.env.VITE_PLATFORM_RELAYS).map(normalizeRelayUrl)
|
||||||
|
|
||||||
export const PLATFORM_URL = import.meta.env.VITE_PLATFORM_URL
|
export const PLATFORM_URL = import.meta.env.VITE_PLATFORM_URL
|
||||||
|
|
||||||
@@ -156,16 +158,14 @@ export const PLATFORM_LOGO = PLATFORM_URL + "/logo.png"
|
|||||||
|
|
||||||
export const PLATFORM_NAME = import.meta.env.VITE_PLATFORM_NAME
|
export const PLATFORM_NAME = import.meta.env.VITE_PLATFORM_NAME
|
||||||
|
|
||||||
export const PLATFORM_RELAYS = fromCsv(import.meta.env.VITE_PLATFORM_RELAYS)
|
|
||||||
|
|
||||||
export const PLATFORM_ACCENT = import.meta.env.VITE_PLATFORM_ACCENT
|
export const PLATFORM_ACCENT = import.meta.env.VITE_PLATFORM_ACCENT
|
||||||
|
|
||||||
export const PLATFORM_DESCRIPTION = import.meta.env.VITE_PLATFORM_DESCRIPTION
|
export const PLATFORM_DESCRIPTION = import.meta.env.VITE_PLATFORM_DESCRIPTION
|
||||||
|
|
||||||
export const DEFAULT_BLOSSOM_SERVERS = fromCsv(import.meta.env.VITE_DEFAULT_BLOSSOM_SERVERS)
|
|
||||||
|
|
||||||
export const POMADE_SIGNERS = fromCsv(import.meta.env.VITE_POMADE_SIGNERS)
|
export const POMADE_SIGNERS = fromCsv(import.meta.env.VITE_POMADE_SIGNERS)
|
||||||
|
|
||||||
|
export const DEFAULT_BLOSSOM_SERVERS = fromCsv(import.meta.env.VITE_DEFAULT_BLOSSOM_SERVERS)
|
||||||
|
|
||||||
export const DEFAULT_PUBKEYS = import.meta.env.VITE_DEFAULT_PUBKEYS
|
export const DEFAULT_PUBKEYS = import.meta.env.VITE_DEFAULT_PUBKEYS
|
||||||
|
|
||||||
export const DUFFLEPUD_URL = "https://dufflepud.onrender.com"
|
export const DUFFLEPUD_URL = "https://dufflepud.onrender.com"
|
||||||
@@ -236,7 +236,7 @@ export const deriveRelaySignedEvents = (url: string, filters: Filter[]) =>
|
|||||||
|
|
||||||
pomadeContext.setSignerPubkeys(POMADE_SIGNERS)
|
pomadeContext.setSignerPubkeys(POMADE_SIGNERS)
|
||||||
|
|
||||||
pomadeContext.setArgonWorker(import('@pomade/core/argon-worker.js?worker'))
|
pomadeContext.setArgonWorker(import("@pomade/core/argon-worker.js?worker"))
|
||||||
|
|
||||||
appContext.dufflepudUrl = DUFFLEPUD_URL
|
appContext.dufflepudUrl = DUFFLEPUD_URL
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,13 @@ import {writable} from "svelte/store"
|
|||||||
import type {Nip46ResponseWithResult} from "@welshman/signer"
|
import type {Nip46ResponseWithResult} from "@welshman/signer"
|
||||||
import {Nip46Broker} from "@welshman/signer"
|
import {Nip46Broker} from "@welshman/signer"
|
||||||
import {makeSecret} from "@welshman/util"
|
import {makeSecret} from "@welshman/util"
|
||||||
import {PLATFORM_URL, PLATFORM_NAME, PLATFORM_LOGO, SIGNER_RELAYS} from "@app/core/state"
|
import {
|
||||||
|
PLATFORM_URL,
|
||||||
|
PLATFORM_NAME,
|
||||||
|
PLATFORM_LOGO,
|
||||||
|
SIGNER_RELAYS,
|
||||||
|
NIP46_PERMS,
|
||||||
|
} from "@app/core/state"
|
||||||
import {pushToast} from "@app/util/toast"
|
import {pushToast} from "@app/util/toast"
|
||||||
|
|
||||||
export class Nip46Controller {
|
export class Nip46Controller {
|
||||||
@@ -23,6 +29,7 @@ export class Nip46Controller {
|
|||||||
url: PLATFORM_URL,
|
url: PLATFORM_URL,
|
||||||
name: PLATFORM_NAME,
|
name: PLATFORM_NAME,
|
||||||
image: PLATFORM_LOGO,
|
image: PLATFORM_LOGO,
|
||||||
|
perms: NIP46_PERMS,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.url.set(url)
|
this.url.set(url)
|
||||||
|
|||||||
Reference in New Issue
Block a user