diff --git a/qt/aqt/overview.py b/qt/aqt/overview.py index a11473e2f..84c5e2f75 100644 --- a/qt/aqt/overview.py +++ b/qt/aqt/overview.py @@ -221,25 +221,38 @@ class Overview: def _table(self) -> str | None: counts = list(self.mw.col.sched.counts()) + tree_counts = self.mw.col.sched.deck_due_tree( + self.mw.col.decks.get_current_id() + ) but = self.mw.button - return """ + buried_new = tree_counts.new_count - counts[0] + buried_learning = tree_counts.learn_count - counts[1] + buried_review = tree_counts.review_count - counts[2] + buried_label = tr.browsing_buried() + + def number_row(title: str, klass: str, count: int, buried_count: int) -> str: + return f""" + + {title}: + + + {count} + {buried_count or ""} + + + +""" + + return f"""
- - - +{number_row(tr.actions_new(), "new-count", counts[0], buried_new)} +{number_row(tr.scheduling_learning(), "learn-count", counts[1], buried_learning)} +{number_row(tr.studying_to_review(), "review-count", counts[2], buried_review)}
{}:{}
{}:{}
{}:{}
-{}
""".format( - tr.actions_new(), - counts[0], - tr.scheduling_learning(), - counts[1], - tr.studying_to_review(), - counts[2], - but("study", tr.studying_study_now(), id="study", extra=" autofocus"), - ) +{but("study", tr.studying_study_now(), id="study", extra=" autofocus")}""" _body = """
diff --git a/sass/card-counts.scss b/sass/card-counts.scss index 86bb2a520..767aec7e3 100644 --- a/sass/card-counts.scss +++ b/sass/card-counts.scss @@ -13,3 +13,17 @@ .zero-count { color: var(--zero-count); } + +.bury-count { + color: var(--disabled); + font-weight: bold; + margin-inline-start: 2px; + + &::before { + content: "+"; + } + + &:empty { + display: none; + } +}