new intarfece
This commit is contained in:
@@ -8,12 +8,12 @@ class ResponsePage(ft.Column):
|
||||
def __init__(self, page: ft.Page, response_id: str):
|
||||
self._page = page
|
||||
self._response_id = response_id
|
||||
self._loading = ft.ProgressRing(width=40, height=40, color=ds.clolors.laer1)
|
||||
self._loading = ft.ProgressRing(width=ds.s(40), height=ds.s(40), color=ds.clolors.laer1)
|
||||
|
||||
super().__init__(
|
||||
alignment=ft.MainAxisAlignment.START,
|
||||
horizontal_alignment=ft.CrossAxisAlignment.STRETCH,
|
||||
spacing=8,
|
||||
spacing=ds.s(8),
|
||||
controls=[
|
||||
ft.Row(alignment=ft.MainAxisAlignment.CENTER, controls=[self._loading])
|
||||
],
|
||||
@@ -43,8 +43,8 @@ class ResponsePage(ft.Column):
|
||||
|
||||
controls: list[ft.Control] = [
|
||||
ft.Container(
|
||||
padding=ft.padding.only(bottom=8),
|
||||
content=ft.Column(spacing=4, controls=[
|
||||
padding=ft.padding.only(bottom=ds.s(8)),
|
||||
content=ft.Column(spacing=ds.s(4), controls=[
|
||||
ds.CastomText(text=poll.get("title", ""), size=20, weight=ft.FontWeight.BOLD),
|
||||
ds.CastomText(text=f"Пройден: {submitted_at}", size=12),
|
||||
]),
|
||||
@@ -61,12 +61,12 @@ class ResponsePage(ft.Column):
|
||||
await self._page.launch_url(_url)
|
||||
|
||||
controls.append(ft.Container(
|
||||
border_radius=16,
|
||||
padding=12,
|
||||
border_radius=ds.s(16),
|
||||
padding=ds.s(12),
|
||||
bgcolor=ds.clolors.laer3,
|
||||
content=ft.Column(
|
||||
horizontal_alignment=ft.CrossAxisAlignment.CENTER,
|
||||
spacing=10,
|
||||
spacing=ds.s(10),
|
||||
controls=[
|
||||
ds.CastomText(text="Результат", size=16, weight=ft.FontWeight.BOLD),
|
||||
ft.Container(
|
||||
@@ -74,7 +74,7 @@ class ResponsePage(ft.Column):
|
||||
content=ft.Image(
|
||||
src=data_uri,
|
||||
expand=True,
|
||||
height=380,
|
||||
height=ds.s(380),
|
||||
fit=ft.BoxFit.CONTAIN,
|
||||
),
|
||||
),
|
||||
@@ -103,23 +103,23 @@ class ResponsePage(ft.Column):
|
||||
for c in q.get("choices", []):
|
||||
is_selected = c["id"] == answer.get("choice_id")
|
||||
choice_rows.append(ft.Container(
|
||||
border_radius=8,
|
||||
padding=ft.padding.symmetric(horizontal=12, vertical=6),
|
||||
border_radius=ds.s(8),
|
||||
padding=ft.padding.symmetric(horizontal=ds.s(12), vertical=ds.s(6)),
|
||||
bgcolor=ds.clolors.laer1 if is_selected else ds.clolors.laer3,
|
||||
content=ft.Row(spacing=8, controls=[
|
||||
content=ft.Row(spacing=ds.s(8), controls=[
|
||||
ft.Icon(
|
||||
ft.Icons.CHECK_CIRCLE if is_selected else ft.Icons.RADIO_BUTTON_UNCHECKED,
|
||||
color=ds.clolors.ferst, size=16,
|
||||
color=ds.clolors.ferst, size=ds.s(16),
|
||||
),
|
||||
ft.Container(expand=True, content=ds.CastomText(text=c["text"], size=13)),
|
||||
]),
|
||||
))
|
||||
|
||||
answer_cards.append(ft.Container(
|
||||
border_radius=12,
|
||||
padding=16,
|
||||
border_radius=ds.s(12),
|
||||
padding=ds.s(16),
|
||||
bgcolor=ds.clolors.laer2,
|
||||
content=ft.Column(spacing=8, controls=[
|
||||
content=ft.Column(spacing=ds.s(8), controls=[
|
||||
ds.CastomText(text=q.get("text", ""), size=14, weight=ft.FontWeight.BOLD),
|
||||
*choice_rows,
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user