fixes consumption of user preferences store
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { audio, episode_progress, type AudioLoadData } from '$lib';
|
||||
import { audio, episode_progress, user_preferences, type AudioLoadData } from '$lib';
|
||||
|
||||
const sources = {
|
||||
syntax: {
|
||||
@@ -22,7 +22,8 @@
|
||||
|
||||
<h1>Demo</h1>
|
||||
<a href="/another-page">Another Page</a>
|
||||
<button type="button" on:click={episode_progress.save_all}>save</button>
|
||||
<button type="button" on:click={episode_progress.save_all}>Save progress</button>
|
||||
<button type="button" on:click={user_preferences.save}>Save preferences</button>
|
||||
|
||||
<h5>Load Audio</h5>
|
||||
<button
|
||||
@@ -67,5 +68,7 @@
|
||||
<h6>Playback Rate</h6>
|
||||
|
||||
{#each [0.5, 1, 2, 3] as rate}
|
||||
<button type="button" on:click={() => audio.setPlaybackRate(rate)}>{rate}x</button>
|
||||
<button type="button" on:click={() => user_preferences.set({ playback_rate: rate })}
|
||||
>{rate}x</button
|
||||
>
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user