added the text showing when anouncent and fixed that sv-poup is used but not in package.json
This commit is contained in:
parent
f95327b8fc
commit
a04c2a4faa
4 changed files with 35 additions and 22 deletions
18
package.json
18
package.json
|
@ -29,14 +29,14 @@
|
||||||
"tailwindcss": "^4.0.0",
|
"tailwindcss": "^4.0.0",
|
||||||
"vite": "^6.0.0"
|
"vite": "^6.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@supabase/supabase-js": "^2.49.4",
|
"@supabase/supabase-js": "^2.49.4",
|
||||||
"@sveltejs/adapter-static": "^3.0.8",
|
"@sveltejs/adapter-static": "^3.0.8",
|
||||||
"chart.js": "^4.4.9",
|
"chart.js": "^4.4.9",
|
||||||
"js-confetti": "^0.12.0",
|
"js-confetti": "^0.12.0",
|
||||||
"random-words": "^2.0.1",
|
"random-words": "^2.0.1",
|
||||||
"svelte-5-french-toast": "^2.0.4",
|
"sv-popup": "^0.5.3",
|
||||||
"word-exists": "^1.0.0"
|
"svelte-5-french-toast": "^2.0.4",
|
||||||
|
"word-exists": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
|
import { PlayingAnnouncement ,CurrentText} from "./logic/announcerData.svelte.js";
|
||||||
|
|
||||||
import List from "./components/CommonAnounceedTexts/list.svelte";
|
import List from "./components/CommonAnounceedTexts/list.svelte";
|
||||||
import Add from "./components/CustomText/add.svelte";
|
import Add from "./components/CustomText/add.svelte";
|
||||||
import CustomText from "./components/CustomText/CustomText.svelte";
|
import CustomText from "./components/CustomText/CustomText.svelte";
|
||||||
|
@ -10,11 +12,14 @@
|
||||||
|
|
||||||
<div class="flex h-full flex-col items-center justify-center gap-5 p-5">
|
<div class="flex h-full flex-col items-center justify-center gap-5 p-5">
|
||||||
<div class="w-fit rounded-2xl bg-gray-900 p-3">
|
<div class="w-fit rounded-2xl bg-gray-900 p-3">
|
||||||
<h1 class="text-center text-4xl">Most Announced announcements</h1>
|
{#if PlayingAnnouncement.v == true}
|
||||||
<List />
|
<p class="text-center text-5xl">{CurrentText.v}</p>
|
||||||
<hr class="my-5 w-full border-gray-600" />
|
{:else}
|
||||||
<h1 class="text-center text-4xl">Or announce something else</h1>
|
<h1 class="text-center text-4xl">Most Announced announcements</h1>
|
||||||
<CustomText />
|
<List />
|
||||||
<Add />
|
<hr class="my-5 w-full border-gray-600" />
|
||||||
|
<h1 class="text-center text-4xl">Or announce something else</h1>
|
||||||
|
<CustomText />
|
||||||
|
<Add />{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
|
import { PlayingAnnouncement } from "./announcerData.svelte.js";
|
||||||
|
|
||||||
export function AnnounceUsingTTS(text) {
|
export function AnnounceUsingTTS(text) {
|
||||||
window.speechSynthesis.speak(
|
PlayingAnnouncement.v = true;
|
||||||
Object.assign(new SpeechSynthesisUtterance(text), {
|
|
||||||
rate: 0.5,
|
const utterance = new SpeechSynthesisUtterance(text);
|
||||||
}),
|
utterance.rate = 0.5;
|
||||||
);
|
utterance.onend = () => {
|
||||||
|
PlayingAnnouncement.v = false;
|
||||||
|
};
|
||||||
|
window.speechSynthesis.speak(utterance);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,2 +1,3 @@
|
||||||
export let CurrentText = $state({ v: "" });
|
export let CurrentText = $state({ v: "" });
|
||||||
export let MostUsedAnnouncements = $state({ v: [] });
|
export let MostUsedAnnouncements = $state({ v: [] });
|
||||||
|
export let PlayingAnnouncement = $state({ v: false });
|
Loading…
Add table
Add a link
Reference in a new issue