Add reserve stamina to notes

This commit is contained in:
xtaodada 2023-09-01 14:03:37 +08:00
parent 61175aaf1d
commit 9f8bad3231
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
6 changed files with 22 additions and 4 deletions

View File

@ -58,6 +58,8 @@ class DailyNotePlugin(Plugin):
"resin_recovery_time": resin_recovery_time,
"current_resin": daily_info.current_stamina,
"max_resin": daily_info.max_stamina,
"current_reserve_stamina": daily_info.current_reserve_stamina,
"is_reserve_stamina_full": daily_info.is_reserve_stamina_full,
"expeditions": bool(daily_info.expeditions),
"remained_time": remained_time,
"current_expeditions": len(daily_info.expeditions),

View File

@ -110,7 +110,7 @@ class DailyNoteTasksPlugin(Plugin.Conversation):
validate = WebAppData(**result.data)
except ValidationError:
await message.reply_text(
"数据错误\n开拓力提醒数值必须在 100 ~ 180 之间",
"数据错误\n开拓力提醒数值必须在 100 ~ 240 之间",
reply_markup=ReplyKeyboardRemove(),
)
return ConversationHandler.END

View File

@ -29,8 +29,8 @@ class ResinData(TaskDataBase):
@validator("notice_num")
def notice_num_validator(cls, v):
if v < 100 or v > 180:
raise ValueError("开拓力提醒数值必须在 100 ~ 180 之间")
if v < 100 or v > 240:
raise ValueError("开拓力提醒数值必须在 100 ~ 240 之间")
return v

View File

@ -78,7 +78,7 @@ body {
.item .right {
text-align: center;
width: 128px;
width: 160px;
background-color: #decebb;
font-size: 20px;
color: #504c49;

View File

@ -35,6 +35,22 @@
{{ current_resin }}/{{ max_resin }}
</span>
</div>
</div>
<div class="item">
<div class="main">
<div class="bg"></div>
<img class="icon" src="./items/后备开拓力.webp" alt="" />
<div class="info">
<div class="name">后备开拓力</div>
</div>
</div>
<div class="right">
<span
class="{% if is_reserve_stamina_full %}red{% endif %}"
>
{{ current_reserve_stamina }}
</span>
</div>
</div>
<div class="item">
<div class="main">

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB