mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-16 03:55:26 +00:00
✨ Add reserve stamina to notes
This commit is contained in:
parent
61175aaf1d
commit
9f8bad3231
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -78,7 +78,7 @@ body {
|
||||
|
||||
.item .right {
|
||||
text-align: center;
|
||||
width: 128px;
|
||||
width: 160px;
|
||||
background-color: #decebb;
|
||||
font-size: 20px;
|
||||
color: #504c49;
|
||||
|
@ -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">
|
||||
|
BIN
resources/starrail/daily_note/items/后备开拓力.webp
Normal file
BIN
resources/starrail/daily_note/items/后备开拓力.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user