From e0a2085b832d228fe17a4384a5055e6f20877d17 Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Thu, 1 Feb 2018 13:42:31 +0800 Subject: [PATCH 1/4] init --- app/src/renderer/components/common/NiListItem.vue | 4 ++-- app/src/renderer/styles/app.styl | 9 --------- app/src/renderer/styles/variables.styl | 7 +++---- package.json | 2 +- yarn.lock | 6 +++--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/app/src/renderer/components/common/NiListItem.vue b/app/src/renderer/components/common/NiListItem.vue index bac3df8009..c0dce06089 100644 --- a/app/src/renderer/components/common/NiListItem.vue +++ b/app/src/renderer/components/common/NiListItem.vue @@ -34,7 +34,7 @@ transition(name="proposal") router-link.ni-li.ni-li-link(v-else-if="btn && to" :to="to"): .ni-li-container +ni-li-thumb +ni-li-dl - btn(:value="btn" icon="chevron_right" icon-pos="right").btn__primary + btn(:value="btn" icon="chevron_right" icon-pos="right" type="primary") // dt/dd text .ni-li(v-else-if='dt'): .ni-li-container @@ -91,7 +91,7 @@ export default { &.ni-li-link &:hover - background: app-bg-hover + background hover-bg .ni-li-label cursor pointer diff --git a/app/src/renderer/styles/app.styl b/app/src/renderer/styles/app.styl index 5693291f94..024a221bb7 100644 --- a/app/src/renderer/styles/app.styl +++ b/app/src/renderer/styles/app.styl @@ -22,15 +22,6 @@ a .desktop-only display none -.btn__primary - .ni-btn-container - background alpha(link, 50%) - border-color alpha(dim, 50%) - &:hover - border-color dim - .ni-btn-value - color bright - #app df() color txt diff --git a/app/src/renderer/styles/variables.styl b/app/src/renderer/styles/variables.styl index 9aa743e07d..542afae0ce 100644 --- a/app/src/renderer/styles/variables.styl +++ b/app/src/renderer/styles/variables.styl @@ -16,7 +16,6 @@ app-fg = hsl(app-hue, 33%, 16%) app-bg = hsl(app-hue, 36%, 13%) app-bg-alpha = alpha(app-bg, 95%) -app-bg-hover = hsl(app-hue, 33%, 20%) // text bright = #fff @@ -28,9 +27,9 @@ bc = hsl(app-hue, 22%, 23%) bc-dim = app-fg // anchor -link = hsl(app-hue, 88%, 70%) -hover = hsl(app-hue, 88%, 60%) -hover-bg = hsl(app-hue, 30%, 19%) +link = hsl(app-hue, 88%, 67%) +hover = hsl(app-hue, 88%, 73%) +hover-bg = hsl(app-hue, 43%, 10%) // input input-bg = transparent diff --git a/package.json b/package.json index 1f6ea56b11..14e4235782 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "xmlhttprequest": "^1.8.0" }, "dependencies": { - "@nylira/vue-button": "^4.1.5", + "@nylira/vue-button": "^4.2.2", "@nylira/vue-field": "^1.1.17", "@nylira/vue-form-msg": "^1.0.3", "@nylira/vue-input": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 5f29d1ea0c..ad47918693 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,9 +6,9 @@ version "0.0.6" resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" -"@nylira/vue-button@^4.1.5": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@nylira/vue-button/-/vue-button-4.1.5.tgz#3cb0cc38535910e34bae11f206b6874d292cec89" +"@nylira/vue-button@^4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@nylira/vue-button/-/vue-button-4.2.2.tgz#d9007a11647a92d536b8756d3bd8ef661307b42b" "@nylira/vue-field@^1.1.17": version "1.1.17" From a58daf14aad63b1f2f03bd2d0d56307e12c9a690 Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Thu, 1 Feb 2018 13:48:17 +0800 Subject: [PATCH 2/4] update buttons --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 14e4235782..2b01a4b839 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "xmlhttprequest": "^1.8.0" }, "dependencies": { - "@nylira/vue-button": "^4.2.2", + "@nylira/vue-button": "^4.3.1", "@nylira/vue-field": "^1.1.17", "@nylira/vue-form-msg": "^1.0.3", "@nylira/vue-input": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index ad47918693..09fd366aad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6,9 +6,9 @@ version "0.0.6" resolved "https://registry.yarnpkg.com/7zip/-/7zip-0.0.6.tgz#9cafb171af82329490353b4816f03347aa150a30" -"@nylira/vue-button@^4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@nylira/vue-button/-/vue-button-4.2.2.tgz#d9007a11647a92d536b8756d3bd8ef661307b42b" +"@nylira/vue-button@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@nylira/vue-button/-/vue-button-4.3.1.tgz#9979203ac1a6c5b10574c2eb32823b01c4dc67a4" "@nylira/vue-field@^1.1.17": version "1.1.17" From 270df785b653032e4ffcc9da82ecc42b25bec989 Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Thu, 1 Feb 2018 13:52:09 +0800 Subject: [PATCH 3/4] update changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 845c1527af..e265fcd51c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,3 +31,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Removed * Removed unused `sass-loader` node dependency. @nylira + +## [0.4.0] - 2018-02-01 +### Added +* Added button styles for Success, Warning, and Danger states. @nylira +* 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 From 344c04d2147736d8dc5e2fb62c6caa6786c55e8a Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Thu, 1 Feb 2018 14:02:20 +0800 Subject: [PATCH 4/4] fix tests, convert btn__primary to color attribute --- .../renderer/components/common/NiListItem.vue | 2 +- .../components/staking/LiDelegate.vue | 2 +- .../renderer/components/staking/PageBond.vue | 4 +- .../components/staking/PageDelegates.vue | 4 +- .../renderer/components/wallet/PageSend.vue | 4 +- package.json | 2 +- .../NISessionAccountDelete.spec.js.snap | 4 +- .../NISessionSignIn.spec.js.snap | 4 +- .../NISessionSignUp.spec.js.snap | 4 +- .../__snapshots__/NiBtnCopy.spec.js.snap | 2 +- .../__snapshots__/NiLiCopy.spec.js.snap | 7 +-- .../__snapshots__/NiModalSearch.spec.js.snap | 5 +- .../NiSessionImport.spec.js.snap | 4 +- .../__snapshots__/ToggleBtn.spec.js.snap | 5 +- .../__snapshots__/PageBond.spec.js.snap | 12 +++-- .../__snapshots__/PageDelegates.spec.js.snap | 15 +++--- .../__snapshots__/PageBalances.spec.js.snap | 50 +++++++++++-------- .../__snapshots__/PageSend.spec.js.snap | 7 +-- .../PageTransactions.spec.js.snap | 5 +- yarn.lock | 6 +-- 20 files changed, 85 insertions(+), 63 deletions(-) diff --git a/app/src/renderer/components/common/NiListItem.vue b/app/src/renderer/components/common/NiListItem.vue index c0dce06089..f13b0e68d5 100644 --- a/app/src/renderer/components/common/NiListItem.vue +++ b/app/src/renderer/components/common/NiListItem.vue @@ -34,7 +34,7 @@ transition(name="proposal") router-link.ni-li.ni-li-link(v-else-if="btn && to" :to="to"): .ni-li-container +ni-li-thumb +ni-li-dl - btn(:value="btn" icon="chevron_right" icon-pos="right" type="primary") + btn(:value="btn" icon="chevron_right" icon-pos="right" color="primary") // dt/dd text .ni-li(v-else-if='dt'): .ni-li-container diff --git a/app/src/renderer/components/staking/LiDelegate.vue b/app/src/renderer/components/staking/LiDelegate.vue index 46ced89131..0178d51b1a 100644 --- a/app/src/renderer/components/staking/LiDelegate.vue +++ b/app/src/renderer/components/staking/LiDelegate.vue @@ -83,7 +83,7 @@ export default { &:nth-of-type(2n-1) background app-fg &.li-delegate-active - background alpha(hover, 17.5%) + background hover-bg .li-delegate__value i color link diff --git a/app/src/renderer/components/staking/PageBond.vue b/app/src/renderer/components/staking/PageBond.vue index 220f2136a3..33a35d8797 100644 --- a/app/src/renderer/components/staking/PageBond.vue +++ b/app/src/renderer/components/staking/PageBond.vue @@ -109,8 +109,8 @@ page.page-bond(title="Bond Atoms") v-if='!$v.fields.bondConfirm.required') div(slot='footer') - btn#btn-reset(type="button" @click.native="resetFields" value="Reset") - btn#btn-bond.btn__primary(value="Submit") + btn#btn-reset(type="button" @click.native="resetFields" value="Reset" color="danger") + btn#btn-bond(value="Submit" color="primary")