tweaked sounds on some buttons, renamed play_sound to playSound

This commit is contained in:
ari melody 2024-07-08 11:56:26 +01:00
parent 6e2e4e0c23
commit b9445cf832
Signed by: ari
GPG key ID: CF99829C92678188
8 changed files with 27 additions and 15 deletions

View file

@ -6,6 +6,7 @@
import { parsePost } from '$lib/post.js';
import { timeline } from '$lib/timeline.js';
import { createEventDispatcher } from 'svelte';
import { playSound } from '$lib/sound';
import Button from '@cf/ui/Button.svelte';
import PostIcon from '@cf/icons/post.svg';
@ -67,6 +68,8 @@
let new_post_parsed = await parsePost(new_post);
timeline.update(current => [new_post_parsed, ...current]);
playSound("post");
dispatch("compose_finished")
}
@ -140,7 +143,7 @@
</svelte:fragment>
</Button>
</div>
<Button filled={true} centered={true} class="postbtn" on:click={buildPost}>
<Button filled={true} centered={true} class="postbtn" on:click={buildPost} sound={false}>
<svelte:fragment slot="icon">
<PostIcon/>
</svelte:fragment>