diff options
Diffstat (limited to 'gui-project')
-rw-r--r-- | gui-project/cards.py | 8 | ||||
-rw-r--r-- | gui-project/main_ui.py | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/gui-project/cards.py b/gui-project/cards.py index ac921b3..ededff9 100644 --- a/gui-project/cards.py +++ b/gui-project/cards.py @@ -35,19 +35,19 @@ class CardUI(): def init_front(self): with self.row_parent: - with ui.card().classes('bg-frontc w-[600px] h-[200px] mx-auto') as self.front: + with ui.card().classes('bg-frontc w-[600px] mx-auto') as self.front: ui.markdown("**Front**") ui.separator() - ui.markdown(self.card.get_front()) + ui.markdown(self.card.get_front()).style('white-space: pre-wrap') ui.button("Revert", on_click=lambda: self.revert_card()) self.front.set_visibility(False) def init_back(self): with self.row_parent: - with ui.card().classes('bg-back w-[600px] h-[200px] mx-auto') as self.back: + with ui.card().classes('bg-back w-[600px] mx-auto') as self.back: ui.markdown("_Back_") ui.separator() - ui.markdown(self.card.get_back()) + ui.markdown(self.card.get_back()).style('white-space: pre-wrap') with ui.button_group(): ui.button("Got it", on_click=lambda: self.user_clicked_correct()) ui.button("Ain't got it", on_click=lambda: self.user_clicked_incorrect()) diff --git a/gui-project/main_ui.py b/gui-project/main_ui.py index de3d770..fcb1f5a 100644 --- a/gui-project/main_ui.py +++ b/gui-project/main_ui.py @@ -1,12 +1,9 @@ -from typing import final -from warnings import showwarning - from nicegui import ui import os import random import sys from cards import CardUI, CardComponent -from flashcards import Session, SCHEDULERS +from flashcards import Session FLASHCARDS_ROOT="/home/andreear/git/schwiizertuutsch/flashcards" STATE_FILE="/home/andreear/git/flashcards/state.txt" |