Commit graph

15 commits

Author SHA1 Message Date
7945a1667a Add slice support to the LanguageSelect component 2023-01-12 21:51:52 -03:00
a5e69e6c23 Fix bug when "slice.coversOneAyah"
I discovered a bug where when the "ayah" parameter is set to a single
ayah, and the end of the surah is reached - the "endOfStream" variable
would continue to return false. This would lead to an error in the Timer
component where "ayah" would be accessed as an undefined value.
2023-01-06 21:14:41 -03:00
5376b632dd mv lib/slice.ts lib/Quran/slice.ts 2023-01-05 19:31:32 -03:00
af5ecfef66 Add eslint "quotes" rule
By default this rule expects single quotes to be used
2023-01-05 00:16:30 -03:00
22fd27bba9 Add "@typescript-eslint/member-delimiter-style" rule
Apply to all files in /src/js/
2023-01-04 23:48:35 -03:00
76db482721 Surah.ts: add 'slug' getter. 2022-12-27 03:42:20 -03:00
3b9c68ebe6 Replace useSurah with Surah.fromDOMNode
Fix https://github.com/ReflectsLight/al-quran/issues/56
2022-12-26 19:10:22 -03:00
f1f94f46ea Adjust read time calculations
A baseline of two seconds is introduced, and when
the Arabic locale is being used, each word has a
weight of 750ms rather than 500ms.
2022-12-26 17:37:43 -03:00
f1fd6c4e00 Add localization for hard-coded English strings
* Replace "Surah X, Ayah Y" with its Arabic equivalenets.

* Add support for Eastern Arabic Numerals . For use with
  the Arabic, and Farsi languages.
2022-12-25 20:15:30 -03:00
Gyen Abubakar
5e2ab86e22 eslint & prettier setup 2022-11-11 16:09:33 -03:00
2eeeb439ec TypeScript: add ts-standard 2022-11-02 00:53:00 -03:00
36f21c8936 s/readingTime/readTimeMs/g 2022-11-01 23:28:03 -03:00
4dd2d20766 Surah.ts: add getters 2022-10-31 15:35:43 -03:00
f28725d0f3 src/js: extract surah id, and locale from location.pathname 2022-10-31 15:35:43 -03:00
34cd6129e8 js/lib/: add Quran.ts, Quran/Surah.ts 2022-10-31 15:35:43 -03:00