web sttarting
This commit is contained in:
81
web/views/user_view.py
Normal file
81
web/views/user_view.py
Normal file
@@ -0,0 +1,81 @@
|
||||
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
|
||||
]
|
||||
)
|
||||
|
||||
]
|
||||
Reference in New Issue
Block a user