Skip to content

Commit

Permalink
use base id for selected bible
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbitgood committed Dec 23, 2024
1 parent b6e86e4 commit 5865951
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/AudioPlayerProviders.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function harkSelect(id) {
}

return {
bible_id: id.split('_')[0],
bible_id: id,
bible_folder: id,
timestamps: timingFiles,
data: Array.from(booksMap.values())
Expand Down Expand Up @@ -149,7 +149,7 @@ export async function selectBible(ctx, id) {
const books = await harkSelect(id);
ctx.currentBooks = books;

const selectedBible = ctx.bibles.find(bible => bible.abbr === ctx.currentBooks.bible_id);
const selectedBible = ctx.bibles.find(bible => bible.id === ctx.currentBooks.bible_id);
ctx.currentBible = selectedBible;
const url = new URL(window.location);
url.searchParams.set('id', ctx.currentBible.id);
Expand Down
10 changes: 6 additions & 4 deletions src/demo/blue-theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Audio Player Test Page</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio,container-queries"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
</head>
Expand Down Expand Up @@ -388,13 +388,15 @@
titles: customized_titles,
classes: {
bibleButton: {
wrapper: 'flex flex-col text-white bg-[#21495E] hover:bg-[#DEAB6C] shadow-[2px_2px_0px_rgba(0,0,0,1)] active:bg-[#21495E] rounded-md',
wrapper: 'relative flex flex-col text-white bg-[#21495E] hover:bg-[#DEAB6C] shadow-[2px_2px_0px_rgba(0,0,0,1)] active:bg-[#21495E] rounded-md',
button: 'flex flex-col h-full w-full',
languageWrap: 'flex flex-row w-full justify-between items-center px-2 rounded-t-md bg-[#DEAB6C]',
language: 'text-sm font-bold text-white truncate',
iso: 'font-mono font-bold mt-1 text-xs text-gray-100',
titleWrap: 'py-1 h-full w-full flex flex-col-reverse justify-center items-center font-bold',
title: 'truncate text-center text-sm font-medium text-stone-200 font-bold',
vernacular: 'line-clamp-2 text-lg text-stone-100',
title: 'truncate text-ellipsis pl-4 pr-8 text-center text-sm font-medium text-stone-200 font-bold',
vernacular: 'truncate w-full pl-4 pr-8 py-1 text-ellipsis mx-8 text-lg text-stone-100',
download: 'absolute text-white right-0 bottom-0 rounded-tl size-8 flex justify-center items-center bg-[#DEAB6C]'
}
}
}).then(player => {});
Expand Down

0 comments on commit 5865951

Please sign in to comment.