This commit is contained in:
reya
2023-11-21 10:22:52 +07:00
parent 9f8df79be3
commit 724747ee85
2 changed files with 19 additions and 18 deletions

View File

@@ -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,7 +464,7 @@ 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
@@ -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}

View File

@@ -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>