aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Request.svelte
blob: 44f8516d8c2ad4592d4f32e58f42c0f5f5dea3a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<script>
	import { t } from '$lib/translations';
	import { fly } from 'svelte/transition';
	import { Avatar, Icon } from '$comp';
	import { request, requestRedirect } from '$lib/store';
	import { page } from '$app/stores';

	export let user;

	$requestRedirect = $page.url.pathname;
</script>

{#if $request}
	<div class="fixed bottom-0 border-t w-full p-4 bg-white z-50" in:fly>
		<div class="flex flex-wrap md:flex-nowrap max-w-xl mx-auto gap-2">
			<div class="my-auto mx-auto">
				<div class="flex">
					<Avatar user={$request.requester} size={12} />
					<h1 class="my-auto">
						<b>{$request.requester.username}</b>
						{$t('payments.readyToPay')}
					</h1>
				</div>
			</div>
			<div class="mx-auto my-auto flex gap-2">
				<a href={`/${user.username}/receive/${$request.id}`}>
					<button class="rounded-full border py-2 px-4 font-bold hover:opacity-80 w-32">
						{$t('payments.invoice')}
					</button>
				</a>
			</div>
		</div>
	</div>
{/if}
*/ .highlight .sx { color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */ .highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */ .highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */ .highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
# Nostr-rs-relay configuration

[info]
# The advertised URL for the Nostr websocket.
relay_url = "wss://nostr.example.com/"

# Relay information for clients.  Put your unique server name here.
name = "nostr-rs-relay"

# Description
description = "A newly created nostr-rs-relay.\n\nCustomize this with your own info."

# Administrative contact pubkey
#pubkey = "0c2d168a4ae8ca58c9f1ab237b5df682599c6c7ab74307ea8b05684b60405d41"

# Administrative contact URI
#contact = "mailto:[email protected]"

[diagnostics]
# Enable tokio tracing (for use with tokio-console)
#tracing = true

[database]
# Directory for SQLite files.  Defaults to the current directory.  Can
# also be specified (and overriden) with the "--db dirname" command
# line option.
data_directory = "."


# Use an in-memory database instead of 'nostr.db'.
# Caution; this will not survive a process restart!
#in_memory = false

# Database connection pool settings for subscribers:

# Minimum number of SQLite reader connections
#min_conn = 4

# Maximum number of SQLite reader connections
#max_conn = 128

[network]
# Bind to this network address
address = "0.0.0.0"

# Listen on this port
port = 8080

# If present, read this HTTP header for logging client IP addresses.
# Examples for common proxies, cloudflare:
#remote_ip_header = "x-forwarded-for"
#remote_ip_header = "cf-connecting-ip"

# Websocket ping interval in seconds, defaults to 5 minutes
#ping_interval = 300

[options]
# Reject events that have timestamps greater than this many seconds in
# the future.  Recommended to reject anything greater than 30 minutes
# from the current time, but the default is to allow any date.
reject_future_seconds = 1800

[limits]
# Limit events created per second, averaged over one minute.  Must be
# an integer.  If not set (or set to 0), defaults to unlimited.  Note:
# this is for the server as a whole, not per-connection.
# messages_per_sec = 0

# Limit client subscriptions created per second, averaged over one
# minute.  Must be an integer.  If not set (or set to 0), defaults to
# unlimited.
#subscriptions_per_min = 0

# UNIMPLEMENTED...
# Limit how many concurrent database connections a client can have.
# This prevents a single client from starting too many expensive
# database queries.  Must be an integer.  If not set (or set to 0),
# defaults to unlimited (subject to subscription limits).
#db_conns_per_client = 0

# Limit blocking threads used for database connections.  Defaults to 16.
#max_blocking_threads = 16

# Limit the maximum size of an EVENT message.  Defaults to 128 KB.
# Set to 0 for unlimited.
#max_event_bytes = 131072

# Maximum WebSocket message in bytes.  Defaults to 128 KB.
#max_ws_message_bytes = 131072

# Maximum WebSocket frame size in bytes.  Defaults to 128 KB.
#max_ws_frame_bytes = 131072

# Broadcast buffer size, in number of events.  This prevents slow
# readers from consuming memory.
#broadcast_buffer = 16384

# Event persistence buffer size, in number of events.  This provides
# backpressure to senders if writes are slow.
#event_persist_buffer = 4096

[authorization]
# Pubkey addresses in this array are whitelisted for event publishing.
# Only valid events by these authors will be accepted, if the variable
# is set.
#pubkey_whitelist = [
#  "35d26e4690cbe1a898af61cc3515661eb5fa763b57bd0b42e45099c8b32fd50f",
#  "887645fef0ce0c3c1218d2f5d8e6132a19304cdc57cd20281d082f38cfea0072",
#]

[verified_users]
# NIP-05 verification of users.  Can be "enabled" to require NIP-05
# metadata for event authors, "passive" to perform validation but
# never block publishing, or "disabled" to do nothing.
#mode = "disabled"

# Domain names that will be prevented from publishing events.
#domain_blacklist = ["wellorder.net"]

# Domain names that are allowed to publish events.  If defined, only
# events NIP-05 verified authors at these domains are persisted.
#domain_whitelist = ["example.com"]

# Consider an pubkey "verified" if we have a successful validation
# from the NIP-05 domain within this amount of time.  Note, if the
# domain provides a successful response that omits the account,
# verification is immediately revoked.
#verify_expiration = "1 week"

# How long to wait between verification attempts for a specific author.
#verify_update_frequency = "24 hours"

# How many consecutive failed checks before we give up on verifying
# this author.
#max_consecutive_failures = 20