mirror of
https://github.com/harivansh-afk/veet-code.git
synced 2026-04-16 21:03:47 +00:00
fix problem diff
This commit is contained in:
parent
6fd9f258a6
commit
800d1b7792
1 changed files with 8 additions and 3 deletions
|
|
@ -256,9 +256,14 @@ class ProblemListScreen(Screen):
|
||||||
return
|
return
|
||||||
|
|
||||||
for p in self.problems:
|
for p in self.problems:
|
||||||
diff_char = {"easy": "Easy", "medium": "Medium", "hard": "Hard"}.get(p.difficulty, "?")
|
diff_colors = {
|
||||||
check = "✓ " if p.name in self.solved else " "
|
"easy": "[green]Easy[/green]",
|
||||||
ol.add_option(Option(f"{check}[{diff_char}] {p.name}", id=p.name))
|
"medium": "[yellow]Medium[/yellow]",
|
||||||
|
"hard": "[red]Hard[/red]",
|
||||||
|
}
|
||||||
|
diff = diff_colors.get(p.difficulty, "?")
|
||||||
|
check = "[green]✓[/green] " if p.name in self.solved else " "
|
||||||
|
ol.add_option(Option(f"{check}{diff} {p.name}", id=p.name))
|
||||||
|
|
||||||
def action_rescan(self) -> None:
|
def action_rescan(self) -> None:
|
||||||
self.load_problems()
|
self.load_problems()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue