2021-04-13 11:02:41 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
2020-08-27 13:46:34 +02:00
|
|
|
<script lang="ts">
|
2021-07-10 13:33:12 +02:00
|
|
|
import type { Scheduler } from "lib/proto";
|
2020-11-01 05:26:58 +01:00
|
|
|
import { buildNextLearnMsg } from "./lib";
|
2021-04-22 19:55:26 +02:00
|
|
|
import { bridgeLink } from "lib/bridgecommand";
|
2020-08-27 13:46:34 +02:00
|
|
|
|
2021-07-10 13:33:12 +02:00
|
|
|
export let info: Scheduler.CongratsInfoResponse;
|
2021-04-22 19:55:26 +02:00
|
|
|
import * as tr from "lib/i18n";
|
2020-08-27 13:46:34 +02:00
|
|
|
|
2021-03-26 11:23:43 +01:00
|
|
|
const congrats = tr.schedulingCongratulationsFinished();
|
2021-08-02 08:05:18 +02:00
|
|
|
let nextLearnMsg: string;
|
|
|
|
$: nextLearnMsg = buildNextLearnMsg(info);
|
2021-03-26 11:23:43 +01:00
|
|
|
const today_reviews = tr.schedulingTodayReviewLimitReached();
|
|
|
|
const today_new = tr.schedulingTodayNewLimitReached();
|
2020-08-27 13:46:34 +02:00
|
|
|
|
2021-03-26 11:23:43 +01:00
|
|
|
const unburyThem = bridgeLink("unbury", tr.schedulingUnburyThem());
|
|
|
|
const buriedMsg = tr.schedulingBuriedCardsFound({ unburyThem });
|
|
|
|
const customStudy = bridgeLink("customStudy", tr.schedulingCustomStudy());
|
|
|
|
const customStudyMsg = tr.schedulingHowToCustomStudy({
|
2020-08-27 13:46:34 +02:00
|
|
|
customStudy,
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<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>
|
2021-05-26 01:21:33 +02:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.congrats-outer {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.congrats-inner {
|
|
|
|
max-width: 30em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.description {
|
|
|
|
border: 1px solid var(--border);
|
|
|
|
padding: 1em;
|
|
|
|
}
|
|
|
|
</style>
|