Polish mobile auth and garage layout
This commit is contained in:
15
bot/main.py
15
bot/main.py
@@ -32,15 +32,24 @@ def main_keyboard() -> ReplyKeyboardMarkup:
|
||||
)
|
||||
|
||||
|
||||
def webapp_inline_keyboard() -> InlineKeyboardMarkup:
|
||||
return InlineKeyboardMarkup(
|
||||
inline_keyboard=[
|
||||
[InlineKeyboardButton(text="Открыть CarPass", web_app=WebAppInfo(url=settings.effective_webapp_url))],
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@dp.message(Command("start"))
|
||||
async def start(message: Message) -> None:
|
||||
user = await api.upsert_user(message.from_user)
|
||||
text = (
|
||||
f"Готово, {user.get('first_name') or 'водитель'}.\n\n"
|
||||
"Здесь можно вести заправки, обслуживание, ремонты и смотреть стоимость владения. "
|
||||
"Основная работа идет в mini app, а бот остается быстрым входом."
|
||||
"CarPass — цифровой паспорт автомобиля: заправки, обслуживание, напоминания, подтвержденная история и стоимость владения.\n\n"
|
||||
"Нажми «Открыть CarPass», чтобы перейти в приложение."
|
||||
)
|
||||
await message.answer(text, reply_markup=main_keyboard())
|
||||
await message.answer(text, reply_markup=webapp_inline_keyboard())
|
||||
await message.answer("Быстрый вход также закреплен на клавиатуре ниже.", reply_markup=main_keyboard())
|
||||
|
||||
|
||||
@dp.message(Command("add_car"))
|
||||
|
||||
Reference in New Issue
Block a user