82 lines
2.9 KiB
Python
82 lines
2.9 KiB
Python
import flet as ft
|
|
import designer as ds
|
|
from info import AuthService
|
|
|
|
|
|
class UserView(ft.View):
|
|
def __init__(self, page: ft.Page):
|
|
self._auth = AuthService(page)
|
|
session_key = page.session.store.get("session_key") or ""
|
|
self.spacing_groop = 6
|
|
self.border_radius = 15
|
|
self.content = ft.Container(
|
|
expand=True,
|
|
content=ft.Column(
|
|
alignment=ft.MainAxisAlignment.CENTER,
|
|
|
|
spacing=self.spacing_groop,
|
|
controls=[
|
|
ft.Row(
|
|
alignment=ft.MainAxisAlignment.CENTER,
|
|
|
|
spacing=self.spacing_groop,
|
|
controls=[
|
|
ft.Container(
|
|
border_radius=self.border_radius,
|
|
height=200,
|
|
width=200,
|
|
bgcolor=ds.clolors.laer2
|
|
),
|
|
ft.Container(
|
|
border_radius=self.border_radius,
|
|
height=200,
|
|
width=200,
|
|
bgcolor=ds.clolors.laer2
|
|
)
|
|
]
|
|
),
|
|
ft.Row(
|
|
alignment=ft.MainAxisAlignment.CENTER,
|
|
|
|
spacing=self.spacing_groop,
|
|
controls=[
|
|
ft.Container(
|
|
border_radius=self.border_radius,
|
|
height=200,
|
|
width=200,
|
|
bgcolor=ds.clolors.laer2
|
|
),
|
|
ft.Container(
|
|
border_radius=self.border_radius,
|
|
height=200,
|
|
width=200,
|
|
bgcolor=ds.clolors.laer2
|
|
)
|
|
]
|
|
),
|
|
],
|
|
)
|
|
)
|
|
|
|
super().__init__(
|
|
route=f"/user/{session_key}",
|
|
bgcolor=ds.clolors.background,
|
|
horizontal_alignment=ft.CrossAxisAlignment.START,
|
|
vertical_alignment=ft.MainAxisAlignment.START,
|
|
)
|
|
self.controls = [
|
|
ft.Column(
|
|
expand=True,
|
|
alignment=ft.MainAxisAlignment.CENTER,
|
|
controls=[
|
|
ft.Row(
|
|
controls=[
|
|
ft.Text("Добро пожаловать в COPP!", color=ds.clolors.ferst, size=24, weight=ft.FontWeight.BOLD),
|
|
]
|
|
),
|
|
self.content
|
|
]
|
|
)
|
|
|
|
]
|