From 2528675569b3ee7430ee17976cd02a3d346302c7 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Fri, 17 Aug 2018 15:46:59 -0400 Subject: [PATCH] add release domain alert modal --- app/components/ens/ReleaseDomain.js | 44 +++++++++++++++++++++++++++++ app/components/ens/nameLookup.js | 5 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 app/components/ens/ReleaseDomain.js diff --git a/app/components/ens/ReleaseDomain.js b/app/components/ens/ReleaseDomain.js new file mode 100644 index 0000000..74b0bc8 --- /dev/null +++ b/app/components/ens/ReleaseDomain.js @@ -0,0 +1,44 @@ +import React from 'react'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import DialogTitle from '@material-ui/core/DialogTitle'; +import Slide from '@material-ui/core/Slide'; + +function Transition(props) { + return ; +} + +const ReleaseDomainAlert = ({ open, handleClose }) => ( +
+ + + {"Release domain?"} + + + + Your SNT deposit will be returned and name will be available to other users. + + + + + + + +
+); + +export default ReleaseDomainAlert; diff --git a/app/components/ens/nameLookup.js b/app/components/ens/nameLookup.js index 316a8cb..8a01f90 100644 --- a/app/components/ens/nameLookup.js +++ b/app/components/ens/nameLookup.js @@ -9,6 +9,7 @@ import { Button, Field, TextInput, MobileSearch, MobileButton, Card, Info, Text import { IconCheck } from '../../ui/icons' import { keyFromXY } from '../../utils/ecdsa'; import EditOptions from './EditOptions'; +import ReleaseDomainAlert from './ReleaseDomain'; import theme from '../../ui/theme' import { withFormik } from 'formik'; import PublicResolver from 'Embark/contracts/PublicResolver'; @@ -87,12 +88,13 @@ class RenderAddresses extends PureComponent { render() { const { domainName, address, statusAccount, expirationTime, defaultAccount } = this.props - const { copied, editMenu } = this.state + const { copied, editMenu, editAction } = this.state const markCopied = (v) => { this.setState({ copied: v }) } const isCopied = address => address == copied; const renderCopied = address => isCopied(address) && Copied!; const isOwner = defaultAccount === address; const onClose = value => { this.setState({ editAction: value, editMenu: false }) } + const closeReleaseAlert = value => { this.setState({ editAction: null }) } return ( @@ -112,6 +114,7 @@ class RenderAddresses extends PureComponent { {isOwner && { this.setState({ editMenu: true }) } }/>} {editMenu && } + )