From d4a8b91e06178be0b27f6fdba025d4dcfef350f1 Mon Sep 17 00:00:00 2001 From: Billy Rennekamp Date: Wed, 13 Jun 2018 16:45:30 +0200 Subject: [PATCH 01/31] replace TmBarDiscrete --- .../components/common/NiBarDiscrete.vue | 80 ------------------- .../components/common/NiOnboarding.vue | 6 +- package.json | 1 + .../components/common/NiBarDiscrete.spec.js | 14 ---- yarn.lock | 8 +- 5 files changed, 11 insertions(+), 98 deletions(-) delete mode 100644 app/src/renderer/components/common/NiBarDiscrete.vue delete mode 100644 test/unit/specs/components/common/NiBarDiscrete.spec.js diff --git a/app/src/renderer/components/common/NiBarDiscrete.vue b/app/src/renderer/components/common/NiBarDiscrete.vue deleted file mode 100644 index d6a509e5e5..0000000000 --- a/app/src/renderer/components/common/NiBarDiscrete.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - diff --git a/app/src/renderer/components/common/NiOnboarding.vue b/app/src/renderer/components/common/NiOnboarding.vue index 23513ce6e8..0672e5640a 100644 --- a/app/src/renderer/components/common/NiOnboarding.vue +++ b/app/src/renderer/components/common/NiOnboarding.vue @@ -6,7 +6,7 @@ .ni-session-main .ni-session-label {{ activeValue }} img(:src="activeImg") - bar-discrete(:nodes="nodes" :click-fn="go" :active="activeKey") + tm-bar-discrete(:nodes="nodes" :click-fn="go" :active="activeKey") .ni-session-footer(v-if="activeKey === nodes.length - 1") btn(value="Restart" @click.native="go(0)" icon="settings_backup_restore") btn(value="Finish" @click.native="finish" color="primary" @@ -21,10 +21,10 @@ import { mapGetters } from "vuex" import PerfectScrollbar from "perfect-scrollbar" import Btn from "@nylira/vue-button" -import BarDiscrete from "common/NiBarDiscrete" +import { TmBarDiscrete } from "@tendermint/ui" export default { name: "ni-onboarding", - components: { Btn, BarDiscrete }, + components: { Btn, TmBarDiscrete }, computed: { ...mapGetters(["onboarding"]), activeKey() { diff --git a/package.json b/package.json index 1f89a13b7d..21659a3b19 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "@nylira/vue-button": "4.4.3", "@nylira/vue-field": "1.5.0", "@nylira/vue-notifications": "1.5.0", + "@tendermint/ui": "tendermint/ui", "@vue/test-utils": "1.0.0-beta.11", "autosize": "4.0.2", "axios": "0.18.0", diff --git a/test/unit/specs/components/common/NiBarDiscrete.spec.js b/test/unit/specs/components/common/NiBarDiscrete.spec.js deleted file mode 100644 index 0176eac58f..0000000000 --- a/test/unit/specs/components/common/NiBarDiscrete.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -import { mount } from "@vue/test-utils" -import htmlBeautify from "html-beautify" -import NiBarDiscrete from "common/NiBarDiscrete" - -describe("NiBarDiscrete", () => { - let wrapper - beforeEach(() => { - wrapper = mount(NiBarDiscrete) - }) - - it("has the expected html structure", () => { - expect(htmlBeautify(wrapper.html())).toMatchSnapshot() - }) -}) diff --git a/yarn.lock b/yarn.lock index 6e3fc18bd3..fd7f6ba90e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,6 +28,12 @@ version "0.7.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" +"@tendermint/ui@tendermint/ui": + version "0.1.0" + resolved "https://codeload.github.com/tendermint/ui/tar.gz/767e67b1497a009c819f4a5a74c6c0405f2359f3" + dependencies: + vue "^2.5.16" + "@types/babel-types@*", "@types/babel-types@^7.0.0": version "7.0.1" resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.1.tgz#1405e5396968c4302994b0161ce405b72b874257" @@ -8894,7 +8900,7 @@ vue-template-es2015-compiler@1.6.0, vue-template-es2015-compiler@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18" -vue@2.5.16: +vue@2.5.16, vue@^2.5.16: version "2.5.16" resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.16.tgz#07edb75e8412aaeed871ebafa99f4672584a0085" From 92ee58ea040e96b400ee7b58c6b41e28bacb5886 Mon Sep 17 00:00:00 2001 From: Billy Rennekamp Date: Wed, 13 Jun 2018 19:34:03 +0200 Subject: [PATCH 02/31] replace vue-button and list-item --- .../renderer/components/common/AppMenu.vue | 14 +- .../renderer/components/common/NiBtnCopy.vue | 6 +- .../components/common/NiBtnReceive.vue | 4 +- .../components/common/NiConnectedNetwork.vue | 2 - .../renderer/components/common/NiListItem.vue | 287 ------------------ .../components/common/NiModalError.vue | 8 +- .../components/common/NiModalHelp.vue | 10 +- .../components/common/NiModalLCDApproval.vue | 8 +- .../components/common/NiModalReceive.vue | 4 - .../components/common/NiModalSearch.vue | 10 +- .../components/common/NiOnboarding.vue | 13 +- .../common/NiSessionAccountDelete.vue | 6 +- .../components/common/NiSessionImport.vue | 6 +- .../components/common/NiSessionSignIn.vue | 6 +- .../components/common/NiSessionSignUp.vue | 6 +- .../components/common/NiSessionWelcome.vue | 2 - .../renderer/components/common/NiUserPane.vue | 6 +- .../renderer/components/common/Page404.vue | 8 +- .../components/common/PagePreferences.vue | 21 +- .../components/govern/PageProposal.vue | 8 +- .../components/govern/PageProposalsNew.vue | 14 +- .../govern/PageProposalsNewAdjust.vue | 6 +- .../govern/PageProposalsNewAmend.vue | 6 +- .../govern/PageProposalsNewCreate.vue | 6 +- .../govern/PageProposalsNewText.vue | 6 +- .../govern/PageProposalsNewUpgrade.vue | 6 +- .../renderer/components/monitor/PageBlock.vue | 32 +- .../components/monitor/PageBlocks.vue | 14 +- .../components/staking/LiDelegate.vue | 2 - .../renderer/components/staking/PageBond.vue | 8 +- .../components/staking/PageDelegate.vue | 16 +- .../components/staking/PageStaking.vue | 8 +- .../renderer/components/wallet/PageSend.vue | 8 +- .../renderer/components/wallet/PageWallet.vue | 1 - package.json | 1 - .../components/common/NiListItem.spec.js | 115 ------- yarn.lock | 4 - 37 files changed, 131 insertions(+), 557 deletions(-) delete mode 100644 app/src/renderer/components/common/NiListItem.vue delete mode 100644 test/unit/specs/components/common/NiListItem.spec.js diff --git a/app/src/renderer/components/common/AppMenu.vue b/app/src/renderer/components/common/AppMenu.vue index bdd836f212..aa74a7e622 100644 --- a/app/src/renderer/components/common/AppMenu.vue +++ b/app/src/renderer/components/common/AppMenu.vue @@ -1,29 +1,29 @@