anki/ts/deck-options/CardStateCustomizer.svelte
Henrik Giesel 30bbbaf00b
Use eslint for sorting our imports (#1637)
* Make eslint sort our imports

* fix missing deps in eslint rule (dae)

Caught on Linux due to the stricter sandboxing

* Remove exports-last eslint rule (for now?)

* Adjust browserslist settings

- We use ResizeObserver which is not supported in browsers like KaiOS,
  Baidu or Android UC

* Raise minimum iOS version 13.4

- It's the first version that supports ResizeObserver

* Apply new eslint rules to sort imports
2022-02-04 18:36:34 +10:00

55 lines
1.3 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 Col from "../components/Col.svelte";
import Row from "../components/Row.svelte";
import * as tr from "../lib/ftl";
import RevertButton from "./RevertButton.svelte";
import TooltipLabel from "./TooltipLabel.svelte";
export let value: string;
</script>
<Row>
<Col>
<div class="text">
<TooltipLabel markdownTooltip={tr.deckConfigCustomSchedulingTooltip()}>
{tr.deckConfigCustomScheduling()}:</TooltipLabel
>
<RevertButton bind:value defaultValue="" />
</div>
</Col>
</Row>
<textarea
class="card-state-customizer form-control"
bind:value
spellcheck="false"
autocapitalize="none"
/>
<style lang="scss">
.text {
min-height: 2em;
}
.card-state-customizer {
color: var(--text-fg);
background-color: var(--frame-bg);
width: 100%;
height: 10em;
font-family: monospace;
}
@supports (-webkit-touch-callout: none) {
// mobile compat
.card-state-customizer {
font-size: 16px;
overflow-x: hidden;
}
}
</style>