anki/ts/congrats/CongratsPage.svelte
Damien Elmes aea0a6fcc6 initial Bazel conversion
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:

- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00

66 lines
1.8 KiB
Svelte

<script lang="ts">
import { I18n } from "anki/ts/lib/i18n";
import pb from "anki/ts/lib/backend_proto";
import { buildNextLearnMsg } from "./lib";
import { bridgeLink } from "anki/ts/lib/bridgecommand";
export let info: pb.BackendProto.CongratsInfoOut;
export let i18n: I18n;
const congrats = i18n.tr(i18n.TR.SCHEDULING_CONGRATULATIONS_FINISHED);
const nextLearnMsg = buildNextLearnMsg(info, i18n);
const today_reviews = i18n.tr(i18n.TR.SCHEDULING_TODAY_REVIEW_LIMIT_REACHED);
const today_new = i18n.tr(i18n.TR.SCHEDULING_TODAY_NEW_LIMIT_REACHED);
const unburyThem = bridgeLink("unbury", i18n.tr(i18n.TR.SCHEDULING_UNBURY_THEM));
const buriedMsg = i18n.tr(i18n.TR.SCHEDULING_BURIED_CARDS_FOUND, { unburyThem });
const customStudy = bridgeLink(
"customStudy",
i18n.tr(i18n.TR.SCHEDULING_CUSTOM_STUDY)
);
const customStudyMsg = i18n.tr(i18n.TR.SCHEDULING_HOW_TO_CUSTOM_STUDY, {
customStudy,
});
</script>
<style>
.congrats-outer {
display: flex;
justify-content: center;
}
.congrats-inner {
max-width: 30em;
}
</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}
{#if !info.isFilteredDeck}
<p>
{@html customStudyMsg}
</p>
{/if}
{/if}
</div>
</div>