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:
2024-11-27 11:18:59 +00:00
parent 3c3fd878c5
commit 1a33ea69f2
30 changed files with 892 additions and 943 deletions
+22 -25
View File
@@ -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.components.AnimatedText import AnimatedText
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
from src.ez_lan_manager.pages import BasePage
MINIMUM_PASSWORD_LENGTH = 6
logger = logging.getLogger(__name__.split(".")[-1])
class RegisterPage(Component):
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:
@@ -21,7 +21,6 @@ class RegisterPage(Component):
self.pw_1.is_valid = True
self.pw_2.is_valid = True
def on_email_changed(self, change_event: TextInputChangeEvent) -> None:
try:
validate_email(change_event.text, check_deliverability=False)
@@ -154,28 +153,26 @@ class RegisterPage(Component):
margin_right=1,
margin_bottom=2
)
return BasePage(
content=Column(
MainViewContentBox(
content=Column(
Text(
"Neues Konto anlegen",
style=TextStyle(
fill=self.session.theme.background_color,
font_size=1.2
),
margin_top=2,
margin_bottom=2,
align_x=0.5
return Column(
MainViewContentBox(
content=Column(
Text(
"Neues Konto anlegen",
style=TextStyle(
fill=self.session.theme.background_color,
font_size=1.2
),
self.user_name_input,
self.email_input,
self.pw_1,
self.pw_2,
self.submit_button,
self.animated_text
)
),
align_y=0,
)
margin_top=2,
margin_bottom=2,
align_x=0.5
),
self.user_name_input,
self.email_input,
self.pw_1,
self.pw_2,
self.submit_button,
self.animated_text
)
),
align_y=0,
)