Skip to content

Commit

Permalink
Merge pull request #1160 from aeternity/release/v0.10.0
Browse files Browse the repository at this point in the history
Release 0.10.0
  • Loading branch information
davidyuk authored Sep 5, 2019
2 parents 3bb5dda + 192feba commit 6df9fdf
Show file tree
Hide file tree
Showing 35 changed files with 2,254 additions and 1,034 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VUE_APP_MIGRATION_STATUS_URL=https://api.backendless.com/CBD0589C-4114-2D15-FF41-6FC7F3EE8800/39EBBD6D-5A94-0739-FF27-B17F3957B700/data/TokenBurnings?pageSize=100&where=pubKey%20%3D%20%27ADDRESS%27
VUE_APP_MIGRATION_STATUS_URL=https://api.backendless.com/CBD0589C-4114-2D15-FF41-6FC7F3EE8800/39EBBD6D-5A94-0739-FF27-B17F3957B700/data/migrations?pageSize=100&where=pubKey%20%3D%20%27ADDRESS%27
VUE_APP_MIGRATION_PHASE=0
UNFINISHED_FEATURES=true
VUE_APP_REMOTE_CONNECTION_BACKEND_URL=https://stage-signaling.aepps.com
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.aeternity.base" version="0.9.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.aeternity.base" version="0.10.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Base æpp</name>
<author href="https://aeternity.com">
aeternity developers
Expand Down
2,524 changes: 1,641 additions & 883 deletions package-lock.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aepp-base",
"version": "0.9.0",
"version": "0.10.0",
"author": "Sascha Hanse <[email protected]>",
"private": true,
"scripts": {
Expand All @@ -21,53 +21,53 @@
"i18n:report": "vue-i18n-extract report --vueFiles './src/**/*.?(js|vue)' --languageFiles './src/locales/**/*.json'"
},
"dependencies": {
"@aeternity/aepp-sdk": "^4.5.1",
"@aeternity/aepp-sdk": "^4.6.0",
"@aeternity/bip39": "^0.1.0",
"@aeternity/hd-wallet": "^0.2.0",
"@aeternity/ledger-app-api": "0.1.0",
"@download/blockies": "^1.0.3",
"@ledgerhq/hw-transport-u2f": "^4.66.0",
"@ledgerhq/hw-transport-u2f": "^4.68.4",
"@zxing/library": "^0.15.1",
"bignumber.js": "^9.0.0",
"bluebird": "^3.5.5",
"copy-to-clipboard": "^3.2.0",
"emoji-datasource-apple": "^4.1.0",
"focus-visible": "^5.0.2",
"fuse.js": "^3.4.5",
"lodash-es": "^4.17.14",
"lodash-es": "^4.17.15",
"normalize.css": "^8.0.1",
"register-service-worker": "^1.6.2",
"rxjs": "^6.5.2",
"rxjs-etc": "^9.6.2",
"socket.io-client": "^2.2.0",
"vee-validate": "^2.2.13",
"vee-validate": "^2.2.15",
"vue": "^2.6.10",
"vue-clickaway": "^2.2.2",
"vue-focus": "^2.1.0",
"vue-i18n": "^8.12.0",
"vue-i18n": "^8.14.0",
"vue-matomo": "^3.9.1-2",
"vue-router": "^3.0.7",
"vue-router": "^3.1.2",
"vue-rx": "^6.2.0",
"vuex": "^3.1.1",
"vuex-persistedstate": "^2.5.4",
"vuex-router-sync": "^5.0.0"
},
"devDependencies": {
"@aeternity/vue-i18n-extract": "^0.1.0",
"@storybook/addon-actions": "^5.1.9",
"@storybook/addon-backgrounds": "^5.1.9",
"@storybook/addon-links": "^5.1.9",
"@storybook/addon-notes": "^5.1.9",
"@vue/cli-plugin-babel": "^3.9.2",
"@vue/cli-plugin-e2e-cypress": "^3.9.0",
"@vue/cli-plugin-eslint": "^3.9.2",
"@vue/cli-plugin-pwa": "^3.9.0",
"@vue/cli-plugin-unit-jest": "^3.9.0",
"@vue/cli-service": "^3.9.2",
"@storybook/addon-actions": "^5.1.11",
"@storybook/addon-backgrounds": "^5.1.11",
"@storybook/addon-links": "^5.1.11",
"@storybook/addon-notes": "^5.1.11",
"@vue/cli-plugin-babel": "^3.11.0",
"@vue/cli-plugin-e2e-cypress": "^3.11.0",
"@vue/cli-plugin-eslint": "^3.11.0",
"@vue/cli-plugin-pwa": "^3.11.0",
"@vue/cli-plugin-unit-jest": "^3.11.0",
"@vue/cli-service": "^3.11.0",
"@vue/eslint-config-airbnb": "^4.0.1",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.2",
"babel-eslint": "^10.0.3",
"babel-jest": "^23.6.0",
"cordova": "^9.0.0",
"cordova-android": "^8.0.0",
Expand All @@ -76,9 +76,9 @@
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.3",
"eslint-plugin-vue-i18n": "^0.1.1",
"jest-canvas-mock": "^2.1.0",
"jest-canvas-mock": "^2.1.1",
"node-sass": "^4.12.0",
"sass-loader": "^7.1.0",
"sass-loader": "^7.3.1",
"serve": "^11.1.0",
"sharp": "^0.22.1",
"svg-url-loader": "^3.0.0",
Expand Down
7 changes: 7 additions & 0 deletions src/assets/icons/aepps/graffiti-aepp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 1 addition & 8 deletions src/components/AeInputAccount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<AeTextareaFormatted
v-remove-spaces-on-copy
:value="value"
:placeholder="$t('transfer.send.to.address-or-name')"
:placeholder="$t('transfer.send.to.address')"
class="ae-input-address"
rows="3"
monospace
Expand Down Expand Up @@ -65,8 +65,6 @@
</template>

<script>
import { Crypto } from '@aeternity/aepp-sdk/es';
import { isAensName } from '../lib/utils';
import removeSpacesOnCopy from '../directives/removeSpacesOnCopy';
import AeTextareaFormatted from './AeTextareaFormatted.vue';
import AeIdenticon from './AeIdenticon.vue';
Expand Down Expand Up @@ -124,15 +122,10 @@ export default {
return `${ADDRESS_PREFIX} ${res}`;
},
formatDisplayValue(value) {
const name = Crypto.isAddressValid(value) && this.$store.getters['names/get'](value, false);
if (name) return name;
if (value.startsWith(ADDRESS_PREFIX)) return this.formatAddress(value);
return value;
},
formatEmitValue(value) {
if (isAensName(value)) {
return this.$store.dispatch('names/getAddressByName', value).catch(() => value);
}
if (FORMATTED_ADDRESS_REGEXP.test(value)) return value.replace(/ /g, '');
return value;
},
Expand Down
89 changes: 59 additions & 30 deletions src/components/AeInputAmount.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,32 @@
:slot="slot"
:name="slot"
/>
<input
:id="id"
v-focus.lazy="autofocus"
<div
slot-scope="{ setFocus, id }"
placeholder="0.0"
autocomplete="off"
:value="value"
v-bind="$attrs"
type="number"
inputmode="decimal"
step="any"
@focus="setFocus(true)"
@blur="setFocus(false)"
@input="$emit('input', $event.target.value)"
class="unit-amount"
:class="{ 'unit-reverse': unitReverse }"
>
<input
:id="id"
v-focus.lazy="autofocus"
placeholder="0.0"
autocomplete="off"
:value="value"
v-bind="$attrs"
type="number"
inputmode="decimal"
step="any"
@focus="setFocus(true)"
@blur="setFocus(false)"
@input="$emit('input', $event.target.value)"
>
<label
:for="id"
@click="$emit('unit-click')"
>
{{ unit }}
</label>
</div>
</AeInputWrapper>
</template>

Expand All @@ -36,6 +47,8 @@ export default {
props: {
value: { type: [String, Number], default: '' },
autofocus: Boolean,
unit: { type: String, default: '' },
unitReverse: Boolean,
},
};
</script>
Expand All @@ -44,26 +57,42 @@ export default {
@import '../styles/variables/colors.scss';
@import '../styles/placeholders/typography.scss';
.ae-input-amount input {
display: block;
width: 100%;
margin: 0 0 rem(16px) 0;
padding: 0;
background: transparent;
border: none;
outline: none;
-moz-appearance: textfield;
@extend %face-mono-xl;
text-align: center;
font-weight: 300;
color: $color-neutral-negative-3;
.ae-input-amount .unit-amount {
display: flex;
align-items: center;
&::-webkit-inner-spin-button {
-webkit-appearance: none;
&.unit-reverse {
flex-direction: row-reverse;
}
&::placeholder {
color: $color-neutral;
input,
label {
@extend %face-mono-xl;
margin: 0 0 rem(16px) 0;
font-weight: 300;
}
input {
width: 100%;
padding: 0;
background: transparent;
border: none;
outline: none;
-moz-appearance: textfield;
text-align: center;
color: $color-neutral-negative-3;
&::-webkit-inner-spin-button {
-webkit-appearance: none;
}
&::placeholder {
color: $color-neutral;
}
&::-webkit-input-placeholder {
line-height: normal;
}
}
}
</style>
10 changes: 4 additions & 6 deletions src/components/AeInputAmountCurrency.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
:footer="footer || (max ? '' : $t('transfer.send.amount.fee'))"
:footer-right="footerRight || (footer || max ? '' : minSpendTxFee)"
:value="internalValue"
:unit="symbol"
:unit-reverse="!isCrypto"
v-bind="$attrs"
v-on="{ ...$listeners, input }"
@unit-click="swapCurrencies"
>
<span
slot="header-right"
@click="swapCurrencies"
>
{{ symbol }}
</span>
<AeToolbarButton
v-if="max"
slot="footer-right"
Expand Down Expand Up @@ -50,6 +47,7 @@ export default {
computed: mapState('currencies', {
swapped: 'swapped',
symbol: ({ swapped }, { active: { symbol } }) => (swapped ? symbol : 'AE'),
isCrypto: ({ swapped }, { active: { isCrypto } }) => (swapped ? isCrypto : true),
}),
subscriptions() {
return pick(this.$store.state.observables, ['rate']);
Expand Down
4 changes: 2 additions & 2 deletions src/components/ListItemSettingsReset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export default {
await this.$store.dispatch('modals/open', {
name: 'confirm',
text: process.env.IS_MOBILE_DEVICE
? this.$t('settings.reset.message')
: this.$t('settings.reset.message-desktop'),
? this.$t('settings.reset.confirm')
: this.$t('settings.reset.confirm-desktop'),
primaryButtonText: this.$t('settings.reset.button'),
});
this.$store.dispatch('reset');
Expand Down
11 changes: 9 additions & 2 deletions src/components/NotificationSpendSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,15 @@ export default {

<style lang="scss" scoped>
@import '../styles/variables/colors.scss';
@import './copied.scss';
.notification-spend-success .list-item-circle {
background-color: $color-alternative;
.notification-spend-success {
.list-item-circle {
background-color: $color-alternative;
}
.ae-button.v-copied {
@extend %copied;
}
}
</style>
5 changes: 5 additions & 0 deletions src/components/desktop/ModalSpendSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default {

<style lang="scss" scoped>
@import '../../styles/placeholders/typography.scss';
@import '../copied.scss';
.modal-spend-success {
text-align: center;
Expand All @@ -73,6 +74,10 @@ export default {
max-width: rem(310px);
margin-left: auto;
margin-right: auto;
&.v-copied {
@extend %copied;
}
}
}
</style>
1 change: 1 addition & 0 deletions src/components/mobile/ConfirmTransactionSignModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export default {
[TX_TYPE.namePreClaim]: this.$t('modal.confirm-transaction-sign.name-pre-claim'),
[TX_TYPE.nameClaim]: this.$t('modal.confirm-transaction-sign.name-claim'),
[TX_TYPE.nameUpdate]: this.$t('modal.confirm-transaction-sign.name-update'),
[TX_TYPE.nameTransfer]: this.$t('modal.confirm-transaction-sign.name-transfer'),
}[this.txType] || '';
},
maxFee() {
Expand Down
9 changes: 8 additions & 1 deletion src/lib/appsRegistry.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import blockchainExplorerIcon from '../assets/icons/aepps/blockchain-explorer.svg';
import tokenMigrationIcon from '../assets/icons/aepps/token-migration.jpg';
import graffitiAeppIcon from '../assets/icons/aepps/graffiti-aepp.svg';

export { default as DEFAULT_ICON } from '../assets/icons/aepps/default.svg';

export const aeternityApps = [{
const showGraffitiApp = new Date('2019-09-04T22:00:00.000Z').getTime() <= Date.now();

export const aeternityApps = [...showGraffitiApp ? [{
name: 'Graffiti Aepp',
path: 'graffiti.aeternity.com',
icon: graffitiAeppIcon,
}] : [], {
name: 'æternity Voting',
path: 'aeternity.com/aepp-hybrid-voting',
icon: blockchainExplorerIcon,
Expand Down
6 changes: 6 additions & 0 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ export const isNotFoundError = error => error.isAxiosError

export const isAccountNotFoundError = error => isNotFoundError(error)
&& get(error, 'response.data.reason') === 'Account not found';

export class ConvertibleToString {
constructor(toString) {
this.toString = toString;
}
}
Loading

0 comments on commit 6df9fdf

Please sign in to comment.