create event
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from aiogram_dialog import Dialog, Window
|
||||
from aiogram_dialog.widgets.input import TextInput
|
||||
from aiogram_dialog.widgets.kbd import Cancel, SwitchTo
|
||||
from aiogram_dialog.widgets.text import Const, Format
|
||||
from aiogram_dialog.widgets.text import Const, Jinja
|
||||
|
||||
from app.bot.dialogs.templates import profile_template
|
||||
from app.bot.dialogs.widgets.getters import user_getter
|
||||
|
||||
from .getters import phone_getter
|
||||
from .handlers import (
|
||||
name_type_factory,
|
||||
on_error,
|
||||
@@ -17,9 +17,7 @@ from .states import ProfileSG
|
||||
|
||||
profile_dialog = Dialog(
|
||||
Window(
|
||||
Const("*Профиль*\n"),
|
||||
Format("*Имя*: {user.fullname}"),
|
||||
Format("*Телефон*: {phone}"),
|
||||
Jinja(profile_template),
|
||||
SwitchTo(
|
||||
Const("✏️ изменить имя"),
|
||||
id="change_name",
|
||||
@@ -31,8 +29,9 @@ profile_dialog = Dialog(
|
||||
state=ProfileSG.change_phone,
|
||||
),
|
||||
Cancel(Const("◀️ назад")),
|
||||
getter=user_getter,
|
||||
parse_mode="HTML",
|
||||
state=ProfileSG.profile,
|
||||
getter=[user_getter, phone_getter],
|
||||
),
|
||||
Window(
|
||||
Const("Введите имя"),
|
||||
@@ -55,5 +54,6 @@ profile_dialog = Dialog(
|
||||
on_error=on_error,
|
||||
),
|
||||
state=ProfileSG.change_phone,
|
||||
parse_mode="Markdown",
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user