0026506543
- prettier's formatting has changed, so files needed to be reformatted - dart is spitting out deprecation warnings like: 254 │ 2: $spacer / 2, │ ^^^^^^^^^^^ ╵ bazel-out/darwin-fastbuild/bin/ts/sass/bootstrap/_variables.scss 254:6 @import ts/sass/button_mixins.scss 2:9 @use ts/components/ColorPicker.svelte 2:5 root stylesheet DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0. Recommendation: math.div($grid-gutter-width, 2)
77 lines
2.0 KiB
Svelte
77 lines
2.0 KiB
Svelte
<!--
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
-->
|
|
<script lang="ts">
|
|
import type pb from "lib/backend_proto";
|
|
import { buildNextLearnMsg } from "./lib";
|
|
import { bridgeLink } from "lib/bridgecommand";
|
|
|
|
export let info: pb.BackendProto.CongratsInfoOut;
|
|
import * as tr from "lib/i18n";
|
|
|
|
const congrats = tr.schedulingCongratulationsFinished();
|
|
const nextLearnMsg = buildNextLearnMsg(info);
|
|
const today_reviews = tr.schedulingTodayReviewLimitReached();
|
|
const today_new = tr.schedulingTodayNewLimitReached();
|
|
|
|
const unburyThem = bridgeLink("unbury", tr.schedulingUnburyThem());
|
|
const buriedMsg = tr.schedulingBuriedCardsFound({ unburyThem });
|
|
const customStudy = bridgeLink("customStudy", tr.schedulingCustomStudy());
|
|
const customStudyMsg = tr.schedulingHowToCustomStudy({
|
|
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}
|
|
|
|
{#if !info.isFilteredDeck}
|
|
<p>
|
|
{@html customStudyMsg}
|
|
</p>
|
|
{/if}
|
|
{/if}
|
|
|
|
{#if info.deckDescription}
|
|
<div class="description">
|
|
{@html info.deckDescription}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.congrats-outer {
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
|
|
.congrats-inner {
|
|
max-width: 30em;
|
|
}
|
|
|
|
.description {
|
|
border: 1px solid var(--border);
|
|
padding: 1em;
|
|
}
|
|
</style>
|