fix login not working after registration

This commit was merged in pull request #57.
This commit is contained in:
David Rodenkirchen
2026-02-23 23:50:13 +01:00
parent edf1d70b54
commit ce45c389ef
6 changed files with 93 additions and 103 deletions
@@ -1,38 +0,0 @@
from asyncio import sleep
from rio import Text, Component, TextStyle
class AnimatedText(Component):
def __post_init__(self) -> None:
self._display_printing: list[bool] = [False]
self.text_comp = Text("")
async def display_text(self, success: bool, text: str, speed: float = 0.06, font_size: float = 0.9) -> None:
if self._display_printing[0]:
return
else:
self._display_printing[0] = True
self.text_comp.text = ""
if success:
self.text_comp.style = TextStyle(
fill=self.session.theme.success_color,
font_size=font_size
)
for c in text:
self.text_comp.text = self.text_comp.text + c
self.text_comp.force_refresh()
await sleep(speed)
else:
self.text_comp.style = TextStyle(
fill=self.session.theme.danger_color,
font_size=font_size
)
for c in text:
self.text_comp.text = self.text_comp.text + c
self.text_comp.force_refresh()
await sleep(speed)
self._display_printing[0] = False
def build(self) -> Component:
return self.text_comp
@@ -42,7 +42,7 @@ class CateringSelectionItem(Component):
content=Column(
Row(
Text(article_name_top, align_x=0, overflow="wrap", min_width=19,
style=TextStyle(fill=self.session.theme.background_color, font_size=0.9), strikethrough=not self.is_sensitive),
style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
Text(AccountingService.make_euro_string_from_decimal(self.article_price),
style=TextStyle(fill=self.session.theme.background_color, font_size=0.9)),
IconButton(
@@ -66,8 +66,7 @@ class CateringSelectionItem(Component):
align_x=0,
overflow="wrap",
min_width=19,
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6),
strikethrough=not self.is_sensitive
style=TextStyle(fill=self.session.theme.background_color, font_size=0.6)
),
margin_top=0
),