2021-04-12 06:18:30 +02:00
|
|
|
<!--
|
|
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
|
|
|
import ConfigSelector from "./ConfigSelector.svelte";
|
2021-05-29 17:32:12 +02:00
|
|
|
import Container from "components/Container.svelte";
|
2021-05-29 17:44:08 +02:00
|
|
|
import Item from "components/Item.svelte";
|
2021-05-29 17:32:12 +02:00
|
|
|
import DailyLimits from "./DailyLimits.svelte";
|
|
|
|
import DisplayOrder from "./DisplayOrder.svelte";
|
|
|
|
import NewOptions from "./NewOptions.svelte";
|
|
|
|
import AdvancedOptions from "./AdvancedOptions.svelte";
|
|
|
|
import BuryOptions from "./BuryOptions.svelte";
|
|
|
|
import LapseOptions from "./LapseOptions.svelte";
|
|
|
|
import TimerOptions from "./TimerOptions.svelte";
|
|
|
|
import AudioOptions from "./AudioOptions.svelte";
|
|
|
|
import Addons from "./Addons.svelte";
|
|
|
|
|
2021-04-25 10:40:02 +02:00
|
|
|
import type { DeckOptionsState } from "./lib";
|
2021-04-24 02:14:54 +02:00
|
|
|
import type { Writable } from "svelte/store";
|
|
|
|
import HtmlAddon from "./HtmlAddon.svelte";
|
2021-04-25 11:24:19 +02:00
|
|
|
import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent";
|
2021-04-12 06:18:30 +02:00
|
|
|
|
2021-04-25 10:40:02 +02:00
|
|
|
export let state: DeckOptionsState;
|
2021-04-24 02:14:54 +02:00
|
|
|
let addons = state.addonComponents;
|
|
|
|
|
|
|
|
export function auxData(): Writable<Record<string, unknown>> {
|
|
|
|
return state.currentAuxData;
|
|
|
|
}
|
|
|
|
|
2021-04-25 11:24:19 +02:00
|
|
|
export function addSvelteAddon(component: DynamicSvelteComponent): void {
|
|
|
|
$addons = [...$addons, component];
|
|
|
|
}
|
|
|
|
|
2021-04-24 02:14:54 +02:00
|
|
|
export function addHtmlAddon(html: string, mounted: () => void): void {
|
|
|
|
$addons = [
|
|
|
|
...$addons,
|
|
|
|
{
|
|
|
|
component: HtmlAddon,
|
|
|
|
html,
|
|
|
|
mounted,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|
2021-05-27 15:50:49 +02:00
|
|
|
|
|
|
|
export const options = {};
|
2021-05-29 17:32:12 +02:00
|
|
|
export const dailyLimits = {};
|
|
|
|
export const newOptions = {};
|
|
|
|
export const lapseOptions = {};
|
|
|
|
export const buryOptions = {};
|
|
|
|
export const displayOrder = {};
|
|
|
|
export const timerOptions = {};
|
|
|
|
export const audioOptions = {};
|
|
|
|
export const addonOptions = {};
|
|
|
|
export const advancedOptions = {};
|
2021-04-12 06:18:30 +02:00
|
|
|
</script>
|
|
|
|
|
2021-05-18 18:55:22 +02:00
|
|
|
<ConfigSelector {state} />
|
2021-05-29 17:32:12 +02:00
|
|
|
|
2021-07-06 03:43:40 +02:00
|
|
|
<div class="multi-column">
|
|
|
|
<Container api={options} class="g-1 mb-3 mt-3">
|
2021-05-29 17:44:08 +02:00
|
|
|
<Item>
|
2021-06-28 10:06:33 +02:00
|
|
|
<DailyLimits {state} api={dailyLimits} />
|
2021-05-29 17:44:08 +02:00
|
|
|
</Item>
|
2021-06-28 10:06:33 +02:00
|
|
|
|
|
|
|
<Item>
|
|
|
|
<NewOptions {state} api={newOptions} />
|
|
|
|
</Item>
|
|
|
|
|
|
|
|
<Item>
|
|
|
|
<LapseOptions {state} api={lapseOptions} />
|
|
|
|
</Item>
|
|
|
|
|
|
|
|
{#if state.v3Scheduler}
|
|
|
|
<Item>
|
|
|
|
<DisplayOrder {state} api={displayOrder} />
|
|
|
|
</Item>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<Item>
|
|
|
|
<TimerOptions {state} api={timerOptions} />
|
|
|
|
</Item>
|
|
|
|
|
2021-07-13 07:45:08 +02:00
|
|
|
<Item>
|
|
|
|
<BuryOptions {state} api={buryOptions} />
|
|
|
|
</Item>
|
|
|
|
|
2021-06-28 10:06:33 +02:00
|
|
|
<Item>
|
|
|
|
<AudioOptions {state} api={audioOptions} />
|
|
|
|
</Item>
|
|
|
|
|
|
|
|
<Item>
|
|
|
|
<Addons {state} api={addonOptions} />
|
|
|
|
</Item>
|
|
|
|
|
|
|
|
<Item>
|
|
|
|
<AdvancedOptions {state} api={advancedOptions} />
|
|
|
|
</Item>
|
2021-07-06 03:43:40 +02:00
|
|
|
</Container>
|
|
|
|
</div>
|
2021-06-28 10:06:33 +02:00
|
|
|
|
|
|
|
<style lang="scss">
|
2021-07-06 03:43:40 +02:00
|
|
|
.multi-column :global(.container) {
|
2021-06-28 10:06:33 +02:00
|
|
|
column-count: 2;
|
|
|
|
column-gap: 5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media (max-width: 1000px) {
|
2021-07-06 03:43:40 +02:00
|
|
|
.multi-column :global(.container) {
|
2021-06-28 10:06:33 +02:00
|
|
|
column-count: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|