2020-08-27 13:46:34 +02:00
|
|
|
<script lang="ts">
|
2021-03-21 13:47:52 +01:00
|
|
|
import "../sass/core.css";
|
|
|
|
|
2020-11-05 02:01:30 +01:00
|
|
|
import { I18n } from "anki/i18n";
|
|
|
|
import pb from "anki/backend_proto";
|
2020-11-01 05:26:58 +01:00
|
|
|
import { buildNextLearnMsg } from "./lib";
|
2020-11-05 02:01:30 +01:00
|
|
|
import { bridgeLink } from "anki/bridgecommand";
|
2020-08-27 13:46:34 +02:00
|
|
|
|
|
|
|
export let info: pb.BackendProto.CongratsInfoOut;
|
|
|
|
export let i18n: I18n;
|
|
|
|
|
2021-03-26 10:13:20 +01:00
|
|
|
const congrats = i18n.schedulingCongratulationsFinished();
|
2020-08-27 13:46:34 +02:00
|
|
|
const nextLearnMsg = buildNextLearnMsg(info, i18n);
|
2021-03-26 10:13:20 +01:00
|
|
|
const today_reviews = i18n.schedulingTodayReviewLimitReached();
|
|
|
|
const today_new = i18n.schedulingTodayNewLimitReached();
|
2020-08-27 13:46:34 +02:00
|
|
|
|
2021-03-26 10:13:20 +01:00
|
|
|
const unburyThem = bridgeLink("unbury", i18n.schedulingUnburyThem());
|
2021-03-26 10:11:51 +01:00
|
|
|
const buriedMsg = i18n.schedulingBuriedCardsFound({ unburyThem });
|
2021-03-26 10:13:20 +01:00
|
|
|
const customStudy = bridgeLink("customStudy", i18n.schedulingCustomStudy());
|
2021-03-26 10:11:51 +01:00
|
|
|
const customStudyMsg = i18n.schedulingHowToCustomStudy({
|
2020-08-27 13:46:34 +02:00
|
|
|
customStudy,
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.congrats-outer {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.congrats-inner {
|
|
|
|
max-width: 30em;
|
|
|
|
}
|
2021-02-06 06:02:40 +01:00
|
|
|
|
|
|
|
.description {
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
padding: 1em;
|
|
|
|
}
|
2020-08-27 13:46:34 +02:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<div class="congrats-outer">
|
|
|
|
<div class="congrats-inner">
|
|
|
|
<h3>{congrats}</h3>
|
|
|
|
|
|
|
|
<p>{nextLearnMsg}</p>
|
|
|
|
|
|
|
|
{#if info.reviewRemaining}
|
|
|
|
<p>{today_reviews}</p>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if info.newRemaining}
|
|
|
|
<p>{today_new}</p>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
{#if info.bridgeCommandsSupported}
|
|
|
|
{#if info.haveSchedBuried || info.haveUserBuried}
|
|
|
|
<p>
|
|
|
|
{@html buriedMsg}
|
|
|
|
</p>
|
|
|
|
{/if}
|
|
|
|
|
2020-09-04 00:31:33 +02:00
|
|
|
{#if !info.isFilteredDeck}
|
|
|
|
<p>
|
|
|
|
{@html customStudyMsg}
|
|
|
|
</p>
|
|
|
|
{/if}
|
2020-08-27 13:46:34 +02:00
|
|
|
{/if}
|
2021-02-06 04:20:06 +01:00
|
|
|
|
2021-02-06 06:02:40 +01:00
|
|
|
{#if info.deckDescription}
|
|
|
|
<div class="description">
|
|
|
|
{@html info.deckDescription}
|
|
|
|
</div>
|
|
|
|
{/if}
|
2020-08-27 13:46:34 +02:00
|
|
|
</div>
|
|
|
|
</div>
|