rename users

This commit is contained in:
2026-03-31 18:10:12 +05:00
parent 59b3bcd0f4
commit 4e9b89fbe5
22 changed files with 1262 additions and 163 deletions

46
web/views/poll_view.py Normal file
View File

@@ -0,0 +1,46 @@
import flet as ft
import designer as ds
from views.content_users.poll_page import PollPage
class PollView(ft.View):
def __init__(self, page: ft.Page, poll_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"/take_test/{url_key}"),
)
self._content = PollPage(page, poll_id)
super().__init__(
route=f"/poll/{url_key}/{poll_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()