upgrade-rio-version #1
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
|
||||||
@ -45,94 +45,95 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
app = App(
|
app = App(
|
||||||
name="EZ LAN Manager",
|
name="EZ LAN Manager",
|
||||||
|
build=pages.BasePage,
|
||||||
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,8 +23,8 @@ 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-text", 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,25 +40,25 @@ 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",
|
||||||
size=2,
|
size=2,
|
||||||
color=self.session.theme.success_color,
|
color=self.session.theme.success_color,
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=lambda: self.on_add_callback(self.article_id),
|
on_press=lambda: self.on_add_callback(self.article_id),
|
||||||
is_sensitive=self.is_sensitive
|
is_sensitive=self.is_sensitive
|
||||||
),
|
),
|
||||||
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,17 +29,17 @@ 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",
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=self.cancel_cb
|
on_press=self.cancel_cb
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -49,17 +49,17 @@ 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",
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=self.cancel_cb
|
on_press=self.cancel_cb
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -67,24 +67,24 @@ 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",
|
||||||
style="plain",
|
style="plain-text",
|
||||||
on_press=self.cancel_cb
|
on_press=self.cancel_cb
|
||||||
),
|
),
|
||||||
Button(
|
Button(
|
||||||
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,
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
from asyncio import sleep
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from rio import Column, Component, event, Text, TextStyle, Button, Color, Spacer, Revealer, Row, ProgressCircle
|
from rio import Column, Component, event, Text, TextStyle, Button, Color, Spacer, Revealer, Row, ProgressCircle
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, AccountingService
|
from src.ez_lan_manager import ConfigurationService, UserService, AccountingService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.Transaction import Transaction
|
from src.ez_lan_manager.types.Transaction import Transaction
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
@ -28,8 +26,7 @@ class AccountPage(Component):
|
|||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if not self.user and not self.balance:
|
if not self.user and not self.balance:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
ProgressCircle(
|
ProgressCircle(
|
||||||
color="secondary",
|
color="secondary",
|
||||||
@ -40,7 +37,6 @@ class AccountPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
self.banking_info_revealer = Revealer(
|
self.banking_info_revealer = Revealer(
|
||||||
header=None,
|
header=None,
|
||||||
@ -127,8 +123,7 @@ class AccountPage(Component):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
content=Text(
|
content=Text(
|
||||||
f"Kontostand: {AccountingService.make_euro_string_from_int(self.balance)}",
|
f"Kontostand: {AccountingService.make_euro_string_from_int(self.balance)}",
|
||||||
@ -180,4 +175,3 @@ class AccountPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,14 +2,14 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import * # type: ignore
|
from typing import * # type: ignore
|
||||||
|
|
||||||
from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text
|
from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text, PageView
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, DatabaseService
|
from src.ez_lan_manager import ConfigurationService, DatabaseService
|
||||||
from src.ez_lan_manager.components.DesktopNavigation import DesktopNavigation
|
from src.ez_lan_manager.components.DesktopNavigation import DesktopNavigation
|
||||||
|
|
||||||
class BasePage(Component):
|
class BasePage(Component):
|
||||||
content: Component
|
color = "secondary"
|
||||||
|
corner_radius = (0, 0.5, 0, 0)
|
||||||
@event.periodic(60)
|
@event.periodic(60)
|
||||||
async def check_db_conn(self) -> None:
|
async def check_db_conn(self) -> None:
|
||||||
is_healthy = await self.session[DatabaseService].is_healthy()
|
is_healthy = await self.session[DatabaseService].is_healthy()
|
||||||
@ -21,11 +21,8 @@ class BasePage(Component):
|
|||||||
await self.force_refresh()
|
await self.force_refresh()
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if self.content is None:
|
|
||||||
content = Spacer()
|
|
||||||
else:
|
|
||||||
content = Card(
|
content = Card(
|
||||||
self.content,
|
PageView(),
|
||||||
color="secondary",
|
color="secondary",
|
||||||
min_width=38,
|
min_width=38,
|
||||||
corner_radius=(0, 0.5, 0, 0)
|
corner_radius=(0, 0.5, 0, 0)
|
||||||
|
|||||||
@ -1,14 +1,10 @@
|
|||||||
from asyncio import sleep
|
|
||||||
from functools import partial
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from rio import Text, Column, TextStyle, Component, event, TextInput, MultiLineTextInput, Row, Button, Card, Popup
|
from rio import Text, Column, TextStyle, Component, event, Button, Popup
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService, AccountingService, TicketingService
|
from src.ez_lan_manager import ConfigurationService, UserService, TicketingService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.components.TicketBuyCard import TicketBuyCard
|
from src.ez_lan_manager.components.TicketBuyCard import TicketBuyCard
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.services.AccountingService import InsufficientFundsError
|
from src.ez_lan_manager.services.AccountingService import InsufficientFundsError
|
||||||
from src.ez_lan_manager.services.TicketingService import TicketNotAvailableError, UserAlreadyHasTicketError
|
from src.ez_lan_manager.services.TicketingService import TicketNotAvailableError, UserAlreadyHasTicketError
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
@ -65,12 +61,10 @@ class BuyTicketPage(Component):
|
|||||||
self.is_popup_open = True
|
self.is_popup_open = True
|
||||||
await self.on_populate()
|
await self.on_populate()
|
||||||
|
|
||||||
|
|
||||||
async def on_popup_close_pressed(self) -> None:
|
async def on_popup_close_pressed(self) -> None:
|
||||||
self.is_popup_open = False
|
self.is_popup_open = False
|
||||||
self.popup_message = ""
|
self.popup_message = ""
|
||||||
|
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
ticket_infos = self.session[ConfigurationService].get_ticket_info()
|
ticket_infos = self.session[ConfigurationService].get_ticket_info()
|
||||||
header = Text(
|
header = Text(
|
||||||
@ -84,8 +78,7 @@ class BuyTicketPage(Component):
|
|||||||
align_x=0.5
|
align_x=0.5
|
||||||
)
|
)
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
header,
|
header,
|
||||||
@ -95,7 +88,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
|
||||||
),
|
),
|
||||||
@ -122,6 +115,4 @@ class BuyTicketPage(Component):
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
),
|
|
||||||
grow_x=True
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -6,7 +6,6 @@ from src.ez_lan_manager import ConfigurationService, CateringService
|
|||||||
from src.ez_lan_manager.components.CateringSelectionItem import CateringSelectionItem
|
from src.ez_lan_manager.components.CateringSelectionItem import CateringSelectionItem
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.components.ShoppingCartAndOrders import ShoppingCartAndOrders
|
from src.ez_lan_manager.components.ShoppingCartAndOrders import ShoppingCartAndOrders
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.CateringMenuItem import CateringMenuItemCategory, CateringMenuItem
|
from src.ez_lan_manager.types.CateringMenuItem import CateringMenuItemCategory, CateringMenuItem
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
|
|
||||||
@ -24,7 +23,6 @@ class CateringPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Catering")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Catering")
|
||||||
self.all_menu_items = await self.session[CateringService].get_menu()
|
self.all_menu_items = await self.session[CateringService].get_menu()
|
||||||
|
|
||||||
|
|
||||||
async def on_user_logged_in_status_changed(self) -> None:
|
async def on_user_logged_in_status_changed(self) -> None:
|
||||||
await self.force_refresh()
|
await self.force_refresh()
|
||||||
|
|
||||||
@ -35,7 +33,6 @@ class CateringPage(Component):
|
|||||||
def get_menu_items_by_category(all_menu_items: list[CateringMenuItem], category: Optional[CateringMenuItemCategory]) -> list[CateringMenuItem]:
|
def get_menu_items_by_category(all_menu_items: list[CateringMenuItem], category: Optional[CateringMenuItemCategory]) -> list[CateringMenuItem]:
|
||||||
return list(filter(lambda item: item.category == category, all_menu_items))
|
return list(filter(lambda item: item.category == category, all_menu_items))
|
||||||
|
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
user_id = self.session[SessionStorage].user_id
|
user_id = self.session[SessionStorage].user_id
|
||||||
if len(self.shopping_cart_and_orders) == 0:
|
if len(self.shopping_cart_and_orders) == 0:
|
||||||
@ -278,12 +275,10 @@ class CateringPage(Component):
|
|||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
# SHOPPING CART
|
# SHOPPING CART
|
||||||
shopping_cart_and_orders_container,
|
shopping_cart_and_orders_container,
|
||||||
# ITEM SELECTION
|
# ITEM SELECTION
|
||||||
*menu,
|
*menu,
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ from rio import Text, Column, TextStyle, Component, event, TextInput, MultiLineT
|
|||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
@ -105,8 +104,7 @@ class ContactPage(Component):
|
|||||||
color="primary",
|
color="primary",
|
||||||
on_press=self.on_send_pressed
|
on_press=self.on_send_pressed
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -129,6 +127,4 @@ class ContactPage(Component):
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
),
|
|
||||||
grow_x=True
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
@ -10,7 +10,6 @@ from email_validator import validate_email, EmailNotValidError
|
|||||||
from src.ez_lan_manager import ConfigurationService, UserService
|
from src.ez_lan_manager import ConfigurationService, UserService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
@ -18,6 +17,7 @@ from src.ez_lan_manager.types.User import User
|
|||||||
class EditProfilePage(Component):
|
class EditProfilePage(Component):
|
||||||
user: Optional[User] = None
|
user: Optional[User] = None
|
||||||
pfp: Optional[bytes] = None
|
pfp: Optional[bytes] = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def optional_date_to_str(d: Optional[date]) -> str:
|
def optional_date_to_str(d: Optional[date]) -> str:
|
||||||
if not d:
|
if not d:
|
||||||
@ -96,8 +96,7 @@ class EditProfilePage(Component):
|
|||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if not self.user:
|
if not self.user:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
ProgressCircle(
|
ProgressCircle(
|
||||||
color="secondary",
|
color="secondary",
|
||||||
@ -108,7 +107,6 @@ class EditProfilePage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
self.animated_text = AnimatedText(
|
self.animated_text = AnimatedText(
|
||||||
margin_top=2,
|
margin_top=2,
|
||||||
@ -175,8 +173,7 @@ class EditProfilePage(Component):
|
|||||||
margin_bottom=1
|
margin_bottom=1
|
||||||
)
|
)
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
content=Column(
|
content=Column(
|
||||||
self.pfp_image_container,
|
self.pfp_image_container,
|
||||||
@ -228,4 +225,3 @@ class EditProfilePage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,31 +2,38 @@ from rio import Column, Component, event, TextStyle, Text, Revealer
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
FAQ: list[list[str]] = [
|
FAQ: list[list[str]] = [
|
||||||
["Wie melde ich mich für die LAN an?", "Registriere dich auf dieser Seite, lade dein Guthabenkonto auf und kaufe ein Ticket. Danach such dir einen freien Sitzplatz auf dem Sitzplan aus."],
|
["Wie melde ich mich für die LAN an?",
|
||||||
["Wie lade ich mein Guthabenkonto auf?", "Logge dich in deinen Account ein und klicke auf die Schaltfläche 'Guthaben' in der Navigationsleiste. Dort findest du alle weiteren Informationen."],
|
"Registriere dich auf dieser Seite, lade dein Guthabenkonto auf und kaufe ein Ticket. Danach such dir einen freien Sitzplatz auf dem Sitzplan aus."],
|
||||||
|
["Wie lade ich mein Guthabenkonto auf?",
|
||||||
|
"Logge dich in deinen Account ein und klicke auf die Schaltfläche 'Guthaben' in der Navigationsleiste. Dort findest du alle weiteren Informationen."],
|
||||||
["Wie kann ich mein Ticket stornieren?", "Schreibe uns eine Mail an tech@ezgg-ev.de, wir kümmern uns dann Zeitnah um die Stornierung."],
|
["Wie kann ich mein Ticket stornieren?", "Schreibe uns eine Mail an tech@ezgg-ev.de, wir kümmern uns dann Zeitnah um die Stornierung."],
|
||||||
["Was soll ich zur LAN mitbringen?", "Deinen PC inklusive aller zugehörigen Geräte (Maus, Tastatur, Monitor, Headset), sowie aller Anschlusskabel. Wir empfehlen ein LAN Kabel von mindestens 5 Metern Länge mitzubringen. Des weiteren benötigste du eine Mehrfachsteckdose, da dir an deinem Platz nur ein einzelner Steckplatz zugewiesen wird."],
|
["Was soll ich zur LAN mitbringen?",
|
||||||
|
"Deinen PC inklusive aller zugehörigen Geräte (Maus, Tastatur, Monitor, Headset), sowie aller Anschlusskabel. Wir empfehlen ein LAN Kabel von mindestens 5 Metern Länge mitzubringen. Des weiteren benötigste du eine Mehrfachsteckdose, da dir an deinem Platz nur ein einzelner Steckplatz zugewiesen wird."],
|
||||||
["Wohin mit technischen Problemen?", "Melde dich einfach am Einlass bzw in der Orga-Ecke, wir helfen gerne weiter."],
|
["Wohin mit technischen Problemen?", "Melde dich einfach am Einlass bzw in der Orga-Ecke, wir helfen gerne weiter."],
|
||||||
["Wo entsorge ich meinen Müll?", "Im gesamten Veranstaltungsgebäude findest du Mülltüten/Mülleimer."],
|
["Wo entsorge ich meinen Müll?", "Im gesamten Veranstaltungsgebäude findest du Mülltüten/Mülleimer."],
|
||||||
["Darf ich Cannabis konsumieren?", "Generell verbieten wir den Konsum von Cannabis nicht. Beachte aber die allgemeine Gesetzeslage und ziehe ggf. die Bubatzkarte zu Rat."],
|
["Darf ich Cannabis konsumieren?", "Generell verbieten wir den Konsum von Cannabis nicht. Beachte aber die allgemeine Gesetzeslage und ziehe ggf. die Bubatzkarte zu Rat."],
|
||||||
["Gibt es einen Discord oder TeamSpeak?", "Du kannst gerne unseren Vereins-TeamSpeak3-Server unter ts3.ezgg-ev.de nutzen. Den Link zum offiziellen Discord findest du in der Navigationsleiste."],
|
["Gibt es einen Discord oder TeamSpeak?",
|
||||||
["Wo bleibt mein Essen?", "Vermutlich ist es auf dem Weg. Du kannst auf der Catering-Seite den Status deiner Bestellung überprüfen. Hast du Bedenken das sie verloren gegangen sein könnte, sprich ein Team-Mitglied an der Theke darauf an."],
|
"Du kannst gerne unseren Vereins-TeamSpeak3-Server unter ts3.ezgg-ev.de nutzen. Den Link zum offiziellen Discord findest du in der Navigationsleiste."],
|
||||||
["Wie lange dauert eine Aufladung per Überweißung?", "In der Regel wird das Guthaben deinem Konto innerhalb von 2 bis 3 Werktagen gutgeschrieben. In Ausnahmefällen kann es bis zu 7 Tagen dauern."],
|
["Wo bleibt mein Essen?",
|
||||||
["Wie melde ich meinen Clan an?", "Wenn in deiner Gruppe mehr als 3 Personen sind, dann schreib uns bitte eine Mail mit dem Betreff 'Gruppenticket' an tech@ezgg-ev.de. Schreibe uns dort die Nutzer-ID's sowie die Sitzplätze deiner Gruppe auf. Gehe sicher das jede Person in deiner Gruppe entweder bereits ein passendes Ticket besitzt oder über genug Guthaben verfügt um ein Ticket zu kaufen."],
|
"Vermutlich ist es auf dem Weg. Du kannst auf der Catering-Seite den Status deiner Bestellung überprüfen. Hast du Bedenken das sie verloren gegangen sein könnte, sprich ein Team-Mitglied an der Theke darauf an."],
|
||||||
["Wo kann ich schlafen?", "Im Veranstaltungsgebäude sind offizielle Schlafbereiche ausgewiesen. Solange du keine Zugangs-, Durchgangs-, oder Rettungswege blockierst, darfst du überall schlafen."]
|
["Wie lange dauert eine Aufladung per Überweißung?",
|
||||||
|
"In der Regel wird das Guthaben deinem Konto innerhalb von 2 bis 3 Werktagen gutgeschrieben. In Ausnahmefällen kann es bis zu 7 Tagen dauern."],
|
||||||
|
["Wie melde ich meinen Clan an?",
|
||||||
|
"Wenn in deiner Gruppe mehr als 3 Personen sind, dann schreib uns bitte eine Mail mit dem Betreff 'Gruppenticket' an tech@ezgg-ev.de. Schreibe uns dort die Nutzer-ID's sowie die Sitzplätze deiner Gruppe auf. Gehe sicher das jede Person in deiner Gruppe entweder bereits ein passendes Ticket besitzt oder über genug Guthaben verfügt um ein Ticket zu kaufen."],
|
||||||
|
["Wo kann ich schlafen?",
|
||||||
|
"Im Veranstaltungsgebäude sind offizielle Schlafbereiche ausgewiesen. Solange du keine Zugangs-, Durchgangs-, oder Rettungswege blockierst, darfst du überall schlafen."]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class FaqPage(Component):
|
class FaqPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
async def on_populate(self) -> None:
|
async def on_populate(self) -> None:
|
||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - FAQ")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - FAQ")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -48,7 +55,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,
|
||||||
@ -61,4 +68,3 @@ class FaqPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ from rio import Column, Component, event, Text, TextStyle, TextInput, TextInputC
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class ForgotPasswordPage(Component):
|
class ForgotPasswordPage(Component):
|
||||||
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
||||||
@ -85,10 +85,9 @@ 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 Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
content=Column(
|
content=Column(
|
||||||
Text(
|
Text(
|
||||||
@ -108,4 +107,3 @@ class ForgotPasswordPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -4,7 +4,6 @@ from rio import Column, Component, event, TextStyle, Text, Button, Row, TextInpu
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, UserService, TicketingService, SeatingService
|
from src.ez_lan_manager import ConfigurationService, UserService, TicketingService, SeatingService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.Seat import Seat
|
from src.ez_lan_manager.types.Seat import Seat
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
@ -51,15 +50,15 @@ 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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -84,7 +83,7 @@ class GuestsPage(Component):
|
|||||||
shape="rectangle",
|
shape="rectangle",
|
||||||
grow_x=True,
|
grow_x=True,
|
||||||
color=self.session.theme.primary_color,
|
color=self.session.theme.primary_color,
|
||||||
style="plain",
|
style="plain-text",
|
||||||
is_sensitive=False
|
is_sensitive=False
|
||||||
),
|
),
|
||||||
*self.table_elements,
|
*self.table_elements,
|
||||||
@ -93,4 +92,3 @@ class GuestsPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Text, Column, TextStyle, Component, event, Link, Color
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class ImprintPage(Component):
|
class ImprintPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
@ -10,8 +10,7 @@ class ImprintPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Impressum & DSGVO")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Impressum & DSGVO")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -55,7 +54,7 @@ class ImprintPage(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=2,
|
margin=2,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -78,7 +77,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 +92,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",
|
||||||
@ -102,6 +101,4 @@ class ImprintPage(Component):
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
),
|
|
||||||
grow_x=True
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,6 @@ from rio import Column, Component, event
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, NewsService
|
from src.ez_lan_manager import ConfigurationService, NewsService
|
||||||
from src.ez_lan_manager.components.NewsPost import NewsPost
|
from src.ez_lan_manager.components.NewsPost import NewsPost
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.types.News import News
|
from src.ez_lan_manager.types.News import News
|
||||||
|
|
||||||
|
|
||||||
@ -22,9 +21,7 @@ class NewsPage(Component):
|
|||||||
date=news.news_date.strftime("%d.%m.%Y"),
|
date=news.news_date.strftime("%d.%m.%Y"),
|
||||||
author=news.author.user_name
|
author=news.author.user_name
|
||||||
) for news in self.news_posts]
|
) for news in self.news_posts]
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
*posts,
|
*posts,
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Column, Component, event
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.NewsPost import NewsPost
|
from src.ez_lan_manager.components.NewsPost import NewsPost
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class PlaceholderPage(Component):
|
class PlaceholderPage(Component):
|
||||||
placeholder_name: str
|
placeholder_name: str
|
||||||
@ -12,8 +12,7 @@ class PlaceholderPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - {self.placeholder_name}")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - {self.placeholder_name}")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
NewsPost(
|
NewsPost(
|
||||||
title="Platzhalter",
|
title="Platzhalter",
|
||||||
text=f"Dies ist die Platzhalterseite für {self.placeholder_name}.",
|
text=f"Dies ist die Platzhalterseite für {self.placeholder_name}.",
|
||||||
@ -21,4 +20,3 @@ class PlaceholderPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -6,12 +6,12 @@ from rio import Column, Component, event, Text, TextStyle, TextInput, TextInputC
|
|||||||
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
from src.ez_lan_manager import ConfigurationService, UserService, MailingService
|
||||||
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
from src.ez_lan_manager.components.AnimatedText import AnimatedText
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
MINIMUM_PASSWORD_LENGTH = 6
|
MINIMUM_PASSWORD_LENGTH = 6
|
||||||
|
|
||||||
logger = logging.getLogger(__name__.split(".")[-1])
|
logger = logging.getLogger(__name__.split(".")[-1])
|
||||||
|
|
||||||
|
|
||||||
class RegisterPage(Component):
|
class RegisterPage(Component):
|
||||||
def on_pw_change(self, _: TextInputChangeEvent) -> None:
|
def on_pw_change(self, _: TextInputChangeEvent) -> None:
|
||||||
if not (self.pw_1.text == self.pw_2.text) or len(self.pw_1.text) < MINIMUM_PASSWORD_LENGTH:
|
if not (self.pw_1.text == self.pw_2.text) or len(self.pw_1.text) < MINIMUM_PASSWORD_LENGTH:
|
||||||
@ -21,7 +21,6 @@ class RegisterPage(Component):
|
|||||||
self.pw_1.is_valid = True
|
self.pw_1.is_valid = True
|
||||||
self.pw_2.is_valid = True
|
self.pw_2.is_valid = True
|
||||||
|
|
||||||
|
|
||||||
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
|
||||||
try:
|
try:
|
||||||
validate_email(change_event.text, check_deliverability=False)
|
validate_email(change_event.text, check_deliverability=False)
|
||||||
@ -154,8 +153,7 @@ class RegisterPage(Component):
|
|||||||
margin_right=1,
|
margin_right=1,
|
||||||
margin_bottom=2
|
margin_bottom=2
|
||||||
)
|
)
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
content=Column(
|
content=Column(
|
||||||
Text(
|
Text(
|
||||||
@ -178,4 +176,3 @@ class RegisterPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@ from rio import Column, Component, event, TextStyle, Text, Revealer
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
RULES: list[str] = [
|
RULES: list[str] = [
|
||||||
"Respektvolles Verhalten: Sei höflich und respektvoll gegenüber anderen Gästen und dem Team.",
|
"Respektvolles Verhalten: Sei höflich und respektvoll gegenüber anderen Gästen und dem Team.",
|
||||||
@ -44,14 +43,14 @@ AGB: dict[str, list[str]] = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class RulesPage(Component):
|
class RulesPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
async def on_populate(self) -> None:
|
async def on_populate(self) -> None:
|
||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Regeln & AGB")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Regeln & AGB")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -83,7 +82,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 +116,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 +138,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 +160,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 +182,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"])]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -191,4 +190,3 @@ class RulesPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,22 +2,21 @@ import logging
|
|||||||
from asyncio import sleep
|
from asyncio import sleep
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from rio import Text, Column, TextStyle, Component, event, PressEvent, ProgressCircle, Row, Image, Button, Spacer
|
from rio import Text, Column, TextStyle, Component, event, PressEvent, ProgressCircle
|
||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService, SeatingService, TicketingService, UserService
|
from src.ez_lan_manager import ConfigurationService, SeatingService, TicketingService, UserService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.components.SeatingPlan import SeatingPlan, SeatingPlanLegend
|
from src.ez_lan_manager.components.SeatingPlan import SeatingPlan, SeatingPlanLegend
|
||||||
from src.ez_lan_manager.components.SeatingPlanInfoBox import SeatingPlanInfoBox
|
from src.ez_lan_manager.components.SeatingPlanInfoBox import SeatingPlanInfoBox
|
||||||
from src.ez_lan_manager.components.SeatingPurchaseBox import SeatingPurchaseBox
|
from src.ez_lan_manager.components.SeatingPurchaseBox import SeatingPurchaseBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
from src.ez_lan_manager.services.SeatingService import NoTicketError, SeatNotFoundError, WrongCategoryError, SeatAlreadyTakenError
|
from src.ez_lan_manager.services.SeatingService import NoTicketError, SeatNotFoundError, WrongCategoryError, SeatAlreadyTakenError
|
||||||
from src.ez_lan_manager.types.Seat import Seat
|
from src.ez_lan_manager.types.Seat import Seat
|
||||||
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
from src.ez_lan_manager.types.SessionStorage import SessionStorage
|
||||||
from src.ez_lan_manager.types.User import User
|
from src.ez_lan_manager.types.User import User
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__.split(".")[-1])
|
logger = logging.getLogger(__name__.split(".")[-1])
|
||||||
|
|
||||||
|
|
||||||
class SeatingPlanPage(Component):
|
class SeatingPlanPage(Component):
|
||||||
seating_info: Optional[list[Seat]] = None
|
seating_info: Optional[list[Seat]] = None
|
||||||
current_seat_id: Optional[str] = None
|
current_seat_id: Optional[str] = None
|
||||||
@ -94,7 +93,6 @@ class SeatingPlanPage(Component):
|
|||||||
self.purchase_box_loading = False
|
self.purchase_box_loading = False
|
||||||
await self.on_populate()
|
await self.on_populate()
|
||||||
|
|
||||||
|
|
||||||
async def on_purchase_cancelled(self) -> None:
|
async def on_purchase_cancelled(self) -> None:
|
||||||
self.purchase_box_loading = False
|
self.purchase_box_loading = False
|
||||||
self.show_info_box = True
|
self.show_info_box = True
|
||||||
@ -102,11 +100,9 @@ class SeatingPlanPage(Component):
|
|||||||
self.purchase_box_error_msg = None
|
self.purchase_box_error_msg = None
|
||||||
self.purchase_box_success_msg = None
|
self.purchase_box_success_msg = None
|
||||||
|
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
if not self.seating_info:
|
if not self.seating_info:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
ProgressCircle(
|
ProgressCircle(
|
||||||
color="secondary",
|
color="secondary",
|
||||||
@ -117,13 +113,12 @@ class SeatingPlanPage(Component):
|
|||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
return Column(
|
||||||
return BasePage(
|
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
SeatingPlanInfoBox(seat_id=self.current_seat_id, seat_occupant=self.current_seat_occupant, seat_price=self.current_seat_price,
|
SeatingPlanInfoBox(seat_id=self.current_seat_id, seat_occupant=self.current_seat_occupant, seat_price=self.current_seat_price,
|
||||||
is_blocked=self.current_seat_is_blocked, is_booking_blocked=self.is_booking_blocked, show=self.show_info_box, purchase_cb=self.on_purchase_clicked),
|
is_blocked=self.current_seat_is_blocked, is_booking_blocked=self.is_booking_blocked, show=self.show_info_box,
|
||||||
|
purchase_cb=self.on_purchase_clicked),
|
||||||
SeatingPurchaseBox(
|
SeatingPurchaseBox(
|
||||||
show=self.show_purchase_box,
|
show=self.show_purchase_box,
|
||||||
seat_id=self.current_seat_id,
|
seat_id=self.current_seat_id,
|
||||||
@ -137,12 +132,11 @@ class SeatingPlanPage(Component):
|
|||||||
),
|
),
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
SeatingPlan(seat_clicked_cb=self.on_seat_clicked, seating_info=self.seating_info) if self.seating_info else
|
SeatingPlan(seat_clicked_cb=self.on_seat_clicked, seating_info=self.seating_info) if self.seating_info else
|
||||||
Column(ProgressCircle(color=self.session.theme.secondary_color, margin=3), Text("Sitzplan wird geladen", style=TextStyle(fill=self.session.theme.neutral_color), align_x=0.5, margin=1))
|
Column(ProgressCircle(color=self.session.theme.secondary_color, margin=3),
|
||||||
|
Text("Sitzplan wird geladen", style=TextStyle(fill=self.session.theme.neutral_color), align_x=0.5, margin=1))
|
||||||
),
|
),
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
SeatingPlanLegend(),
|
SeatingPlanLegend(),
|
||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
),
|
|
||||||
grow_x=True
|
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Column, Component, event, TextStyle, Text
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class PAGENAME(Component):
|
class PAGENAME(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
@ -10,8 +10,7 @@ class PAGENAME(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - PAGENAME")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - PAGENAME")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -31,10 +30,9 @@ class PAGENAME(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from rio import Column, Component, event, TextStyle, Text
|
|||||||
|
|
||||||
from src.ez_lan_manager import ConfigurationService
|
from src.ez_lan_manager import ConfigurationService
|
||||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||||
from src.ez_lan_manager.pages import BasePage
|
|
||||||
|
|
||||||
class TournamentsPage(Component):
|
class TournamentsPage(Component):
|
||||||
@event.on_populate
|
@event.on_populate
|
||||||
@ -10,8 +10,7 @@ class TournamentsPage(Component):
|
|||||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Turniere")
|
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Turniere")
|
||||||
|
|
||||||
def build(self) -> Component:
|
def build(self) -> Component:
|
||||||
return BasePage(
|
return Column(
|
||||||
content=Column(
|
|
||||||
MainViewContentBox(
|
MainViewContentBox(
|
||||||
Column(
|
Column(
|
||||||
Text(
|
Text(
|
||||||
@ -31,10 +30,9 @@ class TournamentsPage(Component):
|
|||||||
font_size=0.9
|
font_size=0.9
|
||||||
),
|
),
|
||||||
margin=1,
|
margin=1,
|
||||||
wrap=True
|
overflow="wrap"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
align_y=0
|
align_y=0
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user