add InlineButton to forms
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from aiogram.types import Message, CallbackQuery
|
||||
from aiogram.types import Message, CallbackQuery, InlineKeyboardButton
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.utils.i18n import I18n
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
||||
@@ -35,6 +35,12 @@ class CommandButton:
|
||||
visibility: Callable[[Any], bool] | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class InlineButton:
|
||||
inline_button: InlineKeyboardButton | Callable[[Any], InlineKeyboardButton]
|
||||
visibility: Callable[[Any], bool] | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class Filter:
|
||||
field_name: str
|
||||
@@ -74,7 +80,7 @@ class EntityList:
|
||||
class EntityForm:
|
||||
item_repr: EntityItemCaptionCallable | None = None
|
||||
edit_field_sequence: list[str] = None
|
||||
form_buttons: list[list[FieldEditButton | CommandButton]] = None
|
||||
form_buttons: list[list[FieldEditButton | CommandButton | InlineButton]] = None
|
||||
show_edit_button: bool = True
|
||||
show_delete_button: bool = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user