Skip to content

Commit

Permalink
rebuild for progress
Browse files Browse the repository at this point in the history
  • Loading branch information
wkelly17 committed Feb 5, 2025
1 parent 063c9ed commit c9feb15
Show file tree
Hide file tree
Showing 10 changed files with 680 additions and 659 deletions.
2 changes: 2 additions & 0 deletions public/_routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"/fr/ressources/langues",
"/fr/les-ressources/langues",
"/es/recursos/idiomas",
"/id/sumber-daya/bahasa",
"/pt-br/recursos/idiomas",
"/fa/منابع",
"/hi/संसाधनों",
Expand All @@ -21,6 +22,7 @@
"/fr/ressources/langues/*",
"/fr/les-ressources/langues/*",
"/es/recursos/idiomas/*",
"/id/sumber-daya/bahasa/*",
"/pt-br/recursos/idiomas/*",
"/fa/منابع/*",
"/hi/संसाधनों/*",
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResourceSingle/AvailableResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function TsFileDownload(props: {
window.history.replaceState(
null,
"",
`?download=${props.topLevelFolder}`
`?download=${slugify(props.topLevelFolder)}`
);
if (props.additionalOnClick) props.additionalOnClick();
}}
Expand Down
12 changes: 11 additions & 1 deletion src/components/ResourceSingle/ContentScriptural.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,15 @@ function MenuDialog(props: MenuDialogProps) {
const theText = document.querySelector(
"[data-js='theText']"
);
const theCol = document.querySelector(
"[data-js='rightCol']"
);
if (theText) {
theText.scrollTop = 0;
}
if (theCol) {
theCol.scrollTop = 0;
}
}
setDialogOpen(false);
}}
Expand Down Expand Up @@ -562,12 +568,16 @@ function NavAdjacentButton(props: NavAdjacentButtonProps) {
const theText = document.querySelector("[data-js='theText']");

const theContent = document.querySelector("[data-js='contentView']");
const theCol = document.querySelector("[data-js='rightCol']");
if (theText) {
theText.scrollTop = 0;
}
if (theContent) {
theContent.scrollTop = 0;
}
if (theCol) {
theCol.scrollTop = 0;
}
}
};
return (
Expand Down Expand Up @@ -616,7 +626,7 @@ function TextOfResource(props: {
}) {
return (
<div
class="relative px-3 theText max-h-90% pb-16 overflow-y-auto md:( pb-auto max-h-unset)"
class="relative px-3 theText max-h-90% pb-16 overflow-y-auto md:(pb-auto max-h-unset)"
data-css="theText"
data-js="theText"
data-testid="theText"
Expand Down
5 changes: 4 additions & 1 deletion src/components/ResourceSingle/ContentView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ function PeripheralView(props: {content: ScriptureStoreState}) {
chunks.push(value);
received += value.length;
setFetchProgress(
Math.round((received / printAllFile.file_size_bytes) * 100)
Math.min(
100,
Math.round((received / printAllFile.file_size_bytes) * 100)
)
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResourceSingle/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function DownloadLoadableTypeMenu(props: {

return (
<div data-name="downloadable-menu-wrapper" class="flex flex-col gap-6">
<div class="flex justify-between align-center">
<div class="flex justify-between align-center py-4 ">
<div class="flex items-center gap-2">
<Checkbox
// checked={wholeFolderChecked()}
Expand Down
Loading

0 comments on commit c9feb15

Please sign in to comment.