Anki/ts/change-notetype/ChangeNotetypePage.svelte
Henrik Giesel 51af6b2544 Rename i18n and i18n_helpers to i18n-generated and i18n
- This way, we can restrict the awkwardness of importing files outside
  the ts directory within lib
2021-10-02 23:34:03 +02:00

34 lines
826 B
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 { tr } from "../lib/i18n";
import NotetypeSelector from "./NotetypeSelector.svelte";
import Mapper from "./Mapper.svelte";
import { ChangeNotetypeState, MapContext } from "./lib";
import marked from "marked";
export let state: ChangeNotetypeState;
let info = state.info;
</script>
<NotetypeSelector {state} />
<h5>{tr.changeNotetypeFields()}</h5>
<Mapper {state} ctx={MapContext.Field} />
<h5>{tr.changeNotetypeTemplates()}</h5>
{#if $info.templates}
<Mapper {state} ctx={MapContext.Template} />
{:else}
<div>{@html marked(tr.changeNotetypeToFromCloze())}</div>
{/if}
<style>
h5 {
margin-top: 1em;
}
</style>