From 7f3c39ac193b8d340ef1e03d0e1f76b47490d7bd Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 19 Oct 2020 15:27:33 +0300 Subject: [PATCH] Fix Staking dapp dark mode styles --- CHANGELOG.md | 2 +- apps/block_scout_web/assets/css/theme/_dark-theme.scss | 5 +++++ .../lib/block_scout_web/controllers/stakes_controller.ex | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e993db8ba1..69e445de19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## Current ### Features -- [#2292](https://github.com/poanetwork/blockscout/pull/2292), [#3356](https://github.com/poanetwork/blockscout/pull/3356), [#3359](https://github.com/poanetwork/blockscout/pull/3359), [#3360](https://github.com/poanetwork/blockscout/pull/3360) - Add Web UI for POSDAO Staking DApp +- [#2292](https://github.com/poanetwork/blockscout/pull/2292), [#3356](https://github.com/poanetwork/blockscout/pull/3356), [#3359](https://github.com/poanetwork/blockscout/pull/3359), [#3360](https://github.com/poanetwork/blockscout/pull/3360), [#3365](https://github.com/poanetwork/blockscout/pull/3365) - Add Web UI for POSDAO Staking DApp - [#3354](https://github.com/poanetwork/blockscout/pull/3354) - Tx hash in EOA coin balance history - [#3333](https://github.com/poanetwork/blockscout/pull/3333), [#3337](https://github.com/poanetwork/blockscout/pull/3337) - Dark forest contract custom theme - [#3330](https://github.com/poanetwork/blockscout/pull/3330) - Caching of address transactions counter, remove query 10_000 rows limit diff --git a/apps/block_scout_web/assets/css/theme/_dark-theme.scss b/apps/block_scout_web/assets/css/theme/_dark-theme.scss index b7580c9e70..c211e63a7f 100644 --- a/apps/block_scout_web/assets/css/theme/_dark-theme.scss +++ b/apps/block_scout_web/assets/css/theme/_dark-theme.scss @@ -1046,6 +1046,11 @@ $dark-stakes-banned-background: #3e314c; .tooltip-inversed-color.bs-tooltip-auto[x-placement^="left"] .arrow::before { border-left-color: $btn-line-color !important; } + + .stakes-top { + background-color: $dark-bg; + background-image: none; + } } .navbar-dark .navbar-toggler { diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/stakes_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/stakes_controller.ex index 7f941dd0f1..83a6866d3e 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/stakes_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/stakes_controller.ex @@ -38,11 +38,13 @@ defmodule BlockScoutWeb.StakesController do }) end + epoch_end_in = if epoch_end_block - block_number >= 0, do: epoch_end_block - block_number, else: 0 + View.render_to_string(StakesView, "_stakes_top.html", account: account, block_number: block_number, candidates_limit_reached: active_pools_length >= max_candidates, - epoch_end_in: epoch_end_block - block_number, + epoch_end_in: epoch_end_in, epoch_number: epoch_number, token: token )