web sttarting

This commit is contained in:
2026-03-31 13:25:14 +05:00
parent 9cd6d83428
commit 59b3bcd0f4
30 changed files with 720 additions and 242 deletions

View File

@@ -10,7 +10,7 @@ class clolors:
class CastomTextField_input(ft.TextField):
def __init__(self, on_change, on_submit, label="Ваше имя", hint_text="Введите текст...", prefix_icon=None, suffix_icon=None):
def __init__(self, on_change=None, on_submit=None, label="Ваше имя", hint_text="Введите текст...", prefix_icon=None, suffix_icon=None, **kwargs):
super().__init__(
label=label,
hint_text=hint_text,
@@ -34,6 +34,7 @@ class CastomTextField_input(ft.TextField):
suffix_icon=suffix_icon,
on_change=on_change,
on_submit=on_submit,
**kwargs,
)
class CastomButton(ft.Button):
@@ -50,6 +51,38 @@ class CastomButton(ft.Button):
on_click=on_click
)
class CastomDropdown(ft.Dropdown):
def __init__(self, label="", hint_text="", options=None, on_change=None):
super().__init__(
label=label,
hint_text=hint_text,
options=options or [],
filled=True,
fill_color=clolors.laer3,
color=clolors.ferst,
border_color=clolors.laer2,
border_radius=12,
focused_border_color=clolors.laer1,
label_style=ft.TextStyle(
color=clolors.ferst,
weight=ft.FontWeight.BOLD,
),
hint_style=ft.TextStyle(
color=clolors.laer1,
italic=True,
),
text_style=ft.TextStyle(
color=clolors.ferst,
size=16,
),
menu_style=ft.MenuStyle(
bgcolor=clolors.laer3,
),
)
if on_change is not None:
self.on_select = on_change
class CastomSwitch(ft.Switch):
def __init__(self, label, on_change):
super().__init__(
@@ -239,4 +272,5 @@ class AlterDiaalogApproval(ft.AlertDialog):
def accept(self, e):
self.dialog_result = True
self.open = False
self.page.update()
self.page.update()
self.page.run_task(self.page.push_route, "/login")