From d28d8429af51f80cfa8a00a7feae392b7a3a2c59 Mon Sep 17 00:00:00 2001 From: Pavel Perestoronin Date: Sat, 7 Aug 2021 20:54:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20the=20message,=20they?= =?UTF-8?q?=20seem=20to=20have=20fixed=20`last=5Fbattle=5Ftime`=20in=20the?= =?UTF-8?q?=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/web/routes/player.rs | 11 +---------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index db8ed04e..65b92647 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -235,7 +235,7 @@ dependencies = [ [[package]] name = "blitz-dashboard" -version = "0.37.11" +version = "0.37.12" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 3c2e66ec..6774169e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blitz-dashboard" -version = "0.37.11" +version = "0.37.12" authors = ["Pavel Perestoronin "] edition = "2018" resolver = "2" diff --git a/src/web/routes/player.rs b/src/web/routes/player.rs index 849f08ff..de6d3ad4 100644 --- a/src/web/routes/player.rs +++ b/src/web/routes/player.rs @@ -49,9 +49,9 @@ pub async fn get( set_user(¤t_info.nickname); insert_account_or_ignore(database, ¤t_info.base).await?; - let before = Utc::now() - Duration::from_std(period)?; let tanks = account_tanks_cache.get(¤t_info).await?; let tanks_delta = { + let before = Utc::now() - Duration::from_std(period)?; let old_tank_snapshots = retrieve_latest_tank_snapshots(database, account_id, &before).await?; subtract_tanks(&tanks, &old_tank_snapshots) @@ -255,15 +255,6 @@ pub async fn get( (tabs) div.container { - @if current_info.base.last_battle_time >= before && stats_delta.battles == 0 { - article.message.is-warning { - div.message-body { - strong { "Нет случайных боев за этот период." } - " Вероятно, игрок проводил время в других режимах." - } - } - } - div.tile.is-ancestor { div.tile."is-4".is-parent { div.tile.is-child.card {