mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-25 09:37:38 +00:00
🎨 Extend gacha log photo width
This commit is contained in:
parent
d945b91a9d
commit
f7e9412125
@ -403,8 +403,6 @@ class GachaLog:
|
|||||||
{"num": five_star, "unit": "个", "lable": "五星"},
|
{"num": five_star, "unit": "个", "lable": "五星"},
|
||||||
{"num": five_star_avg, "unit": "抽", "lable": "五星平均"},
|
{"num": five_star_avg, "unit": "抽", "lable": "五星平均"},
|
||||||
{"num": small_protect, "unit": "%", "lable": "小保底不歪"},
|
{"num": small_protect, "unit": "%", "lable": "小保底不歪"},
|
||||||
],
|
|
||||||
[
|
|
||||||
{"num": no_four_star, "unit": "抽", "lable": "未出四星"},
|
{"num": no_four_star, "unit": "抽", "lable": "未出四星"},
|
||||||
{"num": five_star_const, "unit": "个", "lable": "五星常驻"},
|
{"num": five_star_const, "unit": "个", "lable": "五星常驻"},
|
||||||
{"num": up_avg, "unit": "抽", "lable": "UP平均"},
|
{"num": up_avg, "unit": "抽", "lable": "UP平均"},
|
||||||
@ -436,8 +434,6 @@ class GachaLog:
|
|||||||
{"num": five_star, "unit": "个", "lable": "五星"},
|
{"num": five_star, "unit": "个", "lable": "五星"},
|
||||||
{"num": five_star_avg, "unit": "抽", "lable": "五星平均"},
|
{"num": five_star_avg, "unit": "抽", "lable": "五星平均"},
|
||||||
{"num": five_star_weapon, "unit": "个", "lable": "五星武器"},
|
{"num": five_star_weapon, "unit": "个", "lable": "五星武器"},
|
||||||
],
|
|
||||||
[
|
|
||||||
{"num": no_four_star, "unit": "抽", "lable": "未出四星"},
|
{"num": no_four_star, "unit": "抽", "lable": "未出四星"},
|
||||||
{"num": four_star, "unit": "个", "lable": "四星"},
|
{"num": four_star, "unit": "个", "lable": "四星"},
|
||||||
{"num": four_star_avg, "unit": "抽", "lable": "四星平均"},
|
{"num": four_star_avg, "unit": "抽", "lable": "四星平均"},
|
||||||
@ -469,8 +465,6 @@ class GachaLog:
|
|||||||
{"num": five_star, "unit": "个", "lable": "五星"},
|
{"num": five_star, "unit": "个", "lable": "五星"},
|
||||||
{"num": five_star_avg, "unit": "抽", "lable": "五星平均"},
|
{"num": five_star_avg, "unit": "抽", "lable": "五星平均"},
|
||||||
{"num": four_star_weapon, "unit": "个", "lable": "四星武器"},
|
{"num": four_star_weapon, "unit": "个", "lable": "四星武器"},
|
||||||
],
|
|
||||||
[
|
|
||||||
{"num": no_four_star, "unit": "抽", "lable": "未出四星"},
|
{"num": no_four_star, "unit": "抽", "lable": "未出四星"},
|
||||||
{"num": four_star, "unit": "个", "lable": "四星"},
|
{"num": four_star, "unit": "个", "lable": "四星"},
|
||||||
{"num": four_star_avg, "unit": "抽", "lable": "四星平均"},
|
{"num": four_star_avg, "unit": "抽", "lable": "四星平均"},
|
||||||
@ -543,7 +537,7 @@ class GachaLog:
|
|||||||
"firstTime": first_time,
|
"firstTime": first_time,
|
||||||
"lastTime": last_time,
|
"lastTime": last_time,
|
||||||
"fiveLog": all_five,
|
"fiveLog": all_five,
|
||||||
"fourLog": all_four[:18],
|
"fourLog": all_four[:36],
|
||||||
}
|
}
|
||||||
|
|
||||||
async def get_pool_analysis(
|
async def get_pool_analysis(
|
||||||
|
@ -6,7 +6,7 @@ from simnet.models.genshin.wish import BannerType
|
|||||||
from simnet.utils.player import recognize_genshin_game_biz, recognize_genshin_server
|
from simnet.utils.player import recognize_genshin_game_biz, recognize_genshin_server
|
||||||
from telegram import Document, InlineKeyboardButton, InlineKeyboardMarkup, Message, Update, User
|
from telegram import Document, InlineKeyboardButton, InlineKeyboardMarkup, Message, Update, User
|
||||||
from telegram.constants import ChatAction
|
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 telegram.helpers import create_deep_linked_url
|
||||||
|
|
||||||
from core.basemodel import RegionEnum
|
from core.basemodel import RegionEnum
|
||||||
@ -161,8 +161,8 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
await reply.edit_text(text)
|
await reply.edit_text(text)
|
||||||
|
|
||||||
@conversation.entry_point
|
@conversation.entry_point
|
||||||
@handler(CommandHandler, command="gacha_log_import", filters=filters.ChatType.PRIVATE, block=False)
|
@handler.command(command="gacha_log_import", filters=filters.ChatType.PRIVATE, block=False)
|
||||||
@handler(MessageHandler, filters=filters.Regex("^导入抽卡记录(.*)") & 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:
|
async def command_start(self, update: Update, context: CallbackContext) -> int:
|
||||||
message = update.effective_message
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
@ -225,8 +225,8 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
return ConversationHandler.END
|
return ConversationHandler.END
|
||||||
|
|
||||||
@conversation.entry_point
|
@conversation.entry_point
|
||||||
@handler(CommandHandler, command="gacha_log_delete", filters=filters.ChatType.PRIVATE, block=False)
|
@handler.command(command="gacha_log_delete", filters=filters.ChatType.PRIVATE, block=False)
|
||||||
@handler(MessageHandler, filters=filters.Regex("^删除抽卡记录(.*)") & 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:
|
async def command_start_delete(self, update: Update, context: CallbackContext) -> int:
|
||||||
message = update.effective_message
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
@ -257,7 +257,7 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
await message.reply_text("已取消")
|
await message.reply_text("已取消")
|
||||||
return ConversationHandler.END
|
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):
|
async def command_gacha_log_force_delete(self, update: Update, context: CallbackContext):
|
||||||
message = update.effective_message
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
@ -284,8 +284,8 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
except (ValueError, IndexError):
|
except (ValueError, IndexError):
|
||||||
await message.reply_text("用户ID 不合法")
|
await message.reply_text("用户ID 不合法")
|
||||||
|
|
||||||
@handler(CommandHandler, command="gacha_log_export", filters=filters.ChatType.PRIVATE, block=False)
|
@handler.command(command="gacha_log_export", filters=filters.ChatType.PRIVATE, block=False)
|
||||||
@handler(MessageHandler, filters=filters.Regex("^导出抽卡记录(.*)") & 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:
|
async def command_start_export(self, update: Update, context: CallbackContext) -> None:
|
||||||
message = update.effective_message
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
@ -310,8 +310,8 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
logger.info("未查询到用户 %s[%s] 所绑定的账号信息", user.full_name, user.id)
|
logger.info("未查询到用户 %s[%s] 所绑定的账号信息", user.full_name, user.id)
|
||||||
await message.reply_text("未查询到您所绑定的账号信息,请先绑定账号")
|
await message.reply_text("未查询到您所绑定的账号信息,请先绑定账号")
|
||||||
|
|
||||||
@handler(CommandHandler, command="gacha_log", block=False)
|
@handler.command(command="gacha_log", block=False)
|
||||||
@handler(MessageHandler, filters=filters.Regex("^抽卡记录?(武器|角色|常驻|)$"), block=False)
|
@handler.message(filters=filters.Regex("^抽卡记录?(武器|角色|常驻|)$"), block=False)
|
||||||
async def command_start_analysis(self, update: Update, context: CallbackContext) -> None:
|
async def command_start_analysis(self, update: Update, context: CallbackContext) -> None:
|
||||||
message = update.effective_message
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
@ -339,7 +339,7 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
"genshin/wish_log/wish_log.jinja2",
|
"genshin/wish_log/wish_log.jinja2",
|
||||||
data,
|
data,
|
||||||
full_page=True,
|
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",
|
query_selector=".body_box",
|
||||||
)
|
)
|
||||||
if png_data.file_type == FileType.DOCUMENT:
|
if png_data.file_type == FileType.DOCUMENT:
|
||||||
@ -353,8 +353,8 @@ class WishLogPlugin(Plugin.Conversation):
|
|||||||
]
|
]
|
||||||
await message.reply_text("派蒙没有找到你的抽卡记录,快来点击按钮私聊派蒙导入吧~", reply_markup=InlineKeyboardMarkup(buttons))
|
await message.reply_text("派蒙没有找到你的抽卡记录,快来点击按钮私聊派蒙导入吧~", reply_markup=InlineKeyboardMarkup(buttons))
|
||||||
|
|
||||||
@handler(CommandHandler, command="gacha_count", block=False)
|
@handler.command(command="gacha_count", block=False)
|
||||||
@handler(MessageHandler, filters=filters.Regex("^抽卡统计?(武器|角色|常驻|仅五星|)$"), block=False)
|
@handler.message(filters=filters.Regex("^抽卡统计?(武器|角色|常驻|仅五星|)$"), block=False)
|
||||||
async def command_start_count(self, update: Update, context: CallbackContext) -> None:
|
async def command_start_count(self, update: Update, context: CallbackContext) -> None:
|
||||||
message = update.effective_message
|
message = update.effective_message
|
||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
|
@ -18,11 +18,11 @@ body {
|
|||||||
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
font-family: PingFangSC-Medium, PingFang SC, sans-serif;
|
||||||
transform: scale(1.5);
|
transform: scale(1.5);
|
||||||
transform-origin: 0 0;
|
transform-origin: 0 0;
|
||||||
width: 510px;
|
width: 1020px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
width: 510px;
|
width: 1020px;
|
||||||
padding: 20px 15px 10px 15px;
|
padding: 20px 15px 10px 15px;
|
||||||
background-color: #f5f6fb;
|
background-color: #f5f6fb;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user