Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Configure/Configure.js
import React, { useState, useEffect } from 'react'; | import React, { useState, useEffect } from 'react'; | ||||
import styled from 'styled-components'; | import styled from 'styled-components'; | ||||
import { useLocation, Link } from 'react-router-dom'; | import { useLocation, Link } from 'react-router-dom'; | ||||
import { | import { | ||||
generalNotification, | |||||
errorNotification, | errorNotification, | ||||
generalNotification, | |||||
} from 'components/Common/Notifications'; | } from 'components/Common/Notifications'; | ||||
import { | import { | ||||
Collapse, | Collapse, | ||||
Form, | Form, | ||||
Input, | Input, | ||||
Modal, | Modal, | ||||
Alert, | Alert, | ||||
Switch, | Switch, | ||||
Show All 32 Lines | import { | ||||
ThemedPlusOutlined, | ThemedPlusOutlined, | ||||
ThemedDownloadOutlined, | ThemedDownloadOutlined, | ||||
ThemedCopySolid, | ThemedCopySolid, | ||||
} from 'components/Common/CustomIcons'; | } from 'components/Common/CustomIcons'; | ||||
import { ReactComponent as Trashcan } from 'assets/trashcan.svg'; | import { ReactComponent as Trashcan } from 'assets/trashcan.svg'; | ||||
import { ReactComponent as Edit } from 'assets/edit.svg'; | import { ReactComponent as Edit } from 'assets/edit.svg'; | ||||
import { Event } from 'utils/GoogleAnalytics'; | import { Event } from 'utils/GoogleAnalytics'; | ||||
import ApiError from 'components/Common/ApiError'; | import ApiError from 'components/Common/ApiError'; | ||||
import CopyToClipboard from 'components/Common/CopyToClipboard'; | |||||
import { formatSavedBalance } from 'utils/formatting'; | import { formatSavedBalance } from 'utils/formatting'; | ||||
import { isValidXecAddress } from 'utils/validation'; | import { isValidXecAddress } from 'utils/validation'; | ||||
import { convertToEcashPrefix } from 'utils/cashMethods'; | import { convertToEcashPrefix } from 'utils/cashMethods'; | ||||
import { currency } from 'components/Common/Ticker.js'; | import { currency } from 'components/Common/Ticker.js'; | ||||
const { Panel } = Collapse; | const { Panel } = Collapse; | ||||
const SettingsLinkCtn = styled.div` | const SettingsLinkCtn = styled.div` | ||||
▲ Show 20 Lines • Show All 1,605 Lines • ▼ Show 20 Lines | return ( | ||||
</ContactListName> | </ContactListName> | ||||
</Tooltip> | </Tooltip> | ||||
<Tooltip | <Tooltip | ||||
title={ | title={ | ||||
element.address | element.address | ||||
} | } | ||||
> | > | ||||
<ContactListAddress> | <ContactListAddress> | ||||
<div | <div className="overflow notranslate"> | ||||
className="overflow notranslate" | |||||
onClick={() => { | |||||
navigator.clipboard.writeText( | |||||
element.address, | |||||
); | |||||
generalNotification( | |||||
element.address + | |||||
' copied to clipboard', | |||||
'Copied', | |||||
'Success', | |||||
); | |||||
}} | |||||
> | |||||
{ | { | ||||
element.address | element.address | ||||
} | } | ||||
</div> | </div> | ||||
</ContactListAddress> | </ContactListAddress> | ||||
</Tooltip> | </Tooltip> | ||||
<ContactListCtn> | <ContactListCtn> | ||||
<ThemedCopySolid | <CopyToClipboard | ||||
onClick={() => { | data={ | ||||
navigator.clipboard.writeText( | element.address | ||||
element.address, | } | ||||
); | optionalOnCopyNotification={{ | ||||
generalNotification( | title: 'Copied', | ||||
element.address + | msg: `${element.address} copied to clipboard`, | ||||
' copied to clipboard', | |||||
'Copied', | |||||
'Success', | |||||
); | |||||
}} | }} | ||||
/> | > | ||||
<ThemedCopySolid /> | |||||
</CopyToClipboard> | |||||
<Edit | <Edit | ||||
onClick={() => | onClick={() => | ||||
handleRenameContact( | handleRenameContact( | ||||
element, | element, | ||||
) | ) | ||||
} | } | ||||
/> | /> | ||||
<Link | <Link | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |