diff --git a/rslib/backend.proto b/rslib/backend.proto index 6426dd4de..25ceddd45 100644 --- a/rslib/backend.proto +++ b/rslib/backend.proto @@ -1166,6 +1166,7 @@ message CongratsInfoOut { bool have_user_buried = 6; bool is_filtered_deck = 7; bool bridge_commands_supported = 8; + string deck_description = 9; } message UnburyCardsInCurrentDeckIn { diff --git a/rslib/src/sched/congrats.rs b/rslib/src/sched/congrats.rs index 841e66c65..c3cfaf2d5 100644 --- a/rslib/src/sched/congrats.rs +++ b/rslib/src/sched/congrats.rs @@ -2,6 +2,7 @@ // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html use crate::backend_proto as pb; +use crate::decks::DeckKind; use crate::prelude::*; #[derive(Debug)] @@ -21,6 +22,11 @@ impl Collection { let today = self.timing_today()?.days_elapsed; let info = self.storage.congrats_info(&deck, today)?; let is_filtered_deck = deck.is_filtered(); + let deck_description = if let DeckKind::Normal(normal) = &deck.kind { + normal.description.clone() + } else { + String::new() + }; let secs_until_next_learn = ((info.next_learn_due as i64) - self.learn_ahead_secs() as i64 - TimestampSecs::now().0) @@ -34,6 +40,7 @@ impl Collection { is_filtered_deck, secs_until_next_learn, bridge_commands_supported: true, + deck_description, }) } } diff --git a/ts/congrats/CongratsPage.svelte b/ts/congrats/CongratsPage.svelte index 829dfeebb..73d9b52a0 100644 --- a/ts/congrats/CongratsPage.svelte +++ b/ts/congrats/CongratsPage.svelte @@ -61,5 +61,7 @@

{/if} {/if} + + {@html info.deckDescription}