mirror of
https://github.com/RussellChamp/tpw-roller.git
synced 2026-10-28 08:32:34 +00:00
add dice sounds to all rollers
This commit is contained in:
1 parent
fe1074e863
commit
d9a976c5f1
12 files changed
+66
-21
No files matched your search
@@ -1,16 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { Button } from "sveltestrap";
|
||||
import { format as formatDate } from "date-fns";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
||||
import DungeonCard from "./DungeonCard.svelte";
|
||||
import { Dungeon, rollDungeon } from "../rollers/dungeons";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
export let rollResults: { dungeon: Dungeon; timestamp: string }[] = [];
|
||||
|
||||
function roll(event: Event) {
|
||||
let dungeon = rollDungeon();
|
||||
|
||||
rollResults = [{ dungeon, timestamp: formatDate(new Date(), "P kk:mm:ss") }, ...rollResults];
|
||||
dispatch("roll");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user