upgrade-rio-version (#1)
Co-authored-by: David Rodenkirchen <drodenkirchen@linetco.com> Reviewed-on: Vereins-IT/ez-lan-manager#1
This commit was merged in pull request #1.
This commit is contained in:
@@ -23,8 +23,8 @@ class CateringCartItem(Component):
|
||||
|
||||
def build(self) -> rio.Component:
|
||||
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)),
|
||||
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)
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ class CateringOrderItem(Component):
|
||||
def build(self) -> rio.Component:
|
||||
order_status, color = self.get_display_text_and_color_for_order_status(self.order_status)
|
||||
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(order_status, wrap=True, min_width=10, style=TextStyle(fill=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, 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)
|
||||
)
|
||||
|
||||
@@ -40,25 +40,25 @@ class CateringSelectionItem(Component):
|
||||
return Card(
|
||||
content=Column(
|
||||
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)),
|
||||
IconButton(
|
||||
icon="material/add",
|
||||
size=2,
|
||||
color=self.session.theme.success_color,
|
||||
style="plain",
|
||||
style="plain-text",
|
||||
on_press=lambda: self.on_add_callback(self.article_id),
|
||||
is_sensitive=self.is_sensitive
|
||||
),
|
||||
proportions=(19, 5, 2),
|
||||
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(
|
||||
Text(
|
||||
self.additional_info,
|
||||
align_x=0,
|
||||
wrap=True,
|
||||
overflow="wrap",
|
||||
min_width=19,
|
||||
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,
|
||||
font_size=1.3
|
||||
),
|
||||
wrap="ellipsize"
|
||||
overflow="ellipsize"
|
||||
),
|
||||
Text(
|
||||
self.date,
|
||||
@@ -31,7 +31,7 @@ class NewsPost(Component):
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=0.6
|
||||
),
|
||||
wrap=True
|
||||
overflow="wrap"
|
||||
)
|
||||
),
|
||||
Text(
|
||||
@@ -44,7 +44,7 @@ class NewsPost(Component):
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=0.8
|
||||
),
|
||||
wrap="ellipsize"
|
||||
overflow="ellipsize"
|
||||
),
|
||||
Text(
|
||||
self.text,
|
||||
@@ -52,7 +52,7 @@ class NewsPost(Component):
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color
|
||||
),
|
||||
wrap=True
|
||||
overflow="wrap"
|
||||
),
|
||||
Text(
|
||||
f"Geschrieben von {self.author}",
|
||||
@@ -66,7 +66,7 @@ class NewsPost(Component):
|
||||
font_size=0.5,
|
||||
italic=True
|
||||
),
|
||||
wrap=False
|
||||
overflow="nowrap"
|
||||
)
|
||||
),
|
||||
fill=self.session.theme.primary_color,
|
||||
|
||||
@@ -21,7 +21,7 @@ class SeatingPlanLegend(Component):
|
||||
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"", 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_height=1,
|
||||
@@ -36,7 +36,7 @@ class SeatingPlanLegend(Component):
|
||||
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"", 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_height=1,
|
||||
@@ -51,7 +51,7 @@ class SeatingPlanLegend(Component):
|
||||
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"", 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_height=1,
|
||||
|
||||
@@ -17,21 +17,21 @@ class SeatingPlanInfoBox(Component):
|
||||
if not self.show:
|
||||
return Spacer()
|
||||
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:
|
||||
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(
|
||||
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"{self.seat_occupant}", margin_bottom=1, style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.4), 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), overflow="wrap", justify="center"),
|
||||
min_height=10
|
||||
) 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(
|
||||
Text(
|
||||
f"Buchen",
|
||||
margin=1,
|
||||
style=TextStyle(fill=self.session.theme.neutral_color, font_size=1.1),
|
||||
wrap=True,
|
||||
overflow="wrap",
|
||||
justify="center"
|
||||
),
|
||||
shape="rounded",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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 src.ez_lan_manager.types.Seat import Seat
|
||||
@@ -20,11 +20,11 @@ class SeatPixel(Component):
|
||||
return self.session.theme.success_color
|
||||
|
||||
def build(self) -> Component:
|
||||
return MouseEventListener(
|
||||
return PointerEventListener(
|
||||
content=Rectangle(
|
||||
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.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_height=1,
|
||||
|
||||
@@ -29,17 +29,17 @@ class SeatingPurchaseBox(Component):
|
||||
if self.success_msg:
|
||||
return Column(
|
||||
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(
|
||||
Button(
|
||||
Text("Zurück",
|
||||
margin=1,
|
||||
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||
wrap=True,
|
||||
overflow="wrap",
|
||||
justify="center"
|
||||
),
|
||||
shape="rounded",
|
||||
style="plain",
|
||||
style="plain-text",
|
||||
on_press=self.cancel_cb
|
||||
)
|
||||
),
|
||||
@@ -49,17 +49,17 @@ class SeatingPurchaseBox(Component):
|
||||
if self.error_msg:
|
||||
return Column(
|
||||
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(
|
||||
Button(
|
||||
Text("Zurück",
|
||||
margin=1,
|
||||
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||
wrap=True,
|
||||
overflow="wrap",
|
||||
justify="center"
|
||||
),
|
||||
shape="rounded",
|
||||
style="plain",
|
||||
style="plain-text",
|
||||
on_press=self.cancel_cb
|
||||
)
|
||||
),
|
||||
@@ -67,24 +67,24 @@ class SeatingPurchaseBox(Component):
|
||||
)
|
||||
|
||||
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(
|
||||
Button(
|
||||
Text("Nein",
|
||||
margin=1,
|
||||
style=TextStyle(fill=self.session.theme.danger_color, font_size=1.1),
|
||||
wrap=True,
|
||||
overflow="wrap",
|
||||
justify="center"
|
||||
),
|
||||
shape="rounded",
|
||||
style="plain",
|
||||
style="plain-text",
|
||||
on_press=self.cancel_cb
|
||||
),
|
||||
Button(
|
||||
Text("Ja",
|
||||
margin=1,
|
||||
style=TextStyle(fill=self.session.theme.success_color, font_size=1.1),
|
||||
wrap=True,
|
||||
overflow="wrap",
|
||||
justify="center"
|
||||
),
|
||||
shape="rounded",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from asyncio import sleep, create_task
|
||||
|
||||
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.CateringOrderItem import CateringOrderItem
|
||||
@@ -111,7 +111,7 @@ class ShoppingCartAndOrders(Component):
|
||||
cart_container,
|
||||
Popup(
|
||||
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,
|
||||
position="center",
|
||||
color=self.session.theme.primary_color
|
||||
|
||||
@@ -58,7 +58,7 @@ class TicketBuyCard(Component):
|
||||
Column(
|
||||
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(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(
|
||||
progress_bar,
|
||||
tickets_side_text,
|
||||
|
||||
Reference in New Issue
Block a user