Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jordan/180 back button #450

Merged
merged 11 commits into from
Feb 9, 2018
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [0.4.0] - 2018-02-01
### Added
* Added button styles for Success, Warning, and Danger states. @nylira
* Added support for image icons. @faboweb
* Added support for image icons. @faboweb

### Changed
* Improved primary button style. @nylira
* Fixed the cut-off text bug in buttons. @nylira
* Improves the `hover-bg` app variable color. @nylira
* Improves the `hover-bg` app variable color. @nylira

## [0.4.1] - 2018-02-01
###Fixed
* Fix for Windows build crashing on startup. @faboweb

## [0.4.2] - 2018-02-05
###Added
* Added back button to every page. @jolesbi

###Changed
* Updated transaction history to be more clear and descriptive. @jolesbi
* Improved delegate profile page to accommodate candidates and validators. @jolesbi
2 changes: 1 addition & 1 deletion app/src/renderer/components/common/AppMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ menu.app-menu
.app-menu-main
list-item(to="/" exact @click.native="close" title="Balances")
list-item(to="/wallet/transactions" exact @click.native="close" title="Transactions")
list-item(to="/staking" exact @click.native="close" title="Delegates")
list-item(to="/staking" exact replace @click.native="close" title="Delegates")
list-item(to="/validators" exact @click.native="close" title="Validators" v-bind:class="{ 'active': isValidatorPage }" v-if="config.devMode")
list-item(to="/proposals" exact @click.native="close" title="Proposals" v-if="config.devMode")
list-item(to="/blocks" exact @click.native="close" title="Blocks")
Expand Down
7 changes: 6 additions & 1 deletion app/src/renderer/components/common/NiToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
.ni-tool-bar
.ni-tool-bar-container
.main: slot
a.help(@click="enableModalHelp"): i.material-icons help_outline
a.back(@click="$router.go(-1)")
i.material-icons arrow_back
.label Back
a.help(@click="enableModalHelp")
i.material-icons help_outline
.label Help
</template>

<script>
Expand Down
3 changes: 0 additions & 3 deletions app/src/renderer/components/monitor/PageBlock.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template lang="pug">
page(:title="pageBlockTitle" v-if="block.header")
div(slot="menu"): tool-bar
router-link(to="/blocks")
i.material-icons arrow_back
.label Back
a(:href="blockUrl" target="_blank")
i.material-icons code
.label JSON
Expand Down
4 changes: 0 additions & 4 deletions app/src/renderer/components/staking/PageBond.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template lang="pug">
page.page-bond(title="Bond Atoms")
div(slot="menu"): tool-bar
router-link(to='/staking')
i.material-icons arrow_back
.label Back

part(:title="'Start bonding your '+ totalAtoms + ' ATOM'"): form-struct(
:submit="onSubmit")
.bond-group(:class="bondGroupClass(unbondedAtomsDelta)")
Expand Down
4 changes: 0 additions & 4 deletions app/src/renderer/components/wallet/PageSend.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<template lang='pug'>
page(title='Send')
div(slot="menu"): tool-bar
router-link(:to="{ name: 'balances' }")
i.material-icons arrow_back
.label Back

form-struct(:submit="onSubmit")
part(title='Denomination Options')
form-group(:error='$v.fields.denom.$error'
Expand Down
22 changes: 22 additions & 0 deletions test/unit/specs/components/common/NiToolBar.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import setup from '../../../helpers/vuex-setup'
import NiToolBar from 'common/NiToolBar'

describe('NiToolBar', () => {
let wrapper, store, instance
let {mount} = setup()

beforeEach(() => {
instance = mount(NiToolBar)
wrapper = instance.wrapper
store = instance.store
})

it('has the expected html structure', () => {
expect(wrapper.$el).toMatchSnapshot()
})

it('sets the helper modal', () => {
wrapper.vm.enableModalHelp()
expect(store.state.config.modals.help.active).toBe(true)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`NiToolBar has the expected html structure 1`] = `undefined`;
12 changes: 12 additions & 0 deletions test/unit/specs/components/monitor/PageBlock.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,16 @@ describe('PageBlock', () => {
it('should dispatch getBlock when mounted', () => {
expect(store.dispatch).toHaveBeenCalledWith('getBlock', wrapper.vm.$route.params.block)
})

it('should return an empty object if there is no block', () => {
let {wrapper} = mount(PageBlock, {
getters: {
blockchain: () => ({
block: {}
})
}
})

expect(wrapper.vm.block).toEqual({})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ exports[`PageBlock has the expected html structure 1`] = `
<div class=\\"ni-tool-bar\\">
<div class=\\"ni-tool-bar-container\\">
<div class=\\"main\\">
<a href=\\"#/blocks\\" class=\\"\\"><i class=\\"material-icons\\">arrow_back</i>
<a href=\\"https://the-url\\" target=\\"_blank\\"><i class=\\"material-icons\\">code</i>
<div class=\\"label\\">
Back
JSON
</div>
</a><a href=\\"https://the-url\\" target=\\"_blank\\"><i class=\\"material-icons\\">code</i>
<div class=\\"label\\">
JSON
</div>
</a><a href=\\"#/blocks/9\\" class=\\"\\"><i class=\\"material-icons\\">chevron_left</i>
<div class=\\"label\\">
Previous Block
Expand All @@ -38,7 +34,15 @@ exports[`PageBlock has the expected html structure 1`] = `
</div>
</a>
</div>
<a class=\\"help\\"><i class=\\"material-icons\\">help_outline</i></a>
<a class=\\"back\\"><i class=\\"material-icons\\">arrow_back</i>
<div class=\\"label\\">
Back
</div>
</a><a class=\\"help\\"><i class=\\"material-icons\\">help_outline</i>
<div class=\\"label\\">
Help
</div>
</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ exports[`PageBlocks has the expected html structure 1`] = `
</div>
</a>
</div>
<a class=\\"help\\"><i class=\\"material-icons\\">help_outline</i></a>
<a class=\\"back\\"><i class=\\"material-icons\\">arrow_back</i>
<div class=\\"label\\">
Back
</div>
</a><a class=\\"help\\"><i class=\\"material-icons\\">help_outline</i>
<div class=\\"label\\">
Help
</div>
</a>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,21 @@ exports[`PageBond has the expected html structure 1`] = `
>
<div
class="main"
/>
<a
class="back"
>
<a
class="router-link-exact-active router-link-active"
href="#/staking"
<i
class="material-icons"
>
<i
class="material-icons"
>
arrow_back
</i>
<div
class="label"
>
Back
</div>
</a>
</div>
arrow_back
</i>
<div
class="label"
>
Back
</div>
</a>
<a
class="help"
>
Expand All @@ -66,6 +64,11 @@ exports[`PageBond has the expected html structure 1`] = `
>
help_outline
</i>
<div
class="label"
>
Help
</div>
</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ exports[`PageDelegate has the expected html structure 1`] = `
</div>
</a>
</div>
<a
class="back"
>
<i
class="material-icons"
>
arrow_back
</i>
<div
class="label"
>
Back
</div>
</a>
<a
class="help"
>
Expand All @@ -66,6 +80,11 @@ exports[`PageDelegate has the expected html structure 1`] = `
>
help_outline
</i>
<div
class="label"
>
Help
</div>
</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ exports[`PageDelegates has the expected html structure 1`] = `
</div>
</a>
</div>
<a class=\\"help\\"><i class=\\"material-icons\\">help_outline</i></a>
<a class=\\"back\\"><i class=\\"material-icons\\">arrow_back</i>
<div class=\\"label\\">
Back
</div>
</a><a class=\\"help\\"><i class=\\"material-icons\\">help_outline</i>
<div class=\\"label\\">
Help
</div>
</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -187,6 +195,20 @@ exports[`PageDelegates should filter the delegates 1`] = `
</div>
</a>
</div>
<a
class="back"
>
<i
class="material-icons"
>
arrow_back
</i>
<div
class="label"
>
Back
</div>
</a>
<a
class="help"
>
Expand All @@ -195,6 +217,11 @@ exports[`PageDelegates should filter the delegates 1`] = `
>
help_outline
</i>
<div
class="label"
>
Help
</div>
</a>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ exports[`PageBalances has the expected html structure 1`] = `
</div>
</a>
</div>
<a
class="back"
>
<i
class="material-icons"
>
arrow_back
</i>
<div
class="label"
>
Back
</div>
</a>
<a
class="help"
>
Expand All @@ -75,6 +89,11 @@ exports[`PageBalances has the expected html structure 1`] = `
>
help_outline
</i>
<div
class="label"
>
Help
</div>
</a>
</div>
</div>
Expand Down Expand Up @@ -371,6 +390,20 @@ exports[`PageBalances should filter the balances 1`] = `
</div>
</a>
</div>
<a
class="back"
>
<i
class="material-icons"
>
arrow_back
</i>
<div
class="label"
>
Back
</div>
</a>
<a
class="help"
>
Expand All @@ -379,6 +412,11 @@ exports[`PageBalances should filter the balances 1`] = `
>
help_outline
</i>
<div
class="label"
>
Help
</div>
</a>
</div>
</div>
Expand Down
Loading