🎨 Extend gacha log photo width

This commit is contained in:
xtaodada 2023-08-29 15:20:02 +08:00
parent d945b91a9d
commit f7e9412125
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
3 changed files with 16 additions and 22 deletions

View File

@ -403,8 +403,6 @@ class GachaLog:
{"num": five_star, "unit": "", "lable": "五星"},
{"num": five_star_avg, "unit": "", "lable": "五星平均"},
{"num": small_protect, "unit": "%", "lable": "小保底不歪"},
],
[
{"num": no_four_star, "unit": "", "lable": "未出四星"},
{"num": five_star_const, "unit": "", "lable": "五星常驻"},
{"num": up_avg, "unit": "", "lable": "UP平均"},
@ -436,8 +434,6 @@ class GachaLog:
{"num": five_star, "unit": "", "lable": "五星"},
{"num": five_star_avg, "unit": "", "lable": "五星平均"},
{"num": five_star_weapon, "unit": "", "lable": "五星武器"},
],
[
{"num": no_four_star, "unit": "", "lable": "未出四星"},
{"num": four_star, "unit": "", "lable": "四星"},
{"num": four_star_avg, "unit": "", "lable": "四星平均"},
@ -469,8 +465,6 @@ class GachaLog:
{"num": five_star, "unit": "", "lable": "五星"},
{"num": five_star_avg, "unit": "", "lable": "五星平均"},
{"num": four_star_weapon, "unit": "", "lable": "四星武器"},
],
[
{"num": no_four_star, "unit": "", "lable": "未出四星"},
{"num": four_star, "unit": "", "lable": "四星"},
{"num": four_star_avg, "unit": "", "lable": "四星平均"},
@ -543,7 +537,7 @@ class GachaLog:
"firstTime": first_time,
"lastTime": last_time,
"fiveLog": all_five,
"fourLog": all_four[:18],
"fourLog": all_four[:36],
}
async def get_pool_analysis(

View File

@ -6,7 +6,7 @@ from simnet.models.genshin.wish import BannerType
from simnet.utils.player import recognize_genshin_game_biz, recognize_genshin_server
from telegram import Document, InlineKeyboardButton, InlineKeyboardMarkup, Message, Update, User
from telegram.constants import ChatAction
from telegram.ext import CallbackContext, CommandHandler, ConversationHandler, MessageHandler, filters
from telegram.ext import CallbackContext, ConversationHandler, filters
from telegram.helpers import create_deep_linked_url
from core.basemodel import RegionEnum
@ -161,8 +161,8 @@ class WishLogPlugin(Plugin.Conversation):
await reply.edit_text(text)
@conversation.entry_point
@handler(CommandHandler, command="gacha_log_import", filters=filters.ChatType.PRIVATE, block=False)
@handler(MessageHandler, filters=filters.Regex("^导入抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
@handler.command(command="gacha_log_import", filters=filters.ChatType.PRIVATE, block=False)
@handler.message(filters=filters.Regex("^导入抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
async def command_start(self, update: Update, context: CallbackContext) -> int:
message = update.effective_message
user = update.effective_user
@ -225,8 +225,8 @@ class WishLogPlugin(Plugin.Conversation):
return ConversationHandler.END
@conversation.entry_point
@handler(CommandHandler, command="gacha_log_delete", filters=filters.ChatType.PRIVATE, block=False)
@handler(MessageHandler, filters=filters.Regex("^删除抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
@handler.command(command="gacha_log_delete", filters=filters.ChatType.PRIVATE, block=False)
@handler.message(filters=filters.Regex("^删除抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
async def command_start_delete(self, update: Update, context: CallbackContext) -> int:
message = update.effective_message
user = update.effective_user
@ -257,7 +257,7 @@ class WishLogPlugin(Plugin.Conversation):
await message.reply_text("已取消")
return ConversationHandler.END
@handler(CommandHandler, command="gacha_log_force_delete", block=False, admin=True)
@handler.command(command="gacha_log_force_delete", block=False, admin=True)
async def command_gacha_log_force_delete(self, update: Update, context: CallbackContext):
message = update.effective_message
user = update.effective_user
@ -284,8 +284,8 @@ class WishLogPlugin(Plugin.Conversation):
except (ValueError, IndexError):
await message.reply_text("用户ID 不合法")
@handler(CommandHandler, command="gacha_log_export", filters=filters.ChatType.PRIVATE, block=False)
@handler(MessageHandler, filters=filters.Regex("^导出抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
@handler.command(command="gacha_log_export", filters=filters.ChatType.PRIVATE, block=False)
@handler.message(filters=filters.Regex("^导出抽卡记录(.*)") & filters.ChatType.PRIVATE, block=False)
async def command_start_export(self, update: Update, context: CallbackContext) -> None:
message = update.effective_message
user = update.effective_user
@ -310,8 +310,8 @@ class WishLogPlugin(Plugin.Conversation):
logger.info("未查询到用户 %s[%s] 所绑定的账号信息", user.full_name, user.id)
await message.reply_text("未查询到您所绑定的账号信息,请先绑定账号")
@handler(CommandHandler, command="gacha_log", block=False)
@handler(MessageHandler, filters=filters.Regex("^抽卡记录?(武器|角色|常驻|)$"), block=False)
@handler.command(command="gacha_log", block=False)
@handler.message(filters=filters.Regex("^抽卡记录?(武器|角色|常驻|)$"), block=False)
async def command_start_analysis(self, update: Update, context: CallbackContext) -> None:
message = update.effective_message
user = update.effective_user
@ -339,7 +339,7 @@ class WishLogPlugin(Plugin.Conversation):
"genshin/wish_log/wish_log.jinja2",
data,
full_page=True,
file_type=FileType.DOCUMENT if len(data.get("fiveLog")) > 36 else FileType.PHOTO,
file_type=FileType.DOCUMENT if len(data.get("fiveLog")) > 300 else FileType.PHOTO,
query_selector=".body_box",
)
if png_data.file_type == FileType.DOCUMENT:
@ -353,8 +353,8 @@ class WishLogPlugin(Plugin.Conversation):
]
await message.reply_text("派蒙没有找到你的抽卡记录,快来点击按钮私聊派蒙导入吧~", reply_markup=InlineKeyboardMarkup(buttons))
@handler(CommandHandler, command="gacha_count", block=False)
@handler(MessageHandler, filters=filters.Regex("^抽卡统计?(武器|角色|常驻|仅五星|)$"), block=False)
@handler.command(command="gacha_count", block=False)
@handler.message(filters=filters.Regex("^抽卡统计?(武器|角色|常驻|仅五星|)$"), block=False)
async def command_start_count(self, update: Update, context: CallbackContext) -> None:
message = update.effective_message
user = update.effective_user

View File

@ -18,11 +18,11 @@ body {
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
transform: scale(1.5);
transform-origin: 0 0;
width: 510px;
width: 1020px;
}
.container {
width: 510px;
width: 1020px;
padding: 20px 15px 10px 15px;
background-color: #f5f6fb;
}