From 3a482ef27f31dfa4aab32a5cd9348566981a3b8f Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 22 Feb 2017 09:50:11 +0100 Subject: [PATCH 01/23] Add VaultMeta edit dialog --- js/src/modals/VaultMeta/index.js | 17 +++ js/src/modals/VaultMeta/vaultMeta.js | 151 ++++++++++++++++++++++ js/src/modals/VaultMeta/vaultMeta.spec.js | 126 ++++++++++++++++++ js/src/modals/index.js | 1 + js/src/views/Vaults/store.js | 53 +++++++- js/src/views/Vaults/store.spec.js | 85 +++++++++++- js/src/views/Vaults/vaults.js | 32 ++++- js/src/views/Vaults/vaults.spec.js | 16 +++ 8 files changed, 475 insertions(+), 6 deletions(-) create mode 100644 js/src/modals/VaultMeta/index.js create mode 100644 js/src/modals/VaultMeta/vaultMeta.js create mode 100644 js/src/modals/VaultMeta/vaultMeta.spec.js diff --git a/js/src/modals/VaultMeta/index.js b/js/src/modals/VaultMeta/index.js new file mode 100644 index 00000000000..685c54ef33d --- /dev/null +++ b/js/src/modals/VaultMeta/index.js @@ -0,0 +1,17 @@ +// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +export default from './vaultMeta'; diff --git a/js/src/modals/VaultMeta/vaultMeta.js b/js/src/modals/VaultMeta/vaultMeta.js new file mode 100644 index 00000000000..3cc82671334 --- /dev/null +++ b/js/src/modals/VaultMeta/vaultMeta.js @@ -0,0 +1,151 @@ +// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +import { observer } from 'mobx-react'; +import React, { Component, PropTypes } from 'react'; +import { FormattedMessage } from 'react-intl'; +import { connect } from 'react-redux'; +import { bindActionCreators } from 'redux'; + +import { newError } from '~/redux/actions'; +import { Button, Input, InputChip, Form, Portal, VaultCard } from '~/ui'; +import { CheckIcon, CloseIcon } from '~/ui/Icons'; + +@observer +class VaultMeta extends Component { + static propTypes = { + newError: PropTypes.func.isRequired, + vaultStore: PropTypes.object.isRequired + }; + + render () { + const { isBusyMeta, isModalMetaOpen, vault, vaultDescription, vaultTags } = this.props.vaultStore; + + if (!isModalMetaOpen) { + return null; + } + + return ( + } + key='close' + label={ + + } + onClick={ this.onClose } + />, +