summaryrefslogtreecommitdiffstats
path: root/gui-project/cards.py
diff options
context:
space:
mode:
Diffstat (limited to 'gui-project/cards.py')
-rw-r--r--gui-project/cards.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gui-project/cards.py b/gui-project/cards.py
index 42a08b0..1bb4320 100644
--- a/gui-project/cards.py
+++ b/gui-project/cards.py
@@ -29,6 +29,7 @@ class CardUI():
self.card = card
self.is_resolved = asyncio.Event()
self.init_card()
+ self.correctly_answered = False
def init_card(self):
with self.parent_ui:
@@ -38,7 +39,7 @@ class CardUI():
def init_front(self):
with self.row_parent:
- with ui.card().classes('bg-frontc') as self.front:
+ with ui.card().classes('bg-frontc w-[600px] h-[200px] mx-auto') as self.front:
ui.markdown("**Front**")
ui.separator()
ui.markdown(self.card.get_front())
@@ -47,7 +48,7 @@ class CardUI():
def init_back(self):
with self.row_parent:
- with ui.card().classes('bg-back') as self.back:
+ with ui.card().classes('bg-back w-[600px] h-[200px] mx-auto') as self.back:
ui.markdown("_Back_")
ui.separator()
ui.markdown(self.card.get_back())
@@ -65,15 +66,14 @@ class CardUI():
self.back.set_visibility(True)
def revert_card(self):
- ui.notify("Showing back")
self.show_back()
def user_clicked_correct(self):
ui.notify("You got this")
+ self.correctly_answered = True
self.is_resolved.set()
def user_clicked_incorrect(self):
- ui.notify("Keep at it!")
self.is_resolved.set()
async def is_answered(self):