polish
This commit is contained in:
@@ -425,7 +425,7 @@ function Options() {
|
|||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Checkbox.Root
|
<Checkbox.Root
|
||||||
id="notification"
|
id="nostrlink"
|
||||||
className="flex h-6 w-6 appearance-none items-center justify-center rounded-lg bg-white outline-none border border-primary data-[state=checked]:bg-primary data-[state=checked]:border-secondary"
|
className="flex h-6 w-6 appearance-none items-center justify-center rounded-lg bg-white outline-none border border-primary data-[state=checked]:bg-primary data-[state=checked]:border-secondary"
|
||||||
checked={handleNostrLinks}
|
checked={handleNostrLinks}
|
||||||
onCheckedChange={changeHandleNostrLinks}
|
onCheckedChange={changeHandleNostrLinks}
|
||||||
@@ -447,7 +447,7 @@ function Options() {
|
|||||||
</svg>
|
</svg>
|
||||||
</Checkbox.Indicator>
|
</Checkbox.Indicator>
|
||||||
</Checkbox.Root>
|
</Checkbox.Root>
|
||||||
<label htmlFor="notification">Handle nostr links</label>
|
<label htmlFor="nostrlink">Handle nostr links</label>
|
||||||
</div>
|
</div>
|
||||||
{handleNostrLinks && (
|
{handleNostrLinks && (
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
@@ -464,17 +464,17 @@ function Options() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{showProtocolHandlerHelp && (
|
{showProtocolHandlerHelp && (
|
||||||
<pre className="bg-muted p-2 rounded-xl break-all">{`
|
<pre className="bg-muted px-2 rounded-xl overflow-scroll">{`
|
||||||
{raw} = anything after the colon, i.e. the full nip19 bech32 string
|
{raw} = anything after the colon, i.e. the full nip19 bech32 string
|
||||||
{hex} = hex pubkey for npub or nprofile, hex event id for note or nevent
|
{hex} = hex pubkey for npub or nprofile, hex event id for note or nevent
|
||||||
{p_or_e} = "p" for npub or nprofile, "e" for note or nevent
|
{p_or_e} = "p" for npub or nprofile, "e" for note or nevent
|
||||||
{u_or_n} = "u" for npub or nprofile, "n" for note or nevent
|
{u_or_n} = "u" for npub or nprofile, "n" for note or nevent
|
||||||
{relay0} = first relay in a nprofile or nevent
|
{relay0} = first relay in a nprofile or nevent
|
||||||
{relay1} = second relay in a nprofile or nevent
|
{relay1} = second relay in a nprofile or nevent
|
||||||
{relay2} = third relay in a nprofile or nevent
|
{relay2} = third relay in a nprofile or nevent
|
||||||
{hrp} = human-readable prefix of the nip19 string
|
{hrp} = human-readable prefix of the nip19 string
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
- https://njump.me/{raw}
|
- https://njump.me/{raw}
|
||||||
- https://snort.social/{raw}
|
- https://snort.social/{raw}
|
||||||
- https://nostr.band/{raw}
|
- https://nostr.band/{raw}
|
||||||
@@ -489,7 +489,7 @@ function Options() {
|
|||||||
<button
|
<button
|
||||||
disabled={!unsavedChanges.length}
|
disabled={!unsavedChanges.length}
|
||||||
onClick={saveChanges}
|
onClick={saveChanges}
|
||||||
className="w-full h-10 bg-primary rounded-xl font-bold inline-flex items-center justify-center text-white disabled:cursor-not-allowed"
|
className="w-full h-10 bg-primary rounded-xl font-bold inline-flex items-center justify-center text-white disabled:cursor-not-allowed disabled:opacity-70 transform active:translate-y-1 transition-transform ease-in-out duration-75"
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
@@ -569,6 +569,7 @@ function Options() {
|
|||||||
|
|
||||||
function addNewRelay() {
|
function addNewRelay() {
|
||||||
if (newRelayURL.trim() === '') return
|
if (newRelayURL.trim() === '') return
|
||||||
|
if (!newRelayURL.startsWith('wss://')) return
|
||||||
relays.push({
|
relays.push({
|
||||||
url: newRelayURL,
|
url: newRelayURL,
|
||||||
policy: {read: true, write: true}
|
policy: {read: true, write: true}
|
||||||
|
|||||||
@@ -51,9 +51,9 @@ function Prompt() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{params && (
|
{params && (
|
||||||
<div>
|
<div className="flex flex-col gap-1">
|
||||||
<p>Now acting on</p>
|
<p>Now acting on</p>
|
||||||
<pre className="bg-muted rounded-xl p-3">
|
<pre className="bg-muted px-2 rounded-xl overflow-scroll">
|
||||||
<code>{JSON.stringify(event || params, null, 2)}</code>
|
<code>{JSON.stringify(event || params, null, 2)}</code>
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user