Compare commits
2 Commits
28492688a5
...
7002b4437e
Author | SHA1 | Date | |
---|---|---|---|
7002b4437e | |||
73ed02eac8 |
53
main.py
53
main.py
@ -156,29 +156,38 @@ class FlashcardCreator:
|
||||
# Add file picker to page overlay
|
||||
page.overlay.append(self.file_picker)
|
||||
|
||||
# Update the page.add call to include the container instead of table directly
|
||||
page.add(
|
||||
ft.Row([self.source_dropdown, self.target_dropdown, self.settings_button]),
|
||||
ft.Divider(),
|
||||
ft.Text("Input Text", size=16, weight=ft.FontWeight.BOLD),
|
||||
self.input_text,
|
||||
self.process_button,
|
||||
ft.Divider(),
|
||||
ft.Text("Flashcard Information", size=16, weight=ft.FontWeight.BOLD),
|
||||
self.stack_name,
|
||||
self.stack_description,
|
||||
ft.Divider(),
|
||||
ft.Text("Generated Flashcards", size=16, weight=ft.FontWeight.BOLD),
|
||||
flashcard_table_container, # Use the container instead of direct table
|
||||
ft.Row(
|
||||
[
|
||||
self.add_to_anki_button,
|
||||
self.export_yaml_button,
|
||||
self.export_csv_button,
|
||||
]
|
||||
),
|
||||
# Create a scrollable column for the main content
|
||||
main_content = ft.Column(
|
||||
[
|
||||
ft.Row(
|
||||
[self.source_dropdown, self.target_dropdown, self.settings_button]
|
||||
),
|
||||
ft.Divider(),
|
||||
ft.Text("Input Text", size=16, weight=ft.FontWeight.BOLD),
|
||||
self.input_text,
|
||||
self.process_button,
|
||||
ft.Divider(),
|
||||
ft.Text("Flashcard Information", size=16, weight=ft.FontWeight.BOLD),
|
||||
self.stack_name,
|
||||
self.stack_description,
|
||||
ft.Divider(),
|
||||
ft.Text("Generated Flashcards", size=16, weight=ft.FontWeight.BOLD),
|
||||
flashcard_table_container,
|
||||
ft.Row(
|
||||
[
|
||||
self.add_to_anki_button,
|
||||
self.export_yaml_button,
|
||||
self.export_csv_button,
|
||||
]
|
||||
),
|
||||
],
|
||||
scroll=ft.ScrollMode.AUTO,
|
||||
expand=True,
|
||||
)
|
||||
|
||||
# Add the scrollable content to the page
|
||||
page.add(main_content)
|
||||
|
||||
def on_source_language_change(self, e):
|
||||
self.source_language = e.control.value
|
||||
|
||||
@ -212,7 +221,7 @@ class FlashcardCreator:
|
||||
f,
|
||||
)
|
||||
|
||||
e.close(dialog)
|
||||
e.page.close(dialog)
|
||||
e.page.update()
|
||||
|
||||
# Load settings if they exist
|
||||
|
Loading…
Reference in New Issue
Block a user