81 lines
2.4 KiB
Python
81 lines
2.4 KiB
Python
import flet as ft
|
||
from src.base_models.text_fuild import TextField
|
||
from src.base_models.colour import color
|
||
from src.base_models.button import Button
|
||
import requests
|
||
from requests.exceptions import RequestException
|
||
|
||
class MainPage(ft.View):
|
||
|
||
|
||
|
||
def __init__(self,page:ft.Page,route:str,bgcolor:str):
|
||
self.page = page
|
||
|
||
#table=ft.DataTable(
|
||
#
|
||
#)
|
||
|
||
dd = ft.Dropdown(
|
||
label="таблица",
|
||
options=[
|
||
ft.DropdownOption(text="Сollection_form_opk")
|
||
]
|
||
)
|
||
|
||
rail = ft.NavigationRail(
|
||
selected_index=0,
|
||
label_type=ft.NavigationRailLabelType.ALL,
|
||
#extended=True,
|
||
height=1000,
|
||
min_width=100,
|
||
min_extended_width=200,
|
||
bgcolor=color[3],
|
||
group_alignment=-0.4,
|
||
destinations=[
|
||
ft.NavigationRailDestination(
|
||
icon=ft.Icons.HOME_OUTLINED,
|
||
selected_icon=ft.Icons.HOME_SHARP,
|
||
label="Home"
|
||
),
|
||
ft.NavigationRailDestination(
|
||
icon=ft.Icon(ft.Icons.BOOKMARK_BORDER),
|
||
selected_icon=ft.Icon(ft.Icons.BOOKMARK),
|
||
label="Second",
|
||
),
|
||
ft.NavigationRailDestination(
|
||
icon=ft.Icons.SETTINGS_OUTLINED,
|
||
selected_icon=ft.Icon(ft.Icons.SETTINGS),
|
||
label="Second",
|
||
),
|
||
|
||
],
|
||
|
||
on_change=lambda e: print("Selected destination:", e.control.selected_index),
|
||
)
|
||
super().__init__(
|
||
route=route,
|
||
bgcolor=bgcolor,
|
||
controls=[
|
||
ft.Row(
|
||
expand=True,
|
||
controls=[
|
||
rail,
|
||
ft.VerticalDivider(width=1),
|
||
ft.Column(
|
||
alignment=ft.MainAxisAlignment.START,
|
||
expand=True,
|
||
controls=[
|
||
ft.Text("Добро пожаловать!"),
|
||
dd
|
||
],
|
||
),
|
||
]
|
||
)
|
||
]
|
||
)
|
||
|
||
|
||
|
||
|