mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-04-09 20:29:17 +02:00
add backup link to profile editor
This commit is contained in:
parent
88f34c1e40
commit
c6a4f96cd3
5
.changeset/tiny-melons-attend.md
Normal file
5
.changeset/tiny-melons-attend.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"nostrudel": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add "Download Backup" link to profile edit view
|
@ -6,6 +6,7 @@ import {
|
|||||||
FormErrorMessage,
|
FormErrorMessage,
|
||||||
FormLabel,
|
FormLabel,
|
||||||
Input,
|
Input,
|
||||||
|
Link,
|
||||||
Textarea,
|
Textarea,
|
||||||
useToast,
|
useToast,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
@ -13,6 +14,7 @@ import moment from "moment";
|
|||||||
import { useEffect, useMemo } from "react";
|
import { useEffect, useMemo } from "react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { nostrPostAction } from "../../classes/nostr-post-action";
|
import { nostrPostAction } from "../../classes/nostr-post-action";
|
||||||
|
import { ExternalLinkIcon } from "../../components/icons";
|
||||||
import { isLNURL } from "../../helpers/lnurl";
|
import { isLNURL } from "../../helpers/lnurl";
|
||||||
import { Kind0ParsedContent } from "../../helpers/user-metadata";
|
import { Kind0ParsedContent } from "../../helpers/user-metadata";
|
||||||
import { useReadRelayUrls, useWriteRelayUrls } from "../../hooks/use-client-relays";
|
import { useReadRelayUrls, useWriteRelayUrls } from "../../hooks/use-client-relays";
|
||||||
@ -169,6 +171,9 @@ const MetadataForm = ({ defaultValues, onSubmit }: MetadataFormProps) => {
|
|||||||
<FormErrorMessage>{errors.lightningAddress?.message}</FormErrorMessage>
|
<FormErrorMessage>{errors.lightningAddress?.message}</FormErrorMessage>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<Flex alignSelf="flex-end" gap="2">
|
<Flex alignSelf="flex-end" gap="2">
|
||||||
|
<Button as={Link} isExternal href="https://metadata.nostr.com/" rightIcon={<ExternalLinkIcon />}>
|
||||||
|
Download Backup
|
||||||
|
</Button>
|
||||||
<Button onClick={() => reset()}>Reset</Button>
|
<Button onClick={() => reset()}>Reset</Button>
|
||||||
<Button colorScheme="brand" isLoading={isSubmitting} type="submit">
|
<Button colorScheme="brand" isLoading={isSubmitting} type="submit">
|
||||||
Update
|
Update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user