Skip to content

Commit

Permalink
bug fix 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
zonetecde committed Dec 23, 2024
1 parent 587252d commit da69d2c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "Quran Caption",
"version": "2.6.0"
"version": "2.7.0"
},
"tauri": {
"allowlist": {
Expand Down
10 changes: 7 additions & 3 deletions src/lib/components/timeline/track/SubtitleClipComponent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
import { onMount } from 'svelte';
import { zoom } from '$lib/stores/TimelineStore';
import { generateRandomBrightColorBasedOnSeed } from '$lib/ext/Color';
import { getVerse } from '$lib/stores/QuranStore';
import { getVerse, Mushaf } from '$lib/stores/QuranStore';
export let clip: SubtitleClip;
let color: string = '#7cce79';
function handleClipClicked() {}
onMount(() => {
onMount(async () => {
// Wait for the Mushaf to be loaded (needed for the color generation)
while (!$Mushaf) {
await new Promise((resolve) => setTimeout(resolve, 100));
}
color = generateRandomBrightColorBasedOnSeed(getVerse(clip.surah, clip.verse).text);
console.log(color);
});
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/ext/GlobalVariables.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const SOFTWARE_VERSION = 'v2.6';
export const SOFTWARE_VERSION = 'v2.7';
export const GITHUB_API_URL =
'https://api.github.com/repos/zonetecde/QuranCaption-2/releases/latest';
export const GITHUB_REPO_LINK = 'https://github.com/zonetecde/QuranCaption-2';
Expand Down
1 change: 1 addition & 0 deletions src/lib/stores/QuranStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function getVerse(surahId: number, verseId: number) {
*/
export function getNumberOfVerses(surahId: number) {
const quran = get(Mushaf);

return quran.surahs[surahId - 1].total_verses;
}

Expand Down

0 comments on commit da69d2c

Please sign in to comment.