Files
FascioSchoolBot/app/bot/dialogs/flows/user/profile/dialogs.py
2025-09-25 20:48:39 +03:00

39 lines
1.2 KiB
Python

from aiogram_dialog import Dialog, Window
from aiogram_dialog.widgets.input import TextInput
from aiogram_dialog.widgets.kbd import Back, Cancel, SwitchTo
from aiogram_dialog.widgets.text import Const, Format
from .states import UserProfileSG
user_profile_dialog = Dialog(
Window(
Const("*Профиль*"),
Format("Имя:"),
Format("Телефон:"),
SwitchTo(
Const("изменить имя"),
id="change_name",
state=UserProfileSG.change_name,
),
SwitchTo(
Const("изменить телефон"),
id="change_phone",
state=UserProfileSG.change_phone,
),
Cancel(Const("назад")),
state=UserProfileSG.profile,
),
Window(
Const("Введите имя"),
SwitchTo(Const("отмена"), id="go_profile", state=UserProfileSG.profile),
TextInput(id="name_input"),
state=UserProfileSG.change_name,
),
Window(
Const("Введите телефон"),
SwitchTo(Const("отмена"), id="go_profile", state=UserProfileSG.profile),
TextInput(id="phone_input"),
state=UserProfileSG.change_phone,
),
)