Skip to content

Commit

Permalink
Merge pull request #315 from cosmos/fabo/47-one-module-source
Browse files Browse the repository at this point in the history
Only one package src
  • Loading branch information
jbibla authored Jan 8, 2018
2 parents 979486d + b24d133 commit 4c770fe
Show file tree
Hide file tree
Showing 24 changed files with 1,167 additions and 2,676 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ jobs:
- v1-dependencies-root-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-root-
- restore_cache:
keys:
- v1-dependencies-app-{{ checksum "app/package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-app-

- run: yarn

Expand All @@ -35,11 +30,6 @@ jobs:
- yarn.lock
- node_modules
key: v1-dependencies-root-{{ checksum "package.json" }}
- save_cache:
paths:
- app/yarn.lock
- app/node_modules
key: v1-dependencies-app-{{ checksum "app/package.json" }}

- run: yarn lint
- run: yarn run test
Expand Down
29 changes: 0 additions & 29 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,9 @@
"author": "All In Bits, Inc <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"basecoin": "^2.3.1",
"casual": "^1.5.17",
"clipboard": "^1.6.0",
"cosmos-delegation-game": "^0.1.0",
"cosmos-sdk": "^1.5.1",
"event-to-promise": "^0.8.0",
"express": "^4.16.2",
"express-http-proxy": "^1.1.0",
"fs-extra": "^4.0.0",
"js-weave": "^1.3.0",
"levelup": "^1.3.8",
"memdown": "^1.2.4",
"mkdirp": "^0.5.1",
"old": "^0.2.0",
"semver": "^5.4.1",
"tendermint": "^2.0.3",
"tendermint-crypto": "github:mappum/js-crypto",
"toml": "^2.3.3",
"user-home": "^2.0.0",
"vue": "2.5.9",
"vue-electron": "^1.0.6",
"vue-resource": "^1.0.3",
"vue-router": "^2.1.2",
"vuex": "^2.1.1",
"watt": "^3.3.0"
},
"devDependencies": {
"babel-runtime": "^6.26.0",
"create-hash": "^1.1.3",
"prebuild-install": "^2.1.2"
},
"optionalDependencies": {
"electron-squirrel-startup": "^1.0.0"
}
}
8 changes: 3 additions & 5 deletions app/src/renderer/components/common/NiBtnCopy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
btn.btn-copy(
icon="content_copy"
@click.native="click"
:data-clipboard-text="value"
value="Copy")
</template>

<script>
import Clipboard from 'clipboard'
import {clipboard} from 'electron'
import Btn from '@nylira/vue-button'
export default {
components: {
Expand All @@ -29,15 +28,14 @@ export default {
return value
},
click () {
clipboard.writeText(this.value)
this.$store.commit('notify', {
title: this.notifyTitle,
body: this.notifyBody
})
}
},
mounted () {
this.clipboard = new Clipboard('.btn-copy')
},
props: ['value', 'title', 'body']
}
</script>
6 changes: 4 additions & 2 deletions app/src/renderer/components/common/NiModalSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export default {
watch: {
open (open) {
if (open) {
let el = this.$el.querySelector('.ni-field')
el.select()
setTimeout(() => {
let el = this.$el.querySelector('.ni-field')
el.select()
})
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/components/govern/PageProposal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ page(:title='proposal.title')
a(@click="proposalIsSpam(proposal.id)"): i.material-icons error

part(v-if="proposal.type === 'text'")
div(slot='title') Proposed by #[router-link(:to="{ name: 'delegator', params: { delegator: proposal.validatorId }}") {{ proposal.validatorId }}]
div(slot='title') Proposed by #[router-link(:to="{ name: 'delegate', params: { delegate: proposal.validatorId }}") {{ proposal.validatorId }}]
text-block(:content="proposal.data.text")

part(title='Time to vote: 13D 23H 27M'): form-struct(:submit='confirmVote')
Expand Down
11 changes: 7 additions & 4 deletions app/src/renderer/components/monitor/PageBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ page(:title="`Block ${block.header.height}`")

<script>
import { mapGetters } from 'vuex'
import request from 'superagent'
import axios from 'axios'
import ToolBar from 'common/NiToolBar'
import ListItem from 'common/NiListItem'
import Part from 'common/NiPart'
Expand Down Expand Up @@ -140,9 +140,12 @@ export default {
methods: {
fetchBlock () {
this.blockUrl = `https://${this.blockchain.blockchainName}-node0.testnets.interblock.io/block?height=${this.$route.params.block}`
request.get(this.blockUrl).end((err, res) => {
if (err) console.log('err', err)
let blockData = res.body.result
axios(this.blockUrl).then(({data}) => {
if (data.err) {
console.log('err', data.err)
return
}
let blockData = data.result
this.block_meta = blockData.block_meta
this.block = blockData.block
})
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/components/staking/PageDelegates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ page(:title='pageTitle')
data-empty-search(v-else-if="filteredDelegates.length === 0")
template(v-else)
panel-sort(:sort='sort')
li-delegate( v-for='i in filteredDelegates' key='i.id' :delegate='i')
li-delegate( v-for='i in filteredDelegates' :key='i.id' :delegate='i')
</template>

<script>
Expand Down
14 changes: 6 additions & 8 deletions app/src/renderer/components/staking/PanelSort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
</template>

<script>
// TODO do we need jquery for one usage?
import $ from 'jquery'
export default {
name: 'panel-sort',
methods: {
orderBy (property, event) {
let sortBys = $(this.$el).find('.sort-by')
$(sortBys).removeClass('active desc asc')
let el = $(event.target).parent()
let sortBys = this.$el.querySelectorAll('.sort-by')
sortBys.forEach(el => el.classList.remove('active', 'desc', 'asc'))
let el = event.target.parentElement
if (this.sort.property === property) {
if (this.sort.order === 'asc') {
Expand All @@ -27,11 +25,11 @@ export default {
this.sort.property = property
}
if (this.sort.order === 'asc') {
$(el).addClass('asc')
el.classList.add('asc')
} else {
$(el).addClass('desc')
el.classList.add('desc')
}
$(el).addClass('active')
el.classList.add('active')
}
},
props: ['sort']
Expand Down
3 changes: 1 addition & 2 deletions app/src/renderer/routes.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
function r (type, pageName) { return require(`./components/${type}/Page${pageName}`) }
function r (type, pageName) { return require(`./components/${type}/Page${pageName}`).default }

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')
// let basecoin = r.bind(null, 'basecoin')

export default [
// GOVERN
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/vuex/modules/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import noScroll from 'no-scroll'

export default ({ commit, basecoin }) => {
export default ({ commit }) => {
const state = {
activeMenu: '',
desktop: false,
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/vuex/modules/filters.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default ({ commit, basecoin }) => {
export default ({ commit }) => {
const state = {
balances: {
search: {
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/vuex/modules/proposals.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import data from '../json/proposals.json'

export default ({ commit, basecoin }) => {
export default ({ commit }) => {
const state = data
const mutations = {
ADD_PROPOSAL (state, proposal) {
Expand Down
Loading

0 comments on commit 4c770fe

Please sign in to comment.