Dependency updates and convert npub to hex on paste
This commit is contained in:
parent
924be8fc2e
commit
cc538cf643
4 changed files with 84 additions and 74 deletions
|
@ -25,6 +25,11 @@
|
|||
export let invalid: boolean | undefined = undefined;
|
||||
export let minlength: string | undefined = undefined;
|
||||
export let onChange: (() => void) | undefined = undefined;
|
||||
export let onInput: (() => void) | undefined = undefined;
|
||||
|
||||
const onInputHandler = () => {
|
||||
onInput?.();
|
||||
};
|
||||
</script>
|
||||
|
||||
<Row>
|
||||
|
@ -45,6 +50,8 @@
|
|||
{minlength}
|
||||
bsSize={size}
|
||||
on:change={onChange}
|
||||
on:input={onInputHandler}
|
||||
spellcheck={type === 'text' ? 'false' : undefined}
|
||||
/>
|
||||
{#if suffix}
|
||||
<InputGroupText>{suffix}</InputGroupText>
|
||||
|
|
|
@ -148,6 +148,7 @@
|
|||
};
|
||||
|
||||
const checkValidNostrPubkey = (key: string) => {
|
||||
$settings[key] = $settings[key].trim();
|
||||
if (isValidNpub($settings[key])) {
|
||||
dispatch('showToast', {
|
||||
color: 'info',
|
||||
|
@ -617,6 +618,7 @@
|
|||
: undefined}
|
||||
size={$uiSettings.inputSize}
|
||||
onChange={() => checkValidNostrPubkey('nostrZapPubkey')}
|
||||
onInput={() => checkValidNostrPubkey('nostrZapPubkey')}
|
||||
/>
|
||||
{/if}
|
||||
{#if $settings.useNostr}
|
||||
|
@ -630,6 +632,7 @@
|
|||
: undefined}
|
||||
size={$uiSettings.inputSize}
|
||||
onChange={() => checkValidNostrPubkey('nostrPubKey')}
|
||||
onInput={() => checkValidNostrPubkey('nostrPubKey')}
|
||||
/>
|
||||
{/if}
|
||||
{#if 'nostrZapNotify' in $settings || $settings.useNostr}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue