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

buh bye blockexplorer #1130

Merged
merged 14 commits into from
Aug 15, 2018
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed

* remove block explorer and monitor references @jbibla
* removed light theme option from preferences page @jbibla
* enabled staked balance on PageWallet in production @faboweb
* removed unused xmlhttprequest dependency @faboweb
Expand Down
5 changes: 0 additions & 5 deletions app/src/renderer/components/common/AppMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ menu.app-menu
exact @click.native="close"
title="Proposals"
v-if="config.devMode")
tm-list-item#app-menu__blocks(
to="/blocks"
exact
@click.native="close"
title="Blocks")
connected-network
user-pane
</template>
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/components/common/Page404.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template lang="pug">
tm-page(title='404 - Page Not Found')
tm-part(title='Try another page...')
tm-list-item(to='/' title='Balances')
tm-list-item(to='/' title='Wallet')
tm-list-item(to='/staking' title='Staking')
</template>

Expand Down
10 changes: 6 additions & 4 deletions app/src/renderer/components/common/PagePreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ tm-page(title="Preferences")
tm-part(title='Account')
tm-list-item(type="field" title="Switch account")
tm-btn(
id="signOut-btn"
icon='exit_to_app'
type='button'
@click.native="signOut"
Expand Down Expand Up @@ -146,8 +147,9 @@ export default {
}
</script>
<style lang="stylus">
.about-popup
text-align center
img
max-width 150px
.about-popup
text-align center

img
max-width 150px
</style>
10 changes: 9 additions & 1 deletion app/src/renderer/components/common/TmConnectedNetwork.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
| (change network)
.tm-connected-network__string#tm-connected-network__block
span.desktop-only Current Block:
router-link(to="/blocks" v-tooltip.top="'View Block'") {{ blockHeight }}
a(:href="explorerLink" v-tooltip.top="'View Block'") {{ blockHeight }}
i.material-icons exit_to_app
.tm-connected-network.tm-disconnected-network#tm-disconnected-network(v-else)
.tm-connected-network__icon: i.material-icons.fa-spin rotate_right
.tm-connected-network__string Connecting to network&hellip;
Expand Down Expand Up @@ -47,6 +48,9 @@ export default {
},
blockHeight() {
return "#" + num.prettyInt(this.lastHeader.height)
},
explorerLink() {
return "https://explorecosmos.network/blocks/" + this.lastHeader.height
}
},
data: () => ({
Expand Down Expand Up @@ -83,6 +87,10 @@ export default {
a, .chain-id
font-weight 500

.material-icons
padding-left 2px
font-size 14px

.tm-connected-network__icon
background var(--success-bc)
padding 0.5rem
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/components/common/TmToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
i.material-icons arrow_back
a.help(@click="enableModalHelp" v-tooltip.bottom="'Help'")
i.material-icons help_outline
a.sign-out(@click="signOut" v-tooltip.bottom.end="'Sign Out'")
a#signOut-btn(@click="signOut" v-tooltip.bottom.end="'Sign Out'")
i.material-icons exit_to_app
</template>

Expand Down
99 changes: 0 additions & 99 deletions app/src/renderer/components/monitor/PageBlock.vue

This file was deleted.

87 changes: 0 additions & 87 deletions app/src/renderer/components/monitor/PageBlocks.vue

This file was deleted.

15 changes: 1 addition & 14 deletions app/src/renderer/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ function r(type, pageName) {

let common = r.bind(null, "common")
let govern = r.bind(null, "govern")
let monitor = r.bind(null, "monitor")
let staking = r.bind(null, "staking")
let wallet = r.bind(null, "wallet")

Expand All @@ -30,18 +29,6 @@ export default function(store) {
component: govern("Proposal")
},

// MONITOR
{
path: "/blocks",
name: "blocks",
component: monitor("Blocks")
},
{
path: "/blocks/:block",
name: "block",
component: monitor("Block")
},

// STAKE
{
path: "/staking",
Expand Down Expand Up @@ -77,7 +64,7 @@ export default function(store) {

{
path: "/",
name: "balances",
name: "wallet",
component: wallet("Wallet")
},
{
Expand Down
13 changes: 1 addition & 12 deletions app/src/renderer/vuex/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,14 @@ export const delegation = state => state.delegation
export const committedDelegations = state => state.delegation.committedDelegates
export const delegates = state => state.delegates
export const shoppingCart = state => state.delegation.delegates
export const validators = state => state.validators.validators

// govern
export const proposals = state => state.proposals

// monitor
export const blockchain = state => state.blockchain
export const validators = state => state.validators.validators

// status
export const approvalRequired = state => state.node.approvalRequired
export const connected = state => state.node.connected
export const lastHeader = state => state.node.lastHeader
export const nodeIP = state => state.node.nodeIP
export const mockedConnector = state => state.node.mocked

//blockchain
export const blockTxInfo = state => {
return (
state.blockchain.block &&
state.blockchain.blockTxs[state.blockchain.block.header.height]
)
}
2 changes: 1 addition & 1 deletion archive/components/PageDelegatePower.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tm-page(icon="storage" :title="`${delegateId} Vote Power`")
</template>

<script>
import ChartVotePower from "monitor/ChartVotePower"
import ChartVotePower from "staking/ChartVotePower"
import ListItem from "common/NiListItem"
import ToolBar from "common/NiToolBar"
import { TmPage, TmPart } from "@tendermint/ui"
Expand Down
7 changes: 2 additions & 5 deletions test/e2e/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,8 @@ test("sign in", async function(t) {
t.test("sign out", async function(t) {
await refresh(app)
await login(app, "testkey")
await app.client.waitForExist(".material-icons=exit_to_app", 1000)
await app.client
.$(".material-icons=exit_to_app")
.$("..")
.click()
await app.client.waitForExist("#signOut-btn", 1000)
await app.client.$("#signOut-btn").click()

await app.client.waitForExist(".tm-session", 1000)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe("TmConnectedNetwork", () => {
.find("#tm-connected-network__block")
.text()
.trim()
).toBe("Current Block: #42")
).toContain("Current Block: #42")
})

it("has a certain style for mockedConnector", () => {
Expand All @@ -69,6 +69,12 @@ describe("TmConnectedNetwork", () => {
expect(wrapper.vm.blockHeight).toBe("#42")
})

it("has link to the external block explorer", () => {
expect(wrapper.vm.explorerLink).toBe(
"https://explorecosmos.network/blocks/42"
)
})

it("has a connecting state", async () => {
await store.commit("setConnected", false)
wrapper.update()
Expand Down
Loading