Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Add read-only inputs to UI plus Copy to Clipboard buttons #3095

Merged
merged 8 commits into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions js/src/modals/CreateAccount/AccountDetails/accountDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default class AccountDetails extends Component {
return (
<Form>
<Input
disabled
readOnly
allowCopy
hint='a descriptive name for the account'
label='account name'
value={ name } />
Expand All @@ -54,7 +55,8 @@ export default class AccountDetails extends Component {

return (
<Input
disabled
readOnly
allowCopy
hint='the account recovery phrase'
label='account recovery phrase (keep safe)'
value={ phrase } />
Expand Down
2 changes: 0 additions & 2 deletions js/src/modals/CreateAccount/NewAccount/newAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export default class CreateAccount extends Component {
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password'
hint='a strong, unique password'
type='password'
Expand All @@ -94,7 +93,6 @@ export default class CreateAccount extends Component {
</div>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password (repeat)'
hint='verify your password'
type='password'
Expand Down
1 change: 0 additions & 1 deletion js/src/modals/CreateAccount/NewImport/newImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default class NewImport extends Component {
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password'
hint='the password to unlock the wallet'
type='password'
Expand Down
2 changes: 0 additions & 2 deletions js/src/modals/CreateAccount/RawKey/rawKey.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export default class RawKey extends Component {
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password'
hint='a strong, unique password'
type='password'
Expand All @@ -85,7 +84,6 @@ export default class RawKey extends Component {
</div>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password (repeat)'
hint='verify your password'
type='password'
Expand Down
2 changes: 0 additions & 2 deletions js/src/modals/CreateAccount/RecoveryPhrase/recoveryPhrase.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default class RecoveryPhrase extends Component {
<div className={ styles.passwords }>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password'
hint='a strong, unique password'
type='password'
Expand All @@ -82,7 +81,6 @@ export default class RecoveryPhrase extends Component {
</div>
<div className={ styles.password }>
<Input
className={ styles.password }
label='password (repeat)'
hint='verify your password'
type='password'
Expand Down
9 changes: 9 additions & 0 deletions js/src/modals/CreateAccount/createAccount.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
.password {
flex: 0 1 50%;
width: 50%;
box-sizing: border-box;

&:nth-child(odd) {
padding-right: 0.25rem;
}

&:nth-child(even) {
padding-left: 0.25rem;
}
}

.passwords {
Expand Down
7 changes: 6 additions & 1 deletion js/src/ui/Container/Title/title.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/
.byline {
color: #aaa;
overflow: hidden;
position: relative;
line-height: 1.2em;
Expand All @@ -24,6 +23,12 @@
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;

color: #aaa;

* {
color: #aaa !important;
}
}

.title {
Expand Down
16 changes: 12 additions & 4 deletions js/src/ui/Container/Title/title.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default class Title extends Component {
title: PropTypes.oneOfType([
PropTypes.string, PropTypes.node
]),
byline: PropTypes.string
byline: PropTypes.oneOfType([
PropTypes.string, PropTypes.node
])
}

state = {
Expand All @@ -34,15 +36,21 @@ export default class Title extends Component {
render () {
const { className, title, byline } = this.props;

const byLine = typeof byline === 'string'
? (
<span title={ byline }>
{ byline }
</span>
)
: byline;

return (
<div className={ className }>
<h3 className={ styles.title }>
{ title }
</h3>
<div className={ styles.byline }>
<span title={ byline }>
{ byline }
</span>
{ byLine }
</div>
</div>
);
Expand Down
31 changes: 31 additions & 0 deletions js/src/ui/Form/Input/input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2015, 2016 Ethcore (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 <http://www.gnu.org/licenses/>.
*/

.container {
display: flex;
flex-direction: row;
align-items: flex-end;
position: relative;
}

.copy {
margin-right: 0.5em;

svg {
transition: all .5s ease-in-out;
}
}
Loading