You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.4 KiB

<SignUpScreen>:
FloatLayout:
2 years ago
MDTopAppBar:
pos_hint: {"top": 1}
left_action_items: [['chevron-left', lambda x: root.go_back()]]
RoundedCard:
pos_hint: {"center_y": .5, "center_x": .5}
orientation: "vertical"
size_hint: 0.5, 0.5
md_bg_color: self.theme_cls.primary_color
padding: "10sp"
RoundedCard:
orientation: "vertical"
size_hint_y: 2
padding: "20sp"
DetailBox:
id: email
size_hint_x: .9
pos_hint: {"center_x": .5, "top": .7}
hint_text: "Email"
DetailBox:
id: password
size_hint_x: .9
pos_hint: {"center_x": .5, "top": .575}
hint_text: "Password"
password: True
disabled: True if not email.text else False
MDBoxLayout:
orientation: "horizontal"
spacing: "5sp"
Widget:
size_hint_y: 3
MyButton:
id: sign_in_button
text: "Sign in"
disabled: True if not email.text else False
md_bg_color: app.theme_cls.primary_light
theme_text_color: "Custom"
2 years ago
text_color: app.get_text_color(self.theme_cls.primary_light_hue)
on_press:
root.parent.current = "sign_in_screen"
root.parent.parent.ids.sign_in_screen.ids.email.text = email.text
root.parent.parent.ids.sign_in_screen.ids.password.text = password.text
MyButton:
text: "Create Account"
disabled: True if not email.text else False
2 years ago
on_press:
# Need to refer to the FirebaseLoginScreen
root.parent.parent.sign_up(email.text, password.text)
sign_in_button.disabled = True
root.parent.parent.display_loading_screen()
root.parent.parent.ids.sign_in_screen.ids.email.text = email.text
root.parent.parent.ids.sign_in_screen.ids.password.text = password.text