fix deprecation and import warnings/errors
This commit is contained in:
parent
3c3fd878c5
commit
d94e77154a
BIN
requirements.txt
BIN
requirements.txt
Binary file not shown.
@ -5,7 +5,7 @@ import sys
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from rio import App, Theme, Color, Font, Page, Session
|
from rio import App, Theme, Color, Font, ComponentPage, Session
|
||||||
from from_root import from_root
|
from from_root import from_root
|
||||||
|
|
||||||
from src.ez_lan_manager import pages, init_services
|
from src.ez_lan_manager import pages, init_services
|
||||||
@ -46,93 +46,93 @@ if __name__ == "__main__":
|
|||||||
app = App(
|
app = App(
|
||||||
name="EZ LAN Manager",
|
name="EZ LAN Manager",
|
||||||
pages=[
|
pages=[
|
||||||
Page(
|
ComponentPage(
|
||||||
name="News",
|
name="News",
|
||||||
page_url="",
|
url_segment="",
|
||||||
build=pages.NewsPage,
|
build=pages.NewsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="News",
|
name="News",
|
||||||
page_url="news",
|
url_segment="news",
|
||||||
build=pages.NewsPage,
|
build=pages.NewsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Overview",
|
name="Overview",
|
||||||
page_url="overview",
|
url_segment="overview",
|
||||||
build=lambda: pages.PlaceholderPage(placeholder_name="LAN Übersicht"),
|
build=lambda: pages.PlaceholderPage(placeholder_name="LAN Übersicht"),
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="BuyTicket",
|
name="BuyTicket",
|
||||||
page_url="buy_ticket",
|
url_segment="buy_ticket",
|
||||||
build=pages.BuyTicketPage,
|
build=pages.BuyTicketPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="SeatingPlan",
|
name="SeatingPlan",
|
||||||
page_url="seating",
|
url_segment="seating",
|
||||||
build=pages.SeatingPlanPage,
|
build=pages.SeatingPlanPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Catering",
|
name="Catering",
|
||||||
page_url="catering",
|
url_segment="catering",
|
||||||
build=pages.CateringPage,
|
build=pages.CateringPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Guests",
|
name="Guests",
|
||||||
page_url="guests",
|
url_segment="guests",
|
||||||
build=pages.GuestsPage,
|
build=pages.GuestsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Tournaments",
|
name="Tournaments",
|
||||||
page_url="tournaments",
|
url_segment="tournaments",
|
||||||
build=pages.TournamentsPage,
|
build=pages.TournamentsPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="FAQ",
|
name="FAQ",
|
||||||
page_url="faq",
|
url_segment="faq",
|
||||||
build=pages.FaqPage,
|
build=pages.FaqPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="RulesGTC",
|
name="RulesGTC",
|
||||||
page_url="rules-gtc",
|
url_segment="rules-gtc",
|
||||||
build=pages.RulesPage
|
build=pages.RulesPage
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Contact",
|
name="Contact",
|
||||||
page_url="contact",
|
url_segment="contact",
|
||||||
build=pages.ContactPage,
|
build=pages.ContactPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Imprint",
|
name="Imprint",
|
||||||
page_url="imprint",
|
url_segment="imprint",
|
||||||
build=pages.ImprintPage,
|
build=pages.ImprintPage,
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Register",
|
name="Register",
|
||||||
page_url="register",
|
url_segment="register",
|
||||||
build=pages.RegisterPage,
|
build=pages.RegisterPage,
|
||||||
guard=not_logged_in_guard
|
guard=not_logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="ForgotPassword",
|
name="ForgotPassword",
|
||||||
page_url="forgot-password",
|
url_segment="forgot-password",
|
||||||
build=pages.ForgotPasswordPage,
|
build=pages.ForgotPasswordPage,
|
||||||
guard=not_logged_in_guard
|
guard=not_logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="EditProfile",
|
name="EditProfile",
|
||||||
page_url="edit-profile",
|
url_segment="edit-profile",
|
||||||
build=pages.EditProfilePage,
|
build=pages.EditProfilePage,
|
||||||
guard=logged_in_guard
|
guard=logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="Account",
|
name="Account",
|
||||||
page_url="account",
|
url_segment="account",
|
||||||
build=pages.AccountPage,
|
build=pages.AccountPage,
|
||||||
guard=logged_in_guard
|
guard=logged_in_guard
|
||||||
),
|
),
|
||||||
Page(
|
ComponentPage(
|
||||||
name="DbErrorPage",
|
name="DbErrorPage",
|
||||||
page_url="db-error",
|
url_segment="db-error",
|
||||||
build=pages.DbErrorPage,
|
build=pages.DbErrorPage,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class CateringCartItem(Component):
|
|||||||
|
|
||||||
def build(self) -> rio.Component:
|
def build(self) -> rio.Component:
|
||||||
return Row(
|
return Row(
|
||||||
Text(self.ellipsize_string(self.article_name), align_x=0, wrap=True, min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(self.ellipsize_string(self.article_name), align_x=0, overflow="wrap", min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
IconButton(icon="material/close", size=2, color=self.session.theme.danger_color, style="plain", on_press=lambda: self.remove_item_cb(self.list_id)),
|
IconButton(icon="material/close", size=2, color=self.session.theme.danger_color, style="plain", on_press=lambda: self.remove_item_cb(self.list_id)),
|
||||||
proportions=(19, 5, 2)
|
proportions=(19, 5, 2)
|
||||||
|
|||||||
@ -32,7 +32,7 @@ class CateringOrderItem(Component):
|
|||||||
def build(self) -> rio.Component:
|
def build(self) -> rio.Component:
|
||||||
order_status, color = self.get_display_text_and_color_for_order_status(self.order_status)
|
order_status, color = self.get_display_text_and_color_for_order_status(self.order_status)
|
||||||
return Row(
|
return Row(
|
||||||
Text(f"ID: {str(self.order_id):0>6}", align_x=0, wrap=True, min_width=10, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), margin_right=1),
|
Text(f"ID: {str(self.order_id):0>6}", align_x=0, overflow="wrap", min_width=10, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), margin_right=1),
|
||||||
Text(order_status, wrap=True, min_width=10, style=TextStyle(fill=color, font_size=0.9), margin_right=1),
|
Text(order_status, overflow="wrap", min_width=10, style=TextStyle(fill=color, font_size=0.9), margin_right=1),
|
||||||
Text(self.order_datetime.strftime("%d.%m. %H:%M"), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), align_x=1)
|
Text(self.order_datetime.strftime("%d.%m. %H:%M"), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), align_x=1)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class CateringSelectionItem(Component):
|
|||||||
return Card(
|
return Card(
|
||||||
content=Column(
|
content=Column(
|
||||||
Row(
|
Row(
|
||||||
Text(article_name_top, align_x=0, wrap=True, min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(article_name_top, align_x=0, overflow="wrap", min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Text(AccountingService.make_euro_string_from_int(self.article_price), style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon="material/add",
|
icon="material/add",
|
||||||
@ -53,12 +53,12 @@ class CateringSelectionItem(Component):
|
|||||||
proportions=(19, 5, 2),
|
proportions=(19, 5, 2),
|
||||||
margin_bottom=0
|
margin_bottom=0
|
||||||
),
|
),
|
||||||
Spacer() if not article_name_bottom else Text(article_name_bottom, align_x=0, wrap=True, min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
Spacer() if not article_name_bottom else Text(article_name_bottom, align_x=0, overflow="wrap", min_width=19, style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
|
||||||
Row(
|
Row(
|
||||||
Text(
|
Text(
|
||||||
self.additional_info,
|
self.additional_info,
|
||||||
align_x=0,
|
align_x=0,
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
min_width=19,
|
min_width=19,
|
||||||
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6)
|
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6)
|
||||||
),
|
),
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class NewsPost(Component):
|
|||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=1.3
|
font_size=1.3
|
||||||
),
|
),
|
||||||
wrap="ellipsize"
|
overflow="ellipsize"
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
self.date,
|
self.date,
|
||||||
@ -31,7 +31,7 @@ class NewsPost(Component):
|
|||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=0.6
|
font_size=0.6
|
||||||
),
|
),
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
@ -44,7 +44,7 @@ class NewsPost(Component):
|
|||||||
fill=self.session.theme.background_color,
|
fill=self.session.theme.background_color,
|
||||||
font_size=0.8
|
font_size=0.8
|
||||||
),
|
),
|
||||||
wrap="ellipsize"
|
overflow="ellipsize"
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
self.text,
|
self.text,
|
||||||
@ -52,7 +52,7 @@ class NewsPost(Component):
|
|||||||
style=TextStyle(
|
style=TextStyle(
|
||||||
fill=self.session.theme.background_color
|
fill=self.session.theme.background_color
|
||||||
),
|
),
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
f"Geschrieben von {self.author}",
|
f"Geschrieben von {self.author}",
|
||||||
@ -66,7 +66,7 @@ class NewsPost(Component):
|
|||||||
font_size=0.5,
|
font_size=0.5,
|
||||||
italic=True
|
italic=True
|
||||||
),
|
),
|
||||||
wrap=False
|
overflow="nowrap"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
fill=self.session.theme.primary_color,
|
fill=self.session.theme.primary_color,
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class SeatingPlanLegend(Component):
|
|||||||
content=Column(
|
content=Column(
|
||||||
Text(f"Freier Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"Freier Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
||||||
selectable=False, wrap=True)
|
selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
@ -36,7 +36,7 @@ class SeatingPlanLegend(Component):
|
|||||||
content=Column(
|
content=Column(
|
||||||
Text(f"Belegter Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"Belegter Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
||||||
selectable=False, wrap=True)
|
selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
@ -51,7 +51,7 @@ class SeatingPlanLegend(Component):
|
|||||||
content=Column(
|
content=Column(
|
||||||
Text(f"Eigener Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"Eigener Platz", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
Text(f"", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5,
|
||||||
selectable=False, wrap=True)
|
selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
|
|||||||
@ -17,21 +17,21 @@ class SeatingPlanInfoBox(Component):
|
|||||||
if not self.show:
|
if not self.show:
|
||||||
return Spacer()
|
return Spacer()
|
||||||
if self.is_blocked:
|
if self.is_blocked:
|
||||||
return Column(Text(f"Sitzplatz gesperrt", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), wrap=True, justify="center"), min_height=10)
|
return Column(Text(f"Sitzplatz gesperrt", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), overflow="wrap", justify="center"), min_height=10)
|
||||||
if self.seat_id is None and self.seat_occupant is None:
|
if self.seat_id is None and self.seat_occupant is None:
|
||||||
return Column(Text(f"Sitzplatz auswählen...", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), wrap=True, justify="center"), min_height=10)
|
return Column(Text(f"Sitzplatz auswählen...", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), overflow="wrap", justify="center"), min_height=10)
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"Dieser Sitzplatz ({self.seat_id}) ist gebucht von:", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), wrap=True, justify="center"),
|
Text(f"Dieser Sitzplatz ({self.seat_id}) ist gebucht von:", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), overflow="wrap", justify="center"),
|
||||||
Text(f"{self.seat_occupant}", margin_bottom=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), wrap=True, justify="center"),
|
Text(f"{self.seat_occupant}", margin_bottom=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), overflow="wrap", justify="center"),
|
||||||
min_height=10
|
min_height=10
|
||||||
) if self.seat_id and self.seat_occupant else Column(
|
) if self.seat_id and self.seat_occupant else Column(
|
||||||
Text(f"Dieser Sitzplatz ({self.seat_id}) ist frei", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), wrap=True, justify="center"),
|
Text(f"Dieser Sitzplatz ({self.seat_id}) ist frei", margin=1, style=TextStyle(fill=self.session.theme.neutral_color), overflow="wrap", justify="center"),
|
||||||
Button(
|
Button(
|
||||||
Text(
|
Text(
|
||||||
f"Buchen",
|
f"Buchen",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, MouseEventListener, Column
|
from rio import Component, Text, Icon, TextStyle, Rectangle, Spacer, Color, PointerEventListener, Column
|
||||||
from typing import Optional, Callable
|
from typing import Optional, Callable
|
||||||
|
|
||||||
from src.ez_lan_manager.types.Seat import Seat
|
from src.ez_lan_manager.types.Seat import Seat
|
||||||
@ -20,11 +20,11 @@ class SeatPixel(Component):
|
|||||||
return self.session.theme.success_color
|
return self.session.theme.success_color
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return MouseEventListener(
|
return PointerEventListener(
|
||||||
content=Rectangle(
|
content=Rectangle(
|
||||||
content=Column(
|
content=Column(
|
||||||
Text(f"{self.seat_id}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
Text(f"{self.seat_id}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.7), align_x=0.5, selectable=False),
|
||||||
Text(f"{self.seat.category[0]}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5, selectable=False, wrap=True)
|
Text(f"{self.seat.category[0]}", style=TextStyle(fill=self.session.theme.primary_color, font_size=0.9), align_x=0.5, selectable=False, overflow="wrap")
|
||||||
),
|
),
|
||||||
min_width=1,
|
min_width=1,
|
||||||
min_height=1,
|
min_height=1,
|
||||||
|
|||||||
@ -29,13 +29,13 @@ class SeatingPurchaseBox(Component):
|
|||||||
if self.success_msg:
|
if self.success_msg:
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"{self.success_msg}", margin=1, style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
Text(f"{self.success_msg}", margin=1, style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||||
wrap=True, justify="center"),
|
overflow="wrap", justify="center"),
|
||||||
Row(
|
Row(
|
||||||
Button(
|
Button(
|
||||||
Text("Zurück",
|
Text("Zurück",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
@ -49,13 +49,13 @@ class SeatingPurchaseBox(Component):
|
|||||||
if self.error_msg:
|
if self.error_msg:
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"{self.error_msg}", margin=1, style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
Text(f"{self.error_msg}", margin=1, style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||||
wrap=True, justify="center"),
|
overflow="wrap", justify="center"),
|
||||||
Row(
|
Row(
|
||||||
Button(
|
Button(
|
||||||
Text("Zurück",
|
Text("Zurück",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
@ -67,13 +67,13 @@ class SeatingPurchaseBox(Component):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
Text(f"Sitzplatz {self.seat_id} verbindlich buchen?", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), wrap=True, justify="center"),
|
Text(f"Sitzplatz {self.seat_id} verbindlich buchen?", margin=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), overflow="wrap", justify="center"),
|
||||||
Row(
|
Row(
|
||||||
Button(
|
Button(
|
||||||
Text("Nein",
|
Text("Nein",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
@ -84,7 +84,7 @@ class SeatingPurchaseBox(Component):
|
|||||||
Text("Ja",
|
Text("Ja",
|
||||||
margin=1,
|
margin=1,
|
||||||
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
justify="center"
|
justify="center"
|
||||||
),
|
),
|
||||||
shape="rounded",
|
shape="rounded",
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from asyncio import sleep, create_task
|
from asyncio import sleep, create_task
|
||||||
|
|
||||||
import rio
|
import rio
|
||||||
from rio import Component, Column, Text, TextStyle, Button, Row, ScrollContainer, Spacer, Popup, PopupOpenOrCloseEvent
|
from rio import Component, Column, Text, TextStyle, Button, Row, ScrollContainer, Spacer, Popup
|
||||||
|
|
||||||
from src.ez_lan_manager.components.CateringCartItem import CateringCartItem
|
from src.ez_lan_manager.components.CateringCartItem import CateringCartItem
|
||||||
from src.ez_lan_manager.components.CateringOrderItem import CateringOrderItem
|
from src.ez_lan_manager.components.CateringOrderItem import CateringOrderItem
|
||||||
@ -111,7 +111,7 @@ class ShoppingCartAndOrders(Component):
|
|||||||
cart_container,
|
cart_container,
|
||||||
Popup(
|
Popup(
|
||||||
anchor=cart_container,
|
anchor=cart_container,
|
||||||
content=Text(self.popup_message, style=TextStyle(fill=self.session.theme.danger_color if self.popup_is_error else self.session.theme.success_color), wrap=True, margin=2, justify="center", min_width=20),
|
content=Text(self.popup_message, style=TextStyle(fill=self.session.theme.danger_color if self.popup_is_error else self.session.theme.success_color), overflow="wrap", margin=2, justify="center", min_width=20),
|
||||||
is_open=self.popup_is_shown,
|
is_open=self.popup_is_shown,
|
||||||
position="center",
|
position="center",
|
||||||
color=self.session.theme.primary_color
|
color=self.session.theme.primary_color
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class TicketBuyCard(Component):
|
|||||||
Column(
|
Column(
|
||||||
Text(self.description, margin_left=1, margin_top=1, style=ticket_description_style),
|
Text(self.description, margin_left=1, margin_top=1, style=ticket_description_style),
|
||||||
Text("Du besitzt dieses Ticket!", margin_left=1, margin_top=1, style=ticket_owned_style) if self.user_ticket is not None and self.user_ticket.category == self.category else Spacer(),
|
Text("Du besitzt dieses Ticket!", margin_left=1, margin_top=1, style=ticket_owned_style) if self.user_ticket is not None and self.user_ticket.category == self.category else Spacer(),
|
||||||
Text(self.additional_info, margin_left=1, margin_top=1, style=ticket_additional_info_style, wrap=True),
|
Text(self.additional_info, margin_left=1, margin_top=1, style=ticket_additional_info_style, overflow="wrap"),
|
||||||
Row(
|
Row(
|
||||||
progress_bar,
|
progress_bar,
|
||||||
tickets_side_text,
|
tickets_side_text,
|
||||||
|
|||||||
@ -95,7 +95,7 @@ class BuyTicketPage(Component):
|
|||||||
Text(
|
Text(
|
||||||
self.popup_message,
|
self.popup_message,
|
||||||
style=TextStyle(font_size=1.1, fill=self.session.theme.success_color if self.is_popup_success else self.session.theme.danger_color),
|
style=TextStyle(font_size=1.1, fill=self.session.theme.success_color if self.is_popup_success else self.session.theme.danger_color),
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
grow_y=True,
|
grow_y=True,
|
||||||
margin=1
|
margin=1
|
||||||
),
|
),
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class DbErrorPage(Component):
|
|||||||
fill=self.session.theme.danger_color,
|
fill=self.session.theme.danger_color,
|
||||||
font_size=1.3
|
font_size=1.3
|
||||||
),
|
),
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
color="secondary",
|
color="secondary",
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class FaqPage(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
grow_x=True,
|
grow_x=True,
|
||||||
|
|||||||
@ -85,7 +85,7 @@ class ForgotPasswordPage(Component):
|
|||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
margin_bottom=2,
|
margin_bottom=2,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
return BasePage(
|
return BasePage(
|
||||||
content=Column(
|
content=Column(
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class GuestsPage(Component):
|
|||||||
seat = None
|
seat = None
|
||||||
self.table_elements.append(
|
self.table_elements.append(
|
||||||
Button(
|
Button(
|
||||||
content=Row(Text(text=f"{user.user_id:0>4}", align_x=0, margin_right=1), Text(text=user.user_name, grow_x=True, wrap="ellipsize"), Text(text="-" if seat is None else seat.seat_id, align_x=1)),
|
content=Row(Text(text=f"{user.user_id:0>4}", align_x=0, margin_right=1), Text(text=user.user_name, grow_x=True, overflow="ellipsize"), Text(text="-" if seat is None else seat.seat_id, align_x=1)),
|
||||||
shape="rectangle",
|
shape="rectangle",
|
||||||
grow_x=True,
|
grow_x=True,
|
||||||
color=self.session.theme.hud_color if idx % 2 == 0 else self.session.theme.primary_color
|
color=self.session.theme.hud_color if idx % 2 == 0 else self.session.theme.primary_color
|
||||||
|
|||||||
@ -55,7 +55,7 @@ class ImprintPage(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=2,
|
margin=2,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -78,7 +78,7 @@ class ImprintPage(Component):
|
|||||||
),
|
),
|
||||||
margin_top=2,
|
margin_top=2,
|
||||||
margin_bottom=0,
|
margin_bottom=0,
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
align_x=0.5,
|
align_x=0.5,
|
||||||
grow_x=True,
|
grow_x=True,
|
||||||
min_width=30
|
min_width=30
|
||||||
@ -93,7 +93,7 @@ class ImprintPage(Component):
|
|||||||
),
|
),
|
||||||
margin_bottom=1,
|
margin_bottom=1,
|
||||||
margin_top=1,
|
margin_top=1,
|
||||||
wrap=True,
|
overflow="wrap",
|
||||||
align_x=0.5
|
align_x=0.5
|
||||||
),
|
),
|
||||||
target_url="https://ezgg-ev.de/privacy",
|
target_url="https://ezgg-ev.de/privacy",
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class RulesPage(Component):
|
|||||||
margin_bottom=0.8,
|
margin_bottom=0.8,
|
||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
) for idx, rule in enumerate(RULES)],
|
) for idx, rule in enumerate(RULES)],
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -117,7 +117,7 @@ class RulesPage(Component):
|
|||||||
margin_bottom=0.8,
|
margin_bottom=0.8,
|
||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
) for idx, rule in enumerate(AGB["§1"])]
|
) for idx, rule in enumerate(AGB["§1"])]
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -139,7 +139,7 @@ class RulesPage(Component):
|
|||||||
margin_bottom=0.8,
|
margin_bottom=0.8,
|
||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
) for idx, rule in enumerate(AGB["§2"])]
|
) for idx, rule in enumerate(AGB["§2"])]
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -161,7 +161,7 @@ class RulesPage(Component):
|
|||||||
margin_bottom=0.8,
|
margin_bottom=0.8,
|
||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
) for idx, rule in enumerate(AGB["§3"])]
|
) for idx, rule in enumerate(AGB["§3"])]
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -183,7 +183,7 @@ class RulesPage(Component):
|
|||||||
margin_bottom=0.8,
|
margin_bottom=0.8,
|
||||||
margin_left=1,
|
margin_left=1,
|
||||||
margin_right=1,
|
margin_right=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
) for idx, rule in enumerate(AGB["§4"])]
|
) for idx, rule in enumerate(AGB["§4"])]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class PAGENAME(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class TournamentsPage(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user