Skip to content

Commit

Permalink
Merge pull request #57 from adshares/develop
Browse files Browse the repository at this point in the history
v0.2.1
  • Loading branch information
m-pilarczyk authored Jan 16, 2019
2 parents 7d2d7b8 + 85d7863 commit 1ccc7a8
Show file tree
Hide file tree
Showing 26 changed files with 82 additions and 257 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

# [0.2.1] - 2019-01-16
### Added
- Account menu chevron
### Fixed
- Master key settings
- Icons background
- Page scroll
- Manifest permissions

# [0.2.0] - 2019-01-15
### Added
- Free accounts support
Expand Down Expand Up @@ -35,8 +44,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Storage encryption
- Docs

[Unreleased]: https://github.com/adshares/ads-browser-wallet/compare/v0.2.0...HEAD
[Unreleased]: https://github.com/adshares/ads-browser-wallet/compare/v0.2.1...HEAD

[0.2.0]: https://github.com/adshares/ads-browser-wallet/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/adshares/ads-browser-wallet/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/adshares/ads-browser-wallet/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/adshares/ads-browser-wallet/releases/tag/v0.1.0
13 changes: 6 additions & 7 deletions app/components/Page/Page.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,19 @@
}

.contentWrapper {
padding: 15px;
text-align: left;
overflow: auto;
position: relative;
z-index: 99;
}

.withScroll {
margin: 15px;
padding: 0;
margin-right: 5px;
padding-right: 10px;
overflow-x: hidden;
overflow-y: auto;
max-height: 460px;
}

.withScroll {
overflow-y: scroll;
height: 460px;
}

.footer {
Expand Down
5 changes: 5 additions & 0 deletions app/components/SelectAccount/SelectAccount.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,16 @@
white-space: nowrap;
text-overflow: ellipsis;
}

.optionAccount {
font-size: 12px;
color: var(--slate);
}

.optionAccount svg {
margin-left: 5px;
}

.optionAdd {
padding: 16px;
display: flex;
Expand Down
7 changes: 5 additions & 2 deletions app/components/SelectAccount/SelectAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faPlus } from '@fortawesome/free-solid-svg-icons';
import { faPlus, faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons';
import style from './SelectAccount.css';

export default class SelectAccount extends React.Component {
Expand Down Expand Up @@ -61,7 +61,10 @@ export default class SelectAccount extends React.Component {
onKeyDown={() => this.toggleShowOptions(true)}
>
<span className={style.optionName}> {activeOption.name} </span>
<span className={style.optionAccount}> {activeOption.address} </span>
<span className={style.optionAccount}>
{activeOption.address}
<FontAwesomeIcon icon={showOptions ? faChevronUp : faChevronDown} />
</span>
</div>)}

<ul className={`${style.optionList} ${showOptions && style.optionListActive}`}>
Expand Down
73 changes: 0 additions & 73 deletions app/components/settingsList/SettingsList.css

This file was deleted.

113 changes: 0 additions & 113 deletions app/components/settingsList/SettingsList.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/containers/Settings/KeysSettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class KeysSettingsPage extends PageComponent {
const { keys } = this.props.vault;

const importedKeys = keys.filter(key => key.type === 'imported');
const generatedKeys = keys.filter(key => key.type === 'auto');
const generatedKeys = keys.filter(key => key.type === 'master' || key.type === 'auto');

return (
<Page
Expand Down
20 changes: 1 addition & 19 deletions app/containers/Settings/SeedPhrasePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ class SeedPhrasePage extends PageComponent {
render() {
const { vault, authDialog } = this.props;
let seedPhrase = ''.padStart(86, 'X');
let publicKey = ''.padStart(64, 'X');
let secretKey = ''.padStart(64, 'X');
if (authDialog.isConfirmed && authDialog.name === 'seedPhrase') {
const key = vault.keys.filter(k => k.type === 'master')[0];
seedPhrase = vault.seedPhrase;
publicKey = key.publicKey;
secretKey = key.secretKey;
}

return (
Expand All @@ -44,27 +39,14 @@ class SeedPhrasePage extends PageComponent {
>
<Form>
<Box layout="warning" icon={faExclamation}>
Store the seed phrase safely. Only the public key and signatures can be revealed.
The seed phrase and secret key must not be transferred to anyone.
Store the seed phrase safely. The seed phrase must not be transferred to anyone.
</Box>
<InputControl
value={seedPhrase}
rows={3}
readOnly
label="Seed Phrase"
/>
<InputControl
value={publicKey}
rows={2}
readOnly
label="Public key"
/>
<InputControl
value={secretKey}
rows={2}
readOnly
label="Secret key"
/>
<ButtonLink
to={this.getReferrer()}
icon="left"
Expand Down
1 change: 0 additions & 1 deletion app/containers/Settings/SettingsPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
.accountLabel {
display: inline-block;
vertical-align: bottom;
width: 226px;
}

.accountLabel * {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/Settings/SettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class SettingsPage extends FormComponent {
{this.props.vault.accounts.length > 0 &&
<ul className={style.accounts}>
{this.props.vault.accounts.map((account, index) =>
<li key={index}>{this.renderAccountRow(account)}</li>
<li className={style.list} key={index}>{this.renderAccountRow(account)}</li>
)}
</ul>
}
Expand Down
2 changes: 1 addition & 1 deletion app/reducers/VaultReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default function (vault = initialVault, action) {
case actions.REMOVE_KEY: {
const updatedVault = {
...vault,
keys: vault.keys.filter(k => k.type === 'auto' || k.publicKey !== action.publicKey)
keys: vault.keys.filter(k => k.type !== 'imported' || k.publicKey !== action.publicKey)
};

updatedVault.secret = VaultCrypt.save(updatedVault, action.password, action.callback);
Expand Down
4 changes: 2 additions & 2 deletions app/utils/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const name = ({ pageName, value, vault, editedId }) => {
)) {
return `Account named ${value} already exists`;
}
if (vault.length > config.itemNameMaxLength) {
return `Given name ${value} is too long.`;
if (value.length > config.itemNameMaxLength) {
return `Given name is too long (max ${config.itemNameMaxLength} characters).`;
}

if (!value) {
Expand Down
Loading

0 comments on commit 1ccc7a8

Please sign in to comment.