Skip to content

Commit

Permalink
Merge pull request #1273 from aeternity/release/v0.17.1
Browse files Browse the repository at this point in the history
Release 0.17.1
  • Loading branch information
CedrikNikita authored Nov 8, 2019
2 parents a4f76d2 + 329604e commit bce97bf
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 32 deletions.
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.17.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.17.1" 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 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aepp-base",
"version": "0.17.0",
"version": "0.17.1",
"author": "Sascha Hanse <[email protected]>",
"private": true,
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/mobile/TabBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="wrapper">
<ButtonPlain
v-if="!$globals.DISABLED_BROWSER"
:to="browserPath || { name: 'apps' }"
:to="browserPath"
>
<Grid />
<div>{{ $t('app.title') }}</div>
Expand All @@ -31,7 +31,7 @@
<AeIdenticon :address="activeAccount.address" />
</ButtonPlain>

<ButtonPlain :to="{ name: 'name-list-personal' }">
<ButtonPlain :to="nameListRouteParams">
<Contacts />
<div>{{ $t('name.title') }}</div>
</ButtonPlain>
Expand Down Expand Up @@ -73,6 +73,7 @@ export default {
...mapGetters({ activeAccount: 'accounts/active' }),
...mapState({
browserPath: ({ mobile }) => mobile.browserPath,
nameListRouteParams: ({ mobile }) => mobile.nameListRouteParams,
}),
},
methods: {
Expand Down
7 changes: 5 additions & 2 deletions src/pages/mobile/AuctionBid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="auction-bid"
:header-fill="activeColor"
right-button-icon-name="close"
:right-button-to="name ? { name: 'auction-details', params: { name } } : { name: 'name-list' }"
:right-button-to="nameListRouteParams"
v-bind="amountStep && {
leftButtonIconName: 'back',
leftButtonTo: backTo,
Expand Down Expand Up @@ -78,7 +78,7 @@
<script>
import { pick } from 'lodash-es';
import BigNumber from 'bignumber.js';
import { mapGetters } from 'vuex';
import { mapState, mapGetters } from 'vuex';
import { MAGNITUDE } from '../../lib/constants';
import blocksToRelativeTime from '../../filters/blocksToRelativeTime';
import MobilePage from '../../components/mobile/Page.vue';
Expand Down Expand Up @@ -114,6 +114,9 @@ export default {
};
},
computed: {
...mapState({
nameListRouteParams: ({ mobile }) => mobile.nameListRouteParams,
}),
...mapGetters('accounts', ['activeColor']),
backTo() {
if (!this.name && !this.expiration) return { name: 'name-list' };
Expand Down
14 changes: 5 additions & 9 deletions src/pages/mobile/AuctionDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
header-fill="light"
fill="neutral"
left-button-icon-name="back"
:left-button-to="previousRoute || { name: 'name-list', params: { view: 'ending-soonest' } }"
:left-button-to="nameListRouteParams"
:title="name"
>
<AeSpinner v-if="bids === null" />
Expand Down Expand Up @@ -43,6 +43,7 @@

<script>
import { pick } from 'lodash-es';
import { mapState } from 'vuex';
import blocksToRelativeTime from '../../filters/blocksToRelativeTime';
import MobilePage from '../../components/mobile/Page.vue';
import AeSpinner from '../../components/AeSpinner.vue';
Expand All @@ -64,9 +65,11 @@ export default {
data: () => ({
expiration: 0,
bids: null,
previousRoute: null,
}),
computed: {
...mapState({
nameListRouteParams: ({ mobile }) => mobile.nameListRouteParams,
}),
currentBid() {
if (!this.bids) return null;
return this.bids.reduce((a, b) => (a.nameFee.isGreaterThan(b.nameFee) ? a : b));
Expand Down Expand Up @@ -96,12 +99,5 @@ export default {
},
blocksToRelativeTime,
},
beforeRouteEnter(to, from, next) {
next((vm) => {
if (!['login', 'auction-bid', 'auction-bid-amount'].includes(from.name)) {
vm.previousRoute = from.path; // eslint-disable-line no-param-reassign
}
});
},
};
</script>
2 changes: 1 addition & 1 deletion src/pages/mobile/NameList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default {
text-align: center;
span, a {
padding: 0 rem(10px);
padding: 0 rem(5px);
}
a {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/mobile/NameNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<script>
import { mapGetters } from 'vuex';
import { MAX_AUCTION_NAME_LENGTH } from '../../lib/constants';
import { MAX_AUCTION_NAME_LENGTH, MAX_NAME_TTL } from '../../lib/constants';
import { handleUnknownError } from '../../lib/utils';
import { i18n } from '../../store/plugins/ui/languages';
import MobilePage from '../../components/mobile/Page.vue';
Expand Down Expand Up @@ -99,6 +99,7 @@ export default {
await this.$store.state.sdk.aensUpdate(
(await this.$store.state.sdk.api.getNameEntryByName(this.name)).id,
this.$store.getters['accounts/active'].address,
{ nameTtl: MAX_NAME_TTL },
);
}
this.$store.dispatch('modals/open', {
Expand Down
6 changes: 5 additions & 1 deletion src/store/modules/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export default {
state: {
followers: {},
stepFraction: null,
browserPath: '',
browserPath: { name: 'apps' },
nameListRouteParams: { name: 'name-list-personal' },
readSecurityCourses: [],
skipAddingToHomeScreen: false,
},
Expand Down Expand Up @@ -39,6 +40,9 @@ export default {
setBrowserPath(state, browserPath) {
state.browserPath = browserPath;
},
setNameListRoute(state, nameListRouteParams) {
state.nameListRouteParams = nameListRouteParams;
},
markSecurityCourseAsRead(state, courseName) {
if (state.readSecurityCourses.includes(courseName)) return;
state.readSecurityCourses.push(courseName);
Expand Down
11 changes: 0 additions & 11 deletions src/store/plugins/ui/browserPathTracker.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/store/plugins/ui/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import browserPathTracker from './browserPathTracker';
import pathTracker from './pathTracker';
import connectionStatusTracker from './connectionStatusTracker';
import desktopGuide from './desktopGuide';
import languages from './languages';
Expand All @@ -21,7 +21,7 @@ export default store => [
veeValidate,
...process.env.IS_MOBILE_DEVICE
? [
browserPathTracker,
pathTracker,
notificationOnRemoteConnection,
unlockWalletIfNotEncrypted,
]
Expand Down
15 changes: 15 additions & 0 deletions src/store/plugins/ui/pathTracker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default (store) => {
store.watch(
({ route }) => route,
({ name, fullPath, params } = {}) => {
if (['apps', 'app-browser'].includes(name)) {
store.commit('setBrowserPath', fullPath);
} else if (
['name-list', 'name-list-personal', 'name-list-character-length'].includes(name)
) {
store.commit('setNameListRoute', { name, params });
}
},
{ immediate: true },
);
};

0 comments on commit bce97bf

Please sign in to comment.