rename users
This commit is contained in:
46
web/views/response_view.py
Normal file
46
web/views/response_view.py
Normal file
@@ -0,0 +1,46 @@
|
||||
import flet as ft
|
||||
import designer as ds
|
||||
from views.content_users.response_page import ResponsePage
|
||||
|
||||
|
||||
class ResponseView(ft.View):
|
||||
def __init__(self, page: ft.Page, response_id: str):
|
||||
url_key = page.session.store.get("url_key") or ""
|
||||
|
||||
back_btn = ft.IconButton(
|
||||
icon=ft.Icons.ARROW_BACK,
|
||||
icon_color=ds.clolors.ferst,
|
||||
on_click=lambda _: page.go(f"/my_tests/{url_key}"),
|
||||
)
|
||||
|
||||
self._content = ResponsePage(page, response_id)
|
||||
|
||||
super().__init__(
|
||||
route=f"/response/{url_key}/{response_id}",
|
||||
bgcolor=ds.clolors.background,
|
||||
horizontal_alignment=ft.CrossAxisAlignment.STRETCH,
|
||||
vertical_alignment=ft.MainAxisAlignment.START,
|
||||
scroll=ft.ScrollMode.AUTO,
|
||||
controls=[
|
||||
ft.Column(
|
||||
expand=True,
|
||||
spacing=10,
|
||||
controls=[
|
||||
ft.Row(
|
||||
controls=[
|
||||
back_btn,
|
||||
ds.CastomText(
|
||||
text="Результаты теста",
|
||||
size=22,
|
||||
weight=ft.FontWeight.BOLD,
|
||||
),
|
||||
]
|
||||
),
|
||||
self._content,
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
async def load(self):
|
||||
await self._content.load()
|
||||
Reference in New Issue
Block a user