mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
parent
f40d3a299f
commit
d668ac8f7f
2 changed files with 10 additions and 12 deletions
|
@ -3,7 +3,6 @@ Copyright: Ankitects Pty Ltd and contributors
|
||||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Container from "../components/Container.svelte";
|
|
||||||
import * as tr2 from "../lib/ftl";
|
import * as tr2 from "../lib/ftl";
|
||||||
import { Stats, unwrapOptionalNumber } from "../lib/proto";
|
import { Stats, unwrapOptionalNumber } from "../lib/proto";
|
||||||
import { Timestamp, timeSpan, DAY } from "../lib/time";
|
import { Timestamp, timeSpan, DAY } from "../lib/time";
|
||||||
|
@ -95,16 +94,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
$: statsRows = rowsFromStats(stats);
|
$: statsRows = rowsFromStats(stats);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Container>
|
<table class="stats-table">
|
||||||
<table class="stats-table">
|
|
||||||
{#each statsRows as row, _index}
|
{#each statsRows as row, _index}
|
||||||
<tr>
|
<tr>
|
||||||
<th style="text-align:start">{row.label}</th>
|
<th style="text-align:start">{row.label}</th>
|
||||||
<td>{row.value}</td>
|
<td>{row.value}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
</table>
|
</table>
|
||||||
</Container>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.stats-table {
|
.stats-table {
|
||||||
|
|
|
@ -15,7 +15,8 @@
|
||||||
// use #testXXXX where XXXX is card ID to test
|
// use #testXXXX where XXXX is card ID to test
|
||||||
if (window.location.hash.startsWith("#test")) {
|
if (window.location.hash.startsWith("#test")) {
|
||||||
const cid = parseInt(window.location.hash.substr("#test".length), 10);
|
const cid = parseInt(window.location.hash.substr("#test".length), 10);
|
||||||
anki.cardInfo(document.getElementById("main"), cid, true);
|
const cardInfo = anki.cardInfo(document.getElementById("main"));
|
||||||
|
cardInfo.then((c) => c.$set({ cardId: cid, includeRevlog: true }));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue