Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning found when running in Fire Fox #414

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/components/TextAppearanceSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ The navbar component. We have sliders that update reactively to both font size a
<!-- Sliders for when text appearence text size is implemented place holder no functionality-->
{#if showFontSize}
<div class="grid gap-4 items-center range-row m-2">
<TextAppearanceIcon color={$monoIconColor} size="1.5rem" />
<TextAppearanceIcon color={$monoIconColor} />
<Slider
bind:value={$bodyFontSize}
{barColor}
Expand All @@ -121,7 +121,7 @@ The navbar component. We have sliders that update reactively to both font size a
{/if}
{#if showLineHeight}
<div class="grid gap-4 items-center range-row m-2">
<ImageIcon.FormatLineSpacing color={$monoIconColor} size="1.5rem" />
<ImageIcon.FormatLineSpacing color={$monoIconColor} />
<Slider
bind:value={$bodyLineHeight}
{barColor}
Expand All @@ -136,7 +136,7 @@ The navbar component. We have sliders that update reactively to both font size a
{/if}
{#if showFonts}
<div class="grid gap-4 items-center range-row m-2">
<ImageIcon.FontChoice color={$monoIconColor} size="1.5rem" />
<ImageIcon.FontChoice color={$monoIconColor} />
<button
class="dy-btn-sm col-span-2 rounded"
style:border="1px dotted"
Expand Down
6 changes: 3 additions & 3 deletions src/lib/data/scripture.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { pk } from '$lib/data/stores/pk';
import config from '$lib/data/config';
// import { refs } from '$lib/data/stores/scripture';

export async function initProskomma() {
export async function initProskomma({ fetch }) {
let proskomma = get(pk);
if (!proskomma) {
proskomma = new Proskomma();
Expand All @@ -15,14 +15,14 @@ export async function initProskomma() {
if (!docSet) {
docSet = config.bookCollections[0].languageCode + '_' + config.bookCollections[0].id;
}
await loadDocSet(proskomma, docSet);
await loadDocSet(proskomma, docSet, fetch);
pk.set(proskomma);
}

return proskomma;
}

export async function loadDocSet(proskomma, docSet) {
export async function loadDocSet(proskomma, docSet, fetch) {
performance.mark('pk-fetch-start');
// console.log('fetch %o pkf', docSet);
const res = await fetch(`${base}/collections/${docSet}.pkf`).then((r) => {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+page.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { initProskomma } from '$lib/data/scripture';

/** @type {import('./$types').PageLoad} */
export function load({ url }) {
export function load({ url, fetch }) {
const ref = url.searchParams.get('ref');
const audio = url.searchParams.get('audio');
const proskomma = initProskomma();
const proskomma = initProskomma({ fetch });

return { ref, audio, proskomma };
}