Compare commits

..

467 Commits

Author SHA1 Message Date
Rajarshee Chatterjee 4b515502bf fix(source): Fix ComradeMao (Closes LNReader/lnreader-sources#215) 2022-07-30 08:53:25 +05:30
Rajarshee Chatterjee baba8814f0 fix(source): Fix TravisTranslations Chapter Selector (Closes LNReader/lnreader-sources#339) 2022-07-30 08:52:59 +05:30
Rajarshee Chatterjee 5b01f61c9f feat(source): Add Novelstic (Closes LNReader/lnreader-sources#345) 2022-07-30 08:46:35 +05:30
Rajarshee Chatterjee c02a72018d fix: Remove Text Selectable Option (Closes #332) 2022-07-30 08:09:32 +05:30
Rajarshee Chatterjee 4d446d7c0b fix: Chapter not available when navigating from History/Updates (Closes #336) 2022-07-30 07:59:18 +05:30
Marcin Majewski e580f8f151 fix(wv-reader): Remove unnecesarry console.logs() (#331) 2022-07-21 21:23:26 +05:30
Rajarshee Chatterjee 92f164fc23 feat(source): Add Riwyat (Closes LNReader/lnreader-sources#332) 2022-07-21 20:35:08 +05:30
Rajarshee Chatterjee 44c805b6f2 feat(source): Add Light Novels Brasil (Closes LNReader/lnreader-sources#335) 2022-07-21 20:22:48 +05:30
Rajarshee Chatterjee d3f5619276 feat: Add option to disable Haptic Feedback (Closes #326) 2022-07-21 20:15:34 +05:30
Rajarshee Chatterjee 0261c6373d chore: Add Strings 2022-07-21 20:05:46 +05:30
Rajarshee Chatterjee fd5b9a7c17 chore: Update translations (#329)
* New translations strings.json (Russian)
[ci skip]

* New translations strings.json (Portuguese)
[ci skip]

* New translations strings.json (Portuguese, Brazilian)
[ci skip]
2022-07-21 20:04:23 +05:30
Rajarshee Chatterjee b884600dfb chore: Update translations (#296)
* New translations strings.json (Portuguese)
[ci skip]

* New translations strings.json (Hindi)
[ci skip]

* New translations strings.json (Turkish)
[ci skip]

* New translations strings.json (German)
[ci skip]

* New translations strings.json (Hungarian)
[ci skip]

* New translations strings.json (Portuguese, Brazilian)
[ci skip]

* New translations strings.json (Vietnamese)
[ci skip]

* New translations strings.json (Chinese Traditional)
[ci skip]

* New translations strings.json (Swedish)
[ci skip]

* New translations strings.json (Serbian (Cyrillic))
[ci skip]

* New translations strings.json (Albanian)
[ci skip]

* New translations strings.json (Portuguese)
[ci skip]

* New translations strings.json (Polish)
[ci skip]

* New translations strings.json (Norwegian)
[ci skip]

* New translations strings.json (Dutch)
[ci skip]

* New translations strings.json (Korean)
[ci skip]

* New translations strings.json (Japanese)
[ci skip]

* New translations strings.json (Hebrew)
[ci skip]

* New translations strings.json (Italian)
[ci skip]

* New translations strings.json (Finnish)
[ci skip]

* New translations strings.json (Greek)
[ci skip]

* New translations strings.json (Danish)
[ci skip]

* New translations strings.json (Czech)
[ci skip]

* New translations strings.json (Catalan)
[ci skip]

* New translations strings.json (Afrikaans)
[ci skip]

* New translations strings.json (Spanish)
[ci skip]

* New translations strings.json (French)
[ci skip]

* New translations strings.json (Romanian)
[ci skip]

* New translations strings.json (Arabic)
[ci skip]

* New translations strings.json (Ukrainian)
[ci skip]

* New translations strings.json (Turkish)
[ci skip]

* New translations strings.json (Russian)
[ci skip]

* New translations strings.json (Hindi)
[ci skip]

* New translations strings.json (German)
[ci skip]

* New translations strings.json (Hungarian)
[ci skip]

* New translations strings.json (Portuguese, Brazilian)
[ci skip]

* New translations strings.json (Vietnamese)
[ci skip]

* New translations strings.json (Chinese Traditional)
[ci skip]

* New translations strings.json (Chinese Simplified)
[ci skip]

* New translations strings.json (Swedish)
[ci skip]

* New translations strings.json (Serbian (Cyrillic))
[ci skip]

* New translations strings.json (Albanian)
[ci skip]

* New translations strings.json (Portuguese)
[ci skip]

* New translations strings.json (Polish)
[ci skip]

* New translations strings.json (Norwegian)
[ci skip]

* New translations strings.json (Dutch)
[ci skip]

* New translations strings.json (Korean)
[ci skip]

* New translations strings.json (Japanese)
[ci skip]

* New translations strings.json (Hebrew)
[ci skip]

* New translations strings.json (Italian)
[ci skip]

* New translations strings.json (Finnish)
[ci skip]

* New translations strings.json (Greek)
[ci skip]

* New translations strings.json (Danish)
[ci skip]

* New translations strings.json (Czech)
[ci skip]

* New translations strings.json (Catalan)
[ci skip]

* New translations strings.json (Afrikaans)
[ci skip]

* New translations strings.json (Spanish)
[ci skip]

* New translations strings.json (French)
[ci skip]

* New translations strings.json (Romanian)
[ci skip]

* New translations strings.json (Arabic)
[ci skip]

* New translations strings.json (Ukrainian)
[ci skip]

* New translations strings.json (Turkish)
[ci skip]

* New translations strings.json (Russian)
[ci skip]

* New translations strings.json (Hindi)
[ci skip]

* New translations strings.json (Turkish)
[ci skip]

* New translations strings.json (Arabic)
[ci skip]

* New translations strings.json (Russian)
[ci skip]

* New translations strings.json (Russian)
[ci skip]

* New translations strings.json (Russian)
[ci skip]

* chore: add french translation (#315)

Some small hesitations on how to translate :
    - "Offset" is difficult to translate with this context
    - "Badges" For me, it's "a small piece of metal, plastic, or cloth bearing a design or words, typically worn to identify a person or to indicate membership of an organization or support for a cause." (I know it can be virtual but I'm not sure I have the context of the application but it is a transparent word according to this definition)
    - "grid" translated into "grille" is a bit weird
    - Should I translate "Novel" by its translation ("roman") ?

* New translations strings.json (Ukrainian)
[ci skip]

* New translations strings.json (Portuguese, Brazilian)
[ci skip]

Co-authored-by: Raphael <67842535+Snowad14@users.noreply.github.com>
2022-07-21 19:28:09 +05:30
dependabot[bot] 8355907a76 chore(deps): bump moment from 2.29.2 to 2.29.4 (#327)
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 19:27:45 +05:30
Marcin Majewski b391e09e53 feat(img-dl): Downloading the chapter now downloads all img files (#321)
* fix(lint): fixed ChapterQueries.ts linting

* feat(img_download): Download images for offline reading

* fix(dl): imgs in Downloads/LNReader/source/novel/chapter

* fix(dl): deleteChapter now requires novelId/sourceId to remove images
2022-07-20 16:41:38 +05:30
Marcin Majewski a4c27924f8 fix(source): Fix NovelUpdates genres (#318) 2022-07-05 20:57:10 +05:30
Rider21 221c77d2cb feat(source): Add NovelTop1 (#313)
* test

* add NovelTop1

* ok
2022-07-01 22:22:02 +05:30
Rider21 3a0047ee25 feat: Moment Sync (#310)
* moment locale sync

* da
2022-06-26 17:45:52 +05:30
Rajarshee Chatterjee 3afbb5c45d feat: Add Option to Delete Read Chapters 2022-06-19 09:16:09 +05:30
Rajarshee Chatterjee 47102ff65e feat(source): Add More Filters 2022-06-19 08:12:22 +05:30
Rider21 c10eac6cd6 feat(source): Source Updates (#306)
* update

* sort

* removed the special characters
2022-06-19 06:27:34 +05:30
Rajarshee Chatterjee b4c234ef93 feat(source): Add Madara Sources
Closes LNReader/lnreader-sources#247, Closes LNReader/lnreader-sources#271, Closes LNReader/lnreader-sources#273, Closes LNReader/lnreader-sources#284
2022-06-18 13:57:39 +05:30
Rajarshee Chatterjee 3487bbd4cf Minor fixes 2022-06-18 13:37:52 +05:30
Rajarshee Chatterjee bece88663f refactor: Global Search Screen
Closes #302
2022-06-18 12:32:15 +05:30
dependabot[bot] 054124a004 chore(deps): bump jpeg-js from 0.4.3 to 0.4.4 (#301)
Bumps [jpeg-js](https://github.com/eugeneware/jpeg-js) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/eugeneware/jpeg-js/releases)
- [Commits](https://github.com/eugeneware/jpeg-js/compare/v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: jpeg-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-17 08:39:26 +05:30
Rider21 d2b62c0e8b feat: Source Updates (#297)
* update

* xm
2022-06-14 06:19:06 +05:30
Rajarshee Chatterjee e98980bdb9 chore: Update translations (#279)
* New translations strings.json (German)

* New translations strings.json (Russian)

* New translations strings.json (Ukrainian)

* New translations strings.json (Arabic)

* New translations strings.json (German)

* New translations strings.json (Hungarian)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Dutch)

* New translations strings.json (Korean)

* New translations strings.json (Japanese)

* New translations strings.json (Hebrew)

* New translations strings.json (Italian)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (French)

* New translations strings.json (Romanian)

* New translations strings.json (Arabic)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)

* New translations strings.json (Russian)

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Turkish)

* New translations strings.json (German)

* New translations strings.json (Hungarian)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Dutch)

* New translations strings.json (Korean)

* New translations strings.json (Japanese)

* New translations strings.json (Hebrew)

* New translations strings.json (Italian)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (French)

* New translations strings.json (Romanian)

* New translations strings.json (Arabic)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)

* New translations strings.json (Russian)

* New translations strings.json (Portuguese, Brazilian)
2022-06-13 09:57:21 +05:30
Rajarshee Chatterjee 62a847acb2 build: Skip CI in translations 2022-06-13 09:38:57 +05:30
Rajarshee Chatterjee 13f394c76d build: Only run CI on main branch 2022-06-13 09:11:30 +05:30
Marcin Majewski 71f6d863c0 fix(reader-settings): Fix reader settings crash (#292) 2022-06-13 08:21:25 +05:30
Rajarshee Chatterjee d5a8ca2b47 feat(source): Add Liebe Schnee Hiver Novel (Closes LNReader/lnreader-sources#232) 2022-06-12 21:15:25 +05:30
Rajarshee Chatterjee c969916cd5 feat(source): Initial Source Filter Support (Closes #285) 2022-06-12 20:27:57 +05:30
Rajarshee Chatterjee e68c72ce02 fix(source):Fix ReadLightNovel's Novel Info 2022-06-12 13:53:15 +05:30
Rajarshee Chatterjee 5f83104171 feat: Add Ability to View Latest Novels 2022-06-12 13:50:16 +05:30
Rajarshee Chatterjee 7837d7cdaf feat: Add Option to Remove Extra Paragraph Spacing (Closes #248) 2022-06-12 13:01:10 +05:30
Rajarshee Chatterjee b243d764ce feat: Add New Themes (Closes #254) 2022-06-12 12:05:39 +05:30
Rajarshee Chatterjee 56c7716595 fix: Cross Icon Overlapping Search Text (Closes #273) 2022-06-12 11:23:34 +05:30
Rajarshee Chatterjee d44abc9039 feat: Add Last Read Sorting (Closes #255) 2022-06-12 09:20:26 +05:30
Rajarshee Chatterjee 6f30bfeeab fix: Add progressViewOffset (Closes #270) 2022-06-12 08:58:50 +05:30
Rajarshee Chatterjee 3d90e04415 fix: Global Search (Closes #256) 2022-06-12 08:51:49 +05:30
Rajarshee Chatterjee 23e27e8d40 fix(source): HakoLightNovel (Closes LNReader/lnreader-sources#239) 2022-06-12 08:48:14 +05:30
Marcin Majewski d0f7e25956 feat(volume-scroll): Added option to scroll WebView using volume buttons (#290)
* feat(volume-scroll): Added webview volume scroll

Scrolling with volume buttons in WebView

* feat(volume-settings): Add volume button settings
2022-06-12 07:47:39 +05:30
Rajarshee Chatterjee 9b297620fe refactor: Browse Source Screen 2022-06-06 07:58:07 +05:30
Marcin Majewski df851bf9d1 Webview improvements (#283)
* feat(webview): Added few webview improvements

Added buttons from TextReader on the bottom of the chapter (Closes #250)
Added webview seekbar (Closes #218)
Switched the handling of the navigation bar visibility to WebView. This might solve the issue from #229 because WebView is a bit more strict in what it interprets as "click/tap"
Migrating WebViewReader.js to TypeScript

* fix(webview): Removed unnecesarry console.logs

* feat(wv-autoscroll): WebView AutoScroll

* feat(wv-swipes): WebView new swipe detection

Added webview internal swipe detection instead of the react-native one
Hopefully making the detection a bit better (effects unknown yet)
This option can be turned on/off in the settings

* fix(wv-scrollbar): Added option to switch vertical

You can now switch vertical/horizontal scrollbar setting in reader screen options
2022-06-05 07:24:36 +05:30
Rajarshee Chatterjee 5fc411e14c Merge branch 'main' of https://github.com/LNReader/lnreader into main 2022-06-04 09:04:48 +05:30
Rajarshee Chatterjee 0f221b2823 fix: Build 2022-06-04 09:04:40 +05:30
Marcin Majewski 9e50159589 fix(clipboard): Fixed clipboard dependency (#282)
Closes #257
2022-06-04 08:59:31 +05:30
Rajarshee Chatterjee 58752a5589 fix: ESLint 2022-06-04 08:57:06 +05:30
Rajarshee Chatterjee c1a76458a8 fix: Novel Updates (Closes LNReader/lnreader-sources#227) 2022-06-01 05:35:34 +05:30
Rajarshee Chatterjee 5b3a6ceff4 fix: ReadLightNovel Crash 2022-06-01 05:19:32 +05:30
Rajarshee Chatterjee c4a14784f0 fix(source): Remove RewayatAr 2022-06-01 05:08:14 +05:30
Rajarshee Chatterjee d64e2e7fdb chore: Update Translations 2022-05-31 21:11:24 +05:30
Marcin Majewski 5d8463509c fix(tts): Android11 Manifest TTS Support (#277)
Add to AndroidManifest.xml a clause about querying TTS to remove `Unresolved Promise: No TTS Engine Installed` error in Android 11 Phones.
2022-05-28 09:13:46 +05:30
Marcin Majewski 5b4e32e184 fix(syosetu): Change cover to unavailable (#275)
fix(syosetu): Set cover to not available
2022-05-28 08:05:58 +05:30
Marcin Majewski a7fb3962f1 fix(typo): spelling mistake causing a crash (#276) 2022-05-28 08:05:11 +05:30
Marcin Majewski d333381959 feat(webview-scroll): webview scrolls to saved (#274)
Now webview has webViewScroll which after any change scrolls webView to given percentage

Co-authored-by: unknown <SkillGG>
2022-05-27 20:43:33 +05:30
Rajarshee Chatterjee d599e6669f chore: Update translations (#251)
* New translations strings.json (Turkish)

* New translations strings.json (Korean)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Ukrainian)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Russian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Dutch)

* New translations strings.json (Japanese)

* New translations strings.json (Romanian)

* New translations strings.json (Italian)

* New translations strings.json (Hungarian)

* New translations strings.json (Hebrew)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (German)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Arabic)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (French)

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Turkish)

* New translations strings.json (Korean)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Ukrainian)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Russian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Dutch)

* New translations strings.json (Japanese)

* New translations strings.json (Romanian)

* New translations strings.json (Italian)

* New translations strings.json (Hungarian)

* New translations strings.json (Hebrew)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (German)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Arabic)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (French)

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Turkish)

* New translations strings.json (German)

* New translations strings.json (German)

* New translations strings.json (Italian)

* New translations strings.json (Russian)

* New translations strings.json (Russian)
2022-05-27 05:21:49 +05:30
Rider21 5436bf8aaf fix: Source Fixes (#272)
* updated link

* small correction

* Bypass

* Update renovels.js
2022-05-27 05:14:17 +05:30
Rajarshee Chatterjee 9f6f9e71ca fix: Remove Circular Dependencies 2022-05-09 07:06:48 +05:30
Rajarshee Chatterjee 6caba807df fix:(source) 1stKissNovel: No Chapters 2022-05-08 12:29:37 +05:30
Rajarshee Chatterjee 9dabf1a60e Minor fixes 2022-05-08 12:26:29 +05:30
Rajarshee Chatterjee 7716ab75de refactor: Reader Settings Screen 2022-05-08 11:47:22 +05:30
Rajarshee Chatterjee 94b2dd51cb fix(source): ReaperScans (Closes LNReader/lnreader-sources#224) 2022-05-08 07:51:59 +05:30
Rajarshee Chatterjee 010d49daea fix: Update Icon Links 2022-05-08 07:27:31 +05:30
Rajarshee Chatterjee 6eb733eb66 feat: Ability to Save Custom Themes (Closes #145) 2022-05-07 18:33:40 +05:30
Rajarshee Chatterjee 33a33842c6 feat: Add WebView Button in Reader 2022-05-07 17:21:58 +05:30
Rajarshee Chatterjee 1bfd24a1b4 fix: History Screen Fixes 2022-05-07 16:53:22 +05:30
Rajarshee Chatterjee 7e1bf4dd3f feat: Add Path Aliases 2022-05-07 16:50:53 +05:30
Rajarshee Chatterjee 955e552597 fix: Make MyAnimeListCard Scrollable 2022-05-07 16:50:23 +05:30
Rajarshee Chatterjee 8b586754d2 fix: MyAnimeList Search 2022-05-07 15:16:40 +05:30
Rajarshee Chatterjee b921f9b764 refactor: Remove Ununsed Files and Dependencies 2022-05-07 14:44:42 +05:30
Rajarshee Chatterjee 4d30546b9a build: Remove Upload Artifact 2022-05-07 14:44:32 +05:30
Rajarshee Chatterjee 58eac42b14 refactor: Refactor Reader Bottomsheet (#249)
* refactor: Refactor Reader Bottomsheet

* refactor: Remove Unused Files
2022-05-07 13:36:36 +05:30
Rajarshee Chatterjee 872ec15ca5 build: Fix Artifact Name 2022-05-06 21:23:28 +05:30
Rajarshee Chatterjee e013b3cc55 build: Fix Artifact Name 2022-05-06 20:58:20 +05:30
Rajarshee Chatterjee 8e58ce2eb1 feat(source): Add SonicMTL and MTLNovel.Club
Closes LNReader/lnreader-sources#221, Closes LNReader/lnreader-sources#223
2022-05-06 20:31:44 +05:30
Rajarshee Chatterjee a9e2d872f2 build: Add Upload Artifact 2022-05-06 20:23:01 +05:30
Rajarshee Chatterjee ccdb150d6a fix: Add Strings to Translations 2022-05-06 20:12:23 +05:30
Rajarshee Chatterjee 4e1d8533e3 Release v1.1.10 2022-05-04 07:21:14 +05:30
Rajarshee Chatterjee da18cd9ade chore: Update translations (#244)
Lint / ESLint (push) Has been cancelled
* New translations strings.json (Turkish)

* New translations strings.json (Portuguese, Brazilian)
2022-05-04 07:18:32 +05:30
Rajarshee Chatterjee 802aa6d71a fix(source): MyLoveNovel (Closes LNReader/lnreader-sources#217) 2022-05-04 07:03:51 +05:30
Rajarshee Chatterjee 3fbca6c14d fix: Links not working in Render HTML (Closes #245) 2022-05-04 06:56:30 +05:30
Rajarshee Chatterjee 5a07255b95 fix: Tracker Button showing when Tracker is not available 2022-05-04 06:56:06 +05:30
Rajarshee Chatterjee 9ed1d5c8b6 Release v1.1.9 2022-05-03 18:30:03 +05:30
Rajarshee Chatterjee f07a4845b8 fix: Browse Screen Search Message 2022-05-03 17:51:37 +05:30
Rajarshee Chatterjee 922ffbe7b0 fix: Tracker Button not Showing 2022-05-03 17:50:14 +05:30
Rajarshee Chatterjee d9b40589b7 fix: Backups (Closes #109, Closes #180)
Lint / ESLint (push) Has been cancelled
2022-05-03 17:23:02 +05:30
Rajarshee Chatterjee aee3126e6c feat(source): Add MTNovel (Closes LNReader/lnreader-sources#197) 2022-05-03 12:55:58 +05:30
Rajarshee Chatterjee ae16cc70f5 fix: Build Workflow 2022-05-03 12:26:14 +05:30
Rajarshee Chatterjee bc3cbd7d7b fix(source): NovelRingan: Fix Cover (Closes LNReader/lnreader-sources#209) 2022-05-03 11:56:09 +05:30
Rajarshee Chatterjee c463a99e9a chore: Remove Duplicate Job 2022-05-03 11:46:49 +05:30
Rajarshee Chatterjee 1c2dce3a44 fix(source): LightNovelReader & ReadLightNovel: Fix Search and Description (Closes LNReader/lnreader-sources#212, Closes LNReader/lnreader-sources#214) 2022-05-03 11:29:36 +05:30
Rajarshee Chatterjee d484380734 fix(source): SakuraNovel: Fix Chapter Selector (Closes LNReader/lnreader-sources#211) 2022-05-03 11:23:24 +05:30
Rajarshee Chatterjee 7f2d3ac9b7 fix(source): MeioNovel: Add total pages (Closes LNReader/lnreader-sources#208) 2022-05-03 11:15:42 +05:30
Rajarshee Chatterjee 410ff3d727 chore(deps): Uninstall unused dependecies 2022-05-03 11:07:44 +05:30
dependabot[bot] b8824a9bd3 chore(deps): bump async from 2.6.3 to 2.6.4 (#242)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 22:03:21 +05:30
Rider21 74be58ee81 feat(source): Add Genre, Author and Status in Russian Sources (#239) 2022-04-29 08:12:03 +05:30
Rider21 6ef45e8b39 fix(source): Jaomix (#237)
* oops

* hm
2022-04-25 08:24:25 +05:30
Rajarshee Chatterjee f42f316748 feat: Add translation project link in About 2022-04-24 19:35:36 +05:30
Rajarshee Chatterjee b9052e6d38 fix(source): Novel Updates 2022-04-24 19:33:16 +05:30
Rajarshee Chatterjee acfb73c424 fix: Add cover placeholder color 2022-04-24 19:11:19 +05:30
Rajarshee Chatterjee 1c3ea20aaf chore: Update translations (#225)
* New translations strings.json (Russian)

* New translations strings.json (Korean)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Dutch)

* New translations strings.json (Japanese)

* New translations strings.json (Romanian)

* New translations strings.json (Italian)

* New translations strings.json (Hungarian)

* New translations strings.json (Hebrew)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (German)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Arabic)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (French)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)
2022-04-24 17:42:17 +05:30
Rajarshee Chatterjee 815172b91d style: Run Prettier 2022-04-24 17:39:48 +05:30
Rider21 2d85fa0938 feat: New Sources (#236)
* jaomix

* Rulate

* РанобэРФ

* corrected covers
2022-04-24 17:35:10 +05:30
Rajarshee Chatterjee 5e2152ad0d fix: Bookmark icon not visible (Closes #227) 2022-04-17 09:19:58 +05:30
dependabot[bot] 0388ec4f7e chore(deps): bump urijs from 1.19.10 to 1.19.11 (#228)
Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.10 to 1.19.11.
- [Release notes](https://github.com/medialize/URI.js/releases)
- [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md)
- [Commits](https://github.com/medialize/URI.js/compare/v1.19.10...v1.19.11)

---
updated-dependencies:
- dependency-name: urijs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 19:16:03 +05:30
Rajarshee Chatterjee 6f10966714 fix: Only show pinned sources not working (Closes #226) 2022-04-11 09:56:46 +05:30
Rajarshee Chatterjee d2c0a56c35 chore: Add Strings to Translations 2022-04-11 09:44:40 +05:30
Rajarshee Chatterjee 3dbb835045 chore: Add Strings to Translations 2022-04-10 21:44:40 +05:30
Rajarshee Chatterjee 38c062c195 docs: Add Translated and Preview Badge 2022-04-10 16:36:09 +05:30
Rajarshee Chatterjee 969c17e68d fix: Global Search and Migration 2022-04-10 11:26:15 +05:30
Rajarshee Chatterjee c3a6eb372f style: Run Prettier 2022-04-09 19:51:10 +05:30
Rider21 09bcbd58f5 feat(source): Add Renovels (#224) 2022-04-09 19:49:27 +05:30
Rajarshee Chatterjee fd642c9035 chore: npm Audit FIxes 2022-04-09 16:26:44 +05:30
Rajarshee Chatterjee 642b8a855d Minor cleanup 2022-04-09 15:41:55 +05:30
Rajarshee Chatterjee 54a6ec64bf refactor: Browse & Browse Settings Screen 2022-04-09 11:43:54 +05:30
Rajarshee Chatterjee b97a3cf16d fix(source): Fix HakoLightNovelSearch 2022-04-09 08:24:51 +05:30
Rajarshee Chatterjee ae8c858ae2 Merge branch 'main' of https://github.com/LNReader/lnreader into main 2022-04-08 22:25:27 +05:30
Rajarshee Chatterjee 9f4b849d34 chore: Update translations (#206)
* New translations strings.json (Romanian)

* New translations strings.json (Dutch)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Russian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Korean)

* New translations strings.json (French)

* New translations strings.json (Japanese)

* New translations strings.json (Italian)

* New translations strings.json (Hungarian)

* New translations strings.json (Hebrew)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (German)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Arabic)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (Turkish)

* New translations strings.json (Arabic)

* New translations strings.json (Russian)

* New translations strings.json (Russian)

* New translations strings.json (Korean)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Albanian)

* New translations strings.json (Portuguese)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Dutch)

* New translations strings.json (Japanese)

* New translations strings.json (Romanian)

* New translations strings.json (Italian)

* New translations strings.json (Hungarian)

* New translations strings.json (Hebrew)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (German)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Arabic)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (French)
2022-04-08 22:24:25 +05:30
Rajarshee Chatterjee be82f3d9ae feat: Add Script to generate String Types 2022-04-08 20:59:15 +05:30
Rajarshee Chatterjee 027f4420f6 feat(source): HakoLightNovel (Closes LNReader/lnreader-sources#167) 2022-04-08 20:36:28 +05:30
Rajarshee Chatterjee e7b8edf8f1 feat: Add Script to generate Source File Template from JSON 2022-04-08 19:35:50 +05:30
Rajarshee Chatterjee 9266b57560 feat(source): Add LightNovelReader (Closes LNReader/lnreader-sources#138) 2022-04-08 19:24:07 +05:30
Rajarshee Chatterjee 4214caa87c feat(source): Add NovelsCafe (Closes LNReader/lnreader-sources#147) 2022-04-08 18:24:57 +05:30
Rajarshee Chatterjee 766c7b565e feat(source): Add FreeNovelUpdates (Closes LNReader/lnreader-sources#184) 2022-04-08 17:40:15 +05:30
Rajarshee Chatterjee 06d66c15d4 feat(source): Add NovelOwl (LNReader/lnreader-sources#194) 2022-04-08 12:07:56 +05:30
Rajarshee Chatterjee e2d58d1587 feat: Add Script to Generate Madara Sources 2022-04-08 12:00:35 +05:30
Rajarshee Chatterjee 1f86979165 feat: Add husky and lint-staged 2022-04-08 08:19:52 +05:30
Rajarshee Chatterjee 951690d49a fix: Last update time (Closes #214) 2022-04-08 07:37:45 +05:30
M0RGaming f4be4aa4e1 Fixed Last Read Crash (#216) 2022-04-05 07:31:22 +05:30
Rajarshee Chatterjee 1adb5a9ce3 Minor fixes 2022-04-02 08:49:23 +05:30
dependabot[bot] fdef214dcf Bump plist from 3.0.4 to 3.0.5 (#211)
Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.4 to 3.0.5.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 21:35:27 +05:30
dependabot[bot] e99bf2a430 Bump ansi-regex from 4.1.0 to 4.1.1 (#210)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 21:35:19 +05:30
dependabot[bot] 471e7f56e7 Bump minimist from 1.2.5 to 1.2.6 (#209)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 21:32:51 +05:30
Rajarshee Chatterjee 1f527a653d chore: Add string keys 2022-03-19 17:54:37 +05:30
Rajarshee Chatterjee c4240e6c1a feat: Add build release script 2022-03-19 17:10:08 +05:30
Rajarshee Chatterjee 0bc936becf Crowdin translations (#205)
* New translations strings.json (French)

* New translations strings.json (Turkish)

* New translations strings.json (German)
2022-03-19 17:02:19 +05:30
Rajarshee Chatterjee f4643b0a4e Crowdin translations (#204)
* New translations strings.json (Portuguese)

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Portuguese)

* New translations strings.json (Albanian)

* New translations strings.json (Romanian)

* New translations strings.json (Dutch)

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Vietnamese)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Ukrainian)

* New translations strings.json (Turkish)

* New translations strings.json (Swedish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Russian)

* New translations strings.json (Polish)

* New translations strings.json (Norwegian)

* New translations strings.json (Korean)

* New translations strings.json (French)

* New translations strings.json (Japanese)

* New translations strings.json (Italian)

* New translations strings.json (Hungarian)

* New translations strings.json (Hebrew)

* New translations strings.json (Finnish)

* New translations strings.json (Greek)

* New translations strings.json (German)

* New translations strings.json (Danish)

* New translations strings.json (Czech)

* New translations strings.json (Catalan)

* New translations strings.json (Arabic)

* New translations strings.json (Afrikaans)

* New translations strings.json (Spanish)

* New translations strings.json (Albanian)
2022-03-19 12:57:23 +05:30
Rajarshee Chatterjee ac42c025c2 chore: Update Crowdin configuration file 2022-03-19 12:56:32 +05:30
Rajarshee Chatterjee 20cfc960f8 chore: Add string keys 2022-03-19 12:42:47 +05:30
Rajarshee Chatterjee de357c3822 Update Crowdin configuration file 2022-03-19 12:28:00 +05:30
Rajarshee Chatterjee 5e73b32b97 Crowdin translations (#203)
* New translations strings.json (Romanian)

* New translations strings.json (Danish)

* New translations strings.json (Vietnamese)

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Romanian)

* New translations strings.json (French)

* New translations strings.json (Afrikaans)

* New translations strings.json (Arabic)

* New translations strings.json (Catalan)

* New translations strings.json (Czech)

* New translations strings.json (German)

* New translations strings.json (Chinese Traditional)

* New translations strings.json (Greek)

* New translations strings.json (Finnish)

* New translations strings.json (Hebrew)

* New translations strings.json (Hungarian)

* New translations strings.json (Italian)

* New translations strings.json (Japanese)

* New translations strings.json (Korean)

* New translations strings.json (Dutch)

* New translations strings.json (Norwegian)

* New translations strings.json (Polish)

* New translations strings.json (French)

* New translations strings.json (Hungarian)

* New translations strings.json (Spanish)

* New translations strings.json (Afrikaans)

* New translations strings.json (Arabic)

* New translations strings.json (Catalan)

* New translations strings.json (Czech)

* New translations strings.json (Danish)

* New translations strings.json (German)

* New translations strings.json (Greek)

* New translations strings.json (Finnish)

* New translations strings.json (Hebrew)

* New translations strings.json (Italian)

* New translations strings.json (Ukrainian)

* New translations strings.json (Japanese)

* New translations strings.json (Korean)

* New translations strings.json (Dutch)

* New translations strings.json (Norwegian)

* New translations strings.json (Polish)

* New translations strings.json (Russian)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Swedish)

* New translations strings.json (Turkish)

* New translations strings.json (Portuguese)

* New translations strings.json (Russian)

* New translations strings.json (Russian)

* New translations strings.json (Italian)

* New translations strings.json (Japanese)

* New translations strings.json (Korean)

* New translations strings.json (Dutch)

* New translations strings.json (Norwegian)

* New translations strings.json (Polish)

* New translations strings.json (Portuguese)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Hebrew)

* New translations strings.json (Swedish)

* New translations strings.json (Turkish)

* New translations strings.json (Ukrainian)

* New translations strings.json (Chinese Simplified)

* New translations strings.json (English)

* New translations strings.json (Vietnamese)

* New translations strings.json (Hungarian)

* New translations strings.json (Finnish)

* New translations strings.json (Serbian (Cyrillic))

* New translations strings.json (Portuguese, Brazilian)

* New translations strings.json (Swedish)

* New translations strings.json (Turkish)

* New translations strings.json (Ukrainian)

* New translations strings.json (Chinese Simplified)

* New translations strings.json (English)

* New translations strings.json (Vietnamese)

* New translations strings.json (Romanian)

* New translations strings.json (Greek)

* New translations strings.json (French)

* New translations strings.json (Spanish)

* New translations strings.json (Afrikaans)

* New translations strings.json (Arabic)

* New translations strings.json (Catalan)

* New translations strings.json (Czech)

* New translations strings.json (Danish)

* New translations strings.json (German)

* New translations strings.json (Portuguese, Brazilian)
2022-03-19 12:18:13 +05:30
Rajarshee Chatterjee d289b0ea17 Merge branch 'main' of https://github.com/LNReader/lnreader into main 2022-03-19 12:16:52 +05:30
Rajarshee Chatterjee 20d3a786b6 fix: Remove ununsed variable 2022-03-19 12:16:43 +05:30
Rajarshee Chatterjee ab2a17b41e Update Crowdin configuration file 2022-03-19 12:00:41 +05:30
Rajarshee Chatterjee e76bc77128 chore: Add string keys 2022-03-19 11:48:33 +05:30
Rajarshee Chatterjee 783d1e1873 Refactor 2022-03-19 09:38:35 +05:30
Rajarshee Chatterjee c307781cf9 feat(source): Add Türkçe Light Novels (Closes LNReader/lnreader-sources#189) 2022-03-18 08:31:09 +05:30
Rajarshee Chatterjee 10fb3ec347 Minor fixes 2022-03-16 06:37:40 +05:30
Rajarshee Chatterjee 71eab75048 feat(source): Add ReadFreeNovel (Closes LNReader/lnreader-sources#173) 2022-03-16 06:36:17 +05:30
Rajarshee Chatterjee d6b24a756d refactor: Reader 2022-03-13 16:31:16 +05:30
Rajarshee Chatterjee a779cc12d0 refactor: UpdatesScreen 2022-03-08 10:14:19 +05:30
Rajarshee Chatterjee 5c64314d7d feat (source): Add AllNovelFull (Closes LNReader/lnreader-sources#176) 2022-03-06 18:58:04 +05:30
Rajarshee Chatterjee 0b41728789 fix (source): Fix TeamXNovel 2022-03-06 18:57:01 +05:30
Rajarshee Chatterjee 388052b59d Merge branch 'main' of https://github.com/LNReader/lnreader into main 2022-03-06 18:09:05 +05:30
hani19998 edcb661b86 feat(source): Add TeamXNovel (Closes LNReader/lnreader-sources#175)
* Update MadaraGenerator.js

TeamXNovel

* Update sourceManager.ts

TeamXNovel

* Update sources.json

TeamXNovel
2022-03-06 18:06:52 +05:30
Rajarshee Chatterjee a248c9e961 fix: background color 2022-03-06 17:41:48 +05:30
dependabot[bot] 0e49e873cd Bump plist from 3.0.2 to 3.0.4 (#187)
Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.2 to 3.0.4.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-06 13:51:03 +05:30
dependabot[bot] 9137d09743 Bump url-parse from 1.5.4 to 1.5.10 (#181)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.4 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.4...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-06 13:50:57 +05:30
Rajarshee Chatterjee 4d2b275a27 fix: lint errors 2022-03-06 13:49:10 +05:30
Rajarshee Chatterjee c06c80c40f refactor: ReaderScreen 2022-03-06 13:35:49 +05:30
Rajarshee Chatterjee e258d5c1a9 refactor: HistoryScreen & Settings 2022-03-06 13:00:56 +05:30
Rajarshee Chatterjee de94340616 refactor 2022-03-06 10:11:09 +05:30
Rajarshee Chatterjee 8e1820213f refactor: sources 2022-03-06 09:59:02 +05:30
Rajarshee Chatterjee 36b9e2cf69 style: run prettier 2022-03-06 09:27:27 +05:30
Rajarshee Chatterjee 04928e8cdc style: run prettier 2022-03-06 09:20:04 +05:30
Rajarshee Chatterjee 69e269216a feat: Translations (Closes #190) 2022-03-06 09:17:00 +05:30
Rajarshee Chatterjee 5f3959d62d Add Novel4Up (Closes LNReader/lnreader-sources#162) 2022-02-05 11:22:34 +05:30
Rajarshee Chatterjee 2c02437e62 ReaperScans: Fix novelUrl (Closes LNReader/lnreader-sources#166) 2022-02-05 11:16:23 +05:30
Rajarshee Chatterjee 4255e5d060 Fix workflow 2022-02-04 22:29:58 +05:30
dependabot[bot] a1d32a9e1d Bump shelljs from 0.8.4 to 0.8.5 (#158)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-04 22:13:16 +05:30
dependabot[bot] 93a7a00735 Bump path-parse from 1.0.6 to 1.0.7 (#157)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-04 22:13:03 +05:30
dependabot[bot] cb875b5d71 Bump url-parse from 1.5.1 to 1.5.4 (#156)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.4.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.4)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-04 22:12:50 +05:30
dependabot[bot] ce0fa93959 Bump tmpl from 1.0.4 to 1.0.5 (#155)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-04 22:12:34 +05:30
Rajarshee Chatterjee 1537b67f12 Allow inline styles & run prettier 2022-02-04 22:11:55 +05:30
Rajarshee Chatterjee 3a1921b7b1 Add TypeScript & Redux Toolkit 2022-02-04 21:53:22 +05:30
Rajarshee Chatterjee 87375bc005 Fix typo (Closes #154) 2022-02-04 21:12:44 +05:30
Rajarshee Chatterjee 13f4b08b7e Refactor ReaderScreen 2022-01-14 17:04:33 +05:30
Rajarshee Chatterjee 4321b892ad Divine Dao Library: Add chapter name 2022-01-13 22:10:05 +05:30
Rajarshee Chatterjee b258f9cf13 Fix LightNovelPub (Closes LNReader/lnreader-sources#133) 2022-01-07 11:01:59 +05:30
Rajarshee Chatterjee 02eb632484 Fix ReadNovelFull (Closes LNReader/lnreader-sources#150) 2022-01-07 10:11:51 +05:30
Rajarshee Chatterjee f6faaea0db Add OpenDyslexic font (Closes #137) 2022-01-07 09:59:51 +05:30
Rajarshee Chatterjee 046b020f26 Release v1.1.8 2021-12-31 21:41:01 +05:30
Rajarshee Chatterjee f732162688 Minor fixes
Lint / ESLint (push) Has been cancelled
2021-12-29 10:53:59 +05:30
Rajarshee Chatterjee 81a5ea0aa7 Add SakuraNovel (Closes LNReader/lnreader-sources#131) 2021-12-29 10:52:40 +05:30
Rajarshee Chatterjee 8be78f7e92 Fix ReadLightNovel 2021-12-29 10:47:32 +05:30
Rajarshee Chatterjee bb144936b5 Fix initial custom css 2021-12-26 15:13:02 +05:30
Rajarshee Chatterjee 724089d940 TravisTranslations: Fix chapter content (Closes LNReader/lnreader-sources#139) 2021-12-26 11:14:31 +05:30
Rajarshee Chatterjee c22440195d MyLoveNovel: Fix description (Closes LNReader/lnreader-sources#137) 2021-12-26 10:48:08 +05:30
Rajarshee Chatterjee dbb20e666f Add ArMTL (Closes LNReader/lnreader-sources#144) 2021-12-26 10:00:28 +05:30
Rajarshee Chatterjee 0a7f2e8948 Add Novelmt.com and Ltnovel.com 2021-12-26 09:37:29 +05:30
Rajarshee Chatterjee a83cdcc66e Add LatestNovel (Closes LNReader/lnreader-sources#136) 2021-12-21 18:13:12 +05:30
Rajarshee Chatterjee ceca91fcab Add option to clear cover cache 2021-12-21 18:03:00 +05:30
Pushpender Singh ecc8c35bfb Keep screen awake in reader (#128)
Closes #121
2021-12-21 16:37:18 +05:30
Pushpender Singh 3522b7e06d Utils for version (#129)
* ESLint Error Fixed

* Utils for version

* Remove useKeepAwake

* Update Main.js

Co-authored-by: Rajarshee Chatterjee <rajarshee.adm@gmail.com>
2021-12-21 16:26:20 +05:30
Pushpender Singh ab4fc42f69 Fix react-native-fast-image crash (#126) 2021-12-20 21:47:57 +05:30
Pushpender Singh 47676a0de5 Fix java.lang.OutOfMemoryError (#125) 2021-12-20 21:21:35 +05:30
Rajarshee Chatterjee 7854b20b1f Fix NovelPub 2021-12-13 11:01:05 +05:30
Rajarshee Chatterjee a825db2965 Add NovelFull.me (Closes LNReader/lnreader-sources#129) 2021-12-13 10:45:56 +05:30
Rajarshee Chatterjee 57cc5a7f42 Rename "Use WebView" to "Render Html" 2021-12-13 10:29:54 +05:30
Rajarshee Chatterjee 15cd0b7b6b Add HizoManga (Closes LNReader/lnreader-sources#126) 2021-12-13 10:20:19 +05:30
Rajarshee Chatterjee ca1303f422 Reorganize reader settings (Closes #110) 2021-11-21 11:44:04 +05:30
Rajarshee Chatterjee e79563f2d0 Fix custom covers 2021-11-17 14:46:18 +05:30
Rajarshee Chatterjee ffe5b04360 Minor fixes 2021-11-17 13:59:13 +05:30
Rajarshee Chatterjee 1c59964a67 Downgrade eslint 2021-11-17 13:29:21 +05:30
Rajarshee Chatterjee 5cd08a0d29 Add more download options (Closes #103) 2021-11-17 12:52:36 +05:30
Rajarshee Chatterjee 4bc61f425b Minor fixes 2021-11-17 12:05:46 +05:30
Rajarshee Chatterjee 6d631b8921 Update dependencies 2021-11-17 12:03:40 +05:30
Rajarshee Chatterjee 70833ef37f Fix NovelForest 2021-11-16 11:49:01 +05:30
Rajarshee Chatterjee cc4c242224 Add clear updates dialog 2021-11-16 11:48:37 +05:30
Rajarshee Chatterjee 35731ec38f Add option to update novel metadata (Closes #105) 2021-11-16 11:28:04 +05:30
Rajarshee Chatterjee 3735e8ca1b Fix OnlyMTL 2021-11-16 10:27:33 +05:30
Rajarshee Chatterjee e0746ff092 Add BestLightNovel (Closes LNReader/lnreader-sources#121) 2021-11-14 11:15:49 +05:30
Rajarshee Chatterjee d0c478b89f Fix RainOfSnow 2021-11-14 11:03:33 +05:30
Rajarshee Chatterjee 3f29aee4e6 Fix RanobeLib (Closes LNReader/lnreader-sources#110) 2021-11-14 10:37:04 +05:30
Rajarshee Chatterjee 76df79d9ca Add NovelPub (Closes LNReader/lnreader-sources#119) 2021-11-14 10:30:01 +05:30
Rajarshee Chatterjee 3f874e6550 Fix default chapter sort order 2021-11-09 17:37:16 +05:30
Rajarshee Chatterjee 84ec20ffb3 Enable react-freeze 2021-11-09 17:36:36 +05:30
Rajarshee Chatterjee 65027ee41e Add RanobeLib (Closes LNReader/lnreader-sources#108) 2021-11-02 10:42:44 +05:30
Rajarshee Chatterjee 3425892a16 Release v1.1.7
Lint / ESLint (push) Has been cancelled
2021-11-01 13:43:21 +05:30
Rajarshee Chatterjee 97890c1596 Add NovelForest (Closes LNReader/lnreader-sources#102) 2021-11-01 08:41:28 +05:30
Rajarshee Chatterjee c97e1b8e23 Fix VipNovel search 2021-11-01 07:43:20 +05:30
Rajarshee Chatterjee c44537a1c0 Fix default sort order 2021-11-01 07:43:10 +05:30
Rajarshee Chatterjee fd8fb367bd Allow setting default sort order for chapters (Closes #100) 2021-10-31 15:17:16 +05:30
Rajarshee Chatterjee a3d8aa5bcd Fix RanobeHub images (Closes LNReader/lnreader-sources#107) 2021-10-31 14:47:18 +05:30
Rajarshee Chatterjee e7a1f8210f Fix Madara sources 2021-10-30 12:23:53 +05:30
Rajarshee Chatterjee 9423054b10 Add OnlyMTL 2021-10-30 11:07:41 +05:30
Rajarshee Chatterjee d11348d9a3 Add parallel searching in global search and migration 2021-10-30 09:59:25 +05:30
Rajarshee Chatterjee 8ec90ae8f7 Fix NitroScans novelName 2021-10-29 16:01:14 +05:30
Rajarshee Chatterjee 5fde669106 Add NitroScans 2021-10-29 15:58:12 +05:30
Rajarshee Chatterjee c6cdf1da0e Add MTLCorner (Closes LNReader/lnreader-sources#63) 2021-10-29 14:52:39 +05:30
Rajarshee Chatterjee 8cb0a5eb73 Fix RanobeHub search (Closes LNReader/lnreader-sources#101) 2021-10-29 13:57:59 +05:30
Rajarshee Chatterjee 09e15607d5 Fix useEffect cleanup in global search and migration 2021-10-29 13:57:05 +05:30
Rajarshee Chatterjee a9d399ea6d Fix crash when genre is an empty string 2021-10-29 13:54:48 +05:30
Rajarshee Chatterjee b9eddc2cc2 Fix Yushubo (Closes LNReader/lnreader-sources#100) 2021-10-29 13:47:46 +05:30
Rajarshee Chatterjee bb68b2f407 Fix crash when chapter release date is empty string 2021-10-28 17:53:52 +05:30
Rajarshee Chatterjee 5e0d19a9c9 Fix crash when chapter release date is empty string 2021-10-28 17:26:28 +05:30
Rajarshee Chatterjee 0aa78e56c8 Fix duplicate entries in library 2021-10-28 17:23:51 +05:30
Rajarshee Chatterjee 078e311995 Fix RewayatAr (Closes LNReader/lnreader-sources#96) 2021-10-28 17:19:52 +05:30
Rajarshee Chatterjee 9a22eba72c Fix next page not loading in browse 2021-10-28 08:34:14 +05:30
Rajarshee Chatterjee 2b0032a4e4 Fix ArNovel (Closes LNReader/lnreader-sources#95) 2021-10-28 08:19:49 +05:30
Rajarshee Chatterjee 708225c855 Add Chireads (Closes LNReader/lnreader-sources#98) 2021-10-28 07:33:03 +05:30
Rajarshee Chatterjee e514876170 Release v1.1.6
Lint / ESLint (push) Has been cancelled
2021-10-27 11:08:41 +05:30
Rajarshee Chatterjee 911d25bb84 Minor fixes 2021-10-27 11:08:29 +05:30
Rajarshee Chatterjee b6d2e43d3d Add bottom inset padding 2021-10-27 07:34:47 +05:30
Rajarshee Chatterjee 7375eb7ad0 Fix splitscreen view crash (Closes #77) 2021-10-27 06:48:46 +05:30
Rajarshee Chatterjee 627592d477 Add IndoWebNovel and Fix MeioNovel
Closes LNReader/lnreader-sources#93
LNReader/lnreader-sources#88
2021-10-27 06:02:03 +05:30
Rajarshee Chatterjee dbe2d13b80 fix(source): Yushubo
Closes LNReader/lnreader-sources#92
2021-10-26 22:04:57 +05:30
Rajarshee Chatterjee 97e172a2aa Add NovelRingan
LNReader/lnreader-sources#88
2021-10-26 19:59:55 +05:30
Rajarshee Chatterjee ba083d1afe Add NovelSpace
Closes LNReader/lnreader-sources#91
2021-10-26 18:48:20 +05:30
Rajarshee Chatterjee 9e614c6753 Fix search bar icon spacing 2021-10-26 18:04:07 +05:30
Rajarshee Chatterjee 5054e60195 Add Cleanup function 2021-10-26 18:03:17 +05:30
Rajarshee Chatterjee 2aa36393a6 Add MoreNovel
LNReader/lnreader-sources#88
2021-10-26 17:45:03 +05:30
Rajarshee Chatterjee c77b166fec Fix RainOfSnow language
Closes LNReader/lnreader-sources#87
2021-10-26 08:43:35 +05:30
Rajarshee Chatterjee 73276bd05f fix(source): LunarLetters 2021-10-25 09:16:32 +05:30
Rajarshee Chatterjee 7f47661468 Add MtlReader and MyLoveNovel
Closes LNReader/lnreader-sources#72 & LNReader/lnreader-sources#82
2021-10-25 08:35:12 +05:30
Rajarshee Chatterjee ec63de8115 Fix Arabic sources
Closes LNReader/lnreader-sources#86
2021-10-24 09:13:12 +05:30
Rajarshee Chatterjee ee277bfbf1 Fix fullscreen mode crash 2021-10-21 15:44:40 +05:30
Rajarshee Chatterjee e330eb122f fix(source): Madara 2021-10-20 20:21:52 +05:30
Rajarshee Chatterjee d84935a6a6 Fix UpdateScreen search crash 2021-10-20 20:21:34 +05:30
Rajarshee Chatterjee 6d852dc138 Fix workflow 2021-10-19 16:15:13 +05:30
Bread Genie 4bd5e9b4f5 ci: add eslint check (#86)
* ci: add eslint check

* ci: add lint name
2021-10-19 16:07:14 +05:30
Rajarshee Chatterjee 4fc480d2e9 Ignore/remove eslint errors 2021-10-19 16:05:29 +05:30
Rajarshee Chatterjee 3760b5ae4e Revert BottomNavigator and IconButton changes 2021-10-19 09:41:44 +05:30
Rajarshee Chatterjee f286f9337e Merge branch 'main' of https://github.com/LNReader/lnreader into main 2021-10-18 20:50:14 +05:30
Rajarshee Chatterjee bca620ea37 Fix updates tab crash 2021-10-18 20:50:03 +05:30
Rajarshee Chatterjee eb9516adda Revert changes in SourceScreen 2021-10-18 20:49:41 +05:30
Rajarshee Chatterjee 8dbec40b9d fix(source): Madara new chapter endpoint 2021-10-18 20:41:18 +05:30
Bread Genie bdac5161d2 docs: add contributing guide (#89) 2021-10-18 19:47:53 +05:30
Rajarshee Chatterjee 6eca36c295 Create NativeModule for navigation bar color 2021-10-18 09:42:14 +05:30
Rajarshee Chatterjee 5cccc7c556 Fix chapterName color in UpdateItem 2021-10-18 08:36:21 +05:30
Rajarshee Chatterjee 5350bf92de Fix UpdateItem chapterName color 2021-10-17 11:07:06 +05:30
Rajarshee Chatterjee 662610b227 Update light themes 2021-10-17 10:59:53 +05:30
Rajarshee Chatterjee 8d53125184 fix(source): NovelHall
Closes LNReader/lnreader-sources#83
2021-10-17 10:10:10 +05:30
Rajarshee Chatterjee a61d08f443 Fix SourceScreen 2021-10-17 10:04:35 +05:30
Rajarshee Chatterjee d8cd2b184a Revert readme icon 2021-10-16 13:21:11 +05:30
Marcin Majewski 33ceb60850 eslint quick-fix (#87)
* fix(github-check): Catch github connection errors

* fix(eslint): fixed eslint warnings and errors

Fixed every eslint warning and error that wasn't one of the following:
- react-hooks/exhaustive-deps
- no-console

Added .vscode to .gitignore
Added no-console:warn to eslintrc

* fix(gradlew): set file to runnable (chmod 755)

* remove .vscode
2021-10-15 18:42:40 +05:30
Rajarshee Chatterjee ef1a9d1f35 Horizontal seekbar 2021-10-13 10:50:46 +05:30
Rajarshee Chatterjee dabd0c5401 Refactor library 2021-10-13 10:50:36 +05:30
Rajarshee Chatterjee 3ae029c77b Rename files and run prettier 2021-10-13 06:48:43 +05:30
Rajarshee Chatterjee efe96d45ea Add delete downloaded chapters snackbar (Closes #72) 2021-10-11 11:25:53 +05:30
Rajarshee Chatterjee 06ca51a841 Fix updates search crash 2021-10-10 21:05:46 +05:30
Rajarshee Chatterjee b947ec2665 Update splash screen and delete old assets 2021-10-10 21:05:21 +05:30
Rajarshee Chatterjee c262c1e1de Add option to only show pinned sources 2021-10-10 10:45:57 +05:30
Rajarshee Chatterjee 19d089fa7a Use SectionList for updates and history 2021-10-10 10:18:23 +05:30
Rajarshee Chatterjee 9447d10c79 fix(source): Madara 2021-10-09 17:38:52 +05:30
Rajarshee Chatterjee d2e2314a3e fix(source): Madara 2021-10-09 11:38:11 +05:30
Rajarshee Chatterjee 9fe74ad137 Minor fixes 2021-10-09 11:37:56 +05:30
Rajarshee Chatterjee 5877448f9d fix(source): WoopRead 2021-10-05 14:54:16 +05:30
Rajarshee Chatterjee fb5d5cf186 Fix duplicate chapters in download queue 2021-10-05 09:20:52 +05:30
Rajarshee Chatterjee 8faac73558 Minor fixes 2021-10-05 09:02:21 +05:30
Rajarshee Chatterjee 3f9c662c68 Refactor Checkbox and RadioButton 2021-10-04 13:26:49 +05:30
Rajarshee Chatterjee ecce374abe Create CODE_OF_CONDUCT.md 2021-10-02 16:45:49 +05:30
Rajarshee Chatterjee 48a67402ff Clear git cache 2021-10-02 15:27:14 +05:30
Rajarshee Chatterjee 7c4da7f761 Refactor (#82) 2021-10-02 15:21:56 +05:30
Rajarshee Chatterjee 3daa11f642 feat(source): Add MtlNovel (Id)
LNReader/lnreader-sources#74
2021-10-02 14:26:37 +05:30
Rajarshee Chatterjee f26292f73a Fix workflow 2021-09-30 09:28:30 +05:30
Rajarshee Chatterjee 49160b7d98 Add ESLint and Prettier 2021-09-30 08:06:43 +05:30
Rajarshee Chatterjee e40af59230 Release v1.1.5 2021-09-24 17:11:38 +05:30
Rajarshee Chatterjee 8084cdbffb feat(source): Add ArthurScans
LNReader/lnreader-sources#71
2021-09-23 11:31:45 +05:30
Rajarshee Chatterjee dc9529c322 feat(source): Add ReaperScans Br
LNReader/lnreader-sources#71
2021-09-23 10:40:26 +05:30
Rajarshee Chatterjee 91168a335b Minor fixes 2021-09-23 10:39:08 +05:30
Rajarshee Chatterjee a6b3eb9350 Add text to speech play/pause 2021-09-21 09:51:01 +05:30
Rajarshee Chatterjee 0ce4e6b985 Increase bottom padding 2021-09-21 09:49:47 +05:30
Rajarshee Chatterjee 6684848a42 Fix FAB text color 2021-09-21 08:56:03 +05:30
Rajarshee Chatterjee 87d12cabb3 fix(source): RanobeHub 2021-09-21 08:51:40 +05:30
Rajarshee Chatterjee e01fc21a49 feat(source): Add Rain Of Snow
Closes LNReader/lnreader-sources#60
2021-09-15 10:09:09 +05:30
Rajarshee Chatterjee f0cfd9066b feat(source): Add Novel De Glace
Closes LNReader/lnreader-sources#57
2021-09-15 09:41:58 +05:30
Rajarshee Chatterjee c2cc6ea96b Option to clear updates tab 2021-09-15 09:26:24 +05:30
Rajarshee Chatterjee eeeea6b4e0 feat(source): Add Travis Translations
Closes (lnreader-sources#59)
2021-09-13 16:48:10 +05:30
Rajarshee Chatterjee ddce153b53 fix(source): ReaperScans 2021-09-13 16:01:11 +05:30
Rajarshee Chatterjee 38e45ca097 Downloaded only mode 2021-09-13 15:36:05 +05:30
Rajarshee Chatterjee a6a60607a7 Minor fixes 2021-09-12 08:46:58 +05:30
Rajarshee Chatterjee d3e772f0dd Add option to remove backdrop 2021-09-12 08:46:35 +05:30
Rajarshee Chatterjee 095d46681f fix(source): TuNovelaLigera 2021-09-12 08:46:06 +05:30
Rajarshee Chatterjee 3e4e967197 Enlarge cover 2021-09-11 21:42:54 +05:30
Rajarshee Chatterjee c5b4e7b902 Option to use fab instead of button 2021-09-11 10:13:41 +05:30
Rajarshee Chatterjee e9421a5fd0 fix: WPMangaStream (Closes #75) 2021-09-11 08:44:18 +05:30
Rajarshee Chatterjee afef0d63ce Edit status in edit info modal 2021-09-11 08:40:32 +05:30
Rajarshee Chatterjee e68a5c5f82 Minor fixes 2021-09-10 10:04:07 +05:30
Rajarshee Chatterjee ff1635b817 fix(source): Fix ReadLightNovel
Closes LNReader/LNReader-sources#65
2021-09-10 09:35:25 +05:30
Rajarshee Chatterjee f1ca221b91 Add option to only update ongoing novels (Closes #73) 2021-09-10 09:21:13 +05:30
Rajarshee Chatterjee 5a1106fc68 Add Text to Speech (Closes #22) 2021-08-31 10:01:23 +05:30
Rajarshee Chatterjee 3b49a1e516 Minor fixes 2021-08-31 08:03:33 +05:30
Rajarshee Chatterjee 85acbc8c4a Appearance settings 2021-08-29 11:02:24 +05:30
Rajarshee Chatterjee 66e0be5e84 Add option to turn off fullscreen (Closes #70) 2021-08-28 07:27:05 +05:30
Rajarshee Chatterjee 2234006272 Fix fullscreen not working on changing chapters 2021-08-28 07:00:48 +05:30
Rajarshee Chatterjee eca00ddcfa Experimental auto scroll (Closes #63) 2021-08-27 14:28:15 +05:30
Rajarshee Chatterjee 2328e55105 Show time and battery level (Closes #65) 2021-08-27 11:43:17 +05:30
Rajarshee Chatterjee b8a25b9172 Multiple select in chapters (Closes #69) 2021-08-26 21:50:05 +05:30
Rajarshee Chatterjee 9af8d55985 Add option to download unread chapters 2021-08-26 20:18:07 +05:30
Rajarshee Chatterjee 4777f453a4 Refactor themes 2021-08-25 11:15:40 +05:30
Rajarshee Chatterjee 4a0195762d Cross fade 2021-08-25 08:52:51 +05:30
Rajarshee Chatterjee e8785c2905 Minor UI adjustments 2021-08-24 19:26:11 +05:30
Rajarshee Chatterjee 1302cbde16 Draw content under navbar 2021-08-24 16:09:09 +05:30
Rajarshee Chatterjee 43d0adced8 feat(source): Add Mystical Series
Closes LNReader/LNReader-sources#61
2021-08-24 11:16:19 +05:30
Rajarshee Chatterjee 0c8b30cd72 feat(source): Add WuxiaWorld.Site
Closes LNReader/LNReader-sources#58
2021-08-24 11:08:58 +05:30
Rajarshee Chatterjee cc86fc7da4 feat(source): Add EpikNovel
Closes LNReader/LNReader-sources#55
2021-08-24 10:56:16 +05:30
Rajarshee Chatterjee 625acdb585 Release v1.1.4 2021-08-15 13:37:13 +05:30
Rajarshee Chatterjee 93617e60bd feat(source): Add Light Novel Updates 2021-08-14 08:56:59 +05:30
Rajarshee Chatterjee d75c607f67 feat(source): Add NovelOnlineFull.com 2021-08-14 08:04:31 +05:30
Marcin Majewski dd087ff485 fix(chapterlist): Bookmark not updating when added (#64)
When a chapter was bookmarked the list wasn't updating
2021-08-14 07:34:04 +05:30
Rajarshee Chatterjee 5da3e05bba feat: Show last update time 2021-08-13 10:12:26 +05:30
Rajarshee Chatterjee e628c3cfd6 fix: Remove text shadow in comfortable grid 2021-08-13 09:32:13 +05:30
Rajarshee Chatterjee deba021384 Readwn.com: Add user agents 2021-08-12 18:23:43 +05:30
Rajarshee Chatterjee c6d2ba8442 feat: Use tabs for settings and preview in reader settings 2021-08-12 18:21:56 +05:30
Rajarshee Chatterjee 6a3736dced fix: Crash when long pressing a cover in browse 2021-08-12 16:21:22 +05:30
Rajarshee Chatterjee f63ae573ba fix: Mark chapter as unread 2021-08-12 16:19:41 +05:30
Rajarshee Chatterjee 8f3020a544 Release v1.1.3 2021-08-11 16:25:05 +05:30
Rajarshee Chatterjee 04e32a4234 Minor fixes 2021-08-11 16:24:47 +05:30
Rajarshee Chatterjee 9b3d65dded refactor: Reorganize reader sheet 2021-08-11 09:53:18 +05:30
Rajarshee Chatterjee aa3a5c2d0c Minor fixes 2021-08-10 14:32:25 +05:30
Rajarshee Chatterjee 2aab5621a6 feat: Select novels in library 2021-08-10 13:34:19 +05:30
Rajarshee Chatterjee b4b7e6770d feat(source): Add Divine Dao Library
Closes LNReader/lnreader-sources#54
2021-08-09 12:44:32 +05:30
Rajarshee Chatterjee 0ed65d64e4 fix: novelCover crash in list view 2021-08-09 07:26:04 +05:30
Rajarshee Chatterjee a7aaa7d230 feat: Custom CSS 2021-08-07 12:08:31 +05:30
Rajarshee Chatterjee e358b3753f feat(source): Add ranobehub 2021-08-07 08:34:08 +05:30
Rajarshee Chatterjee 780a67e1a6 Update README.md 2021-08-06 10:50:00 +05:30
Rajarshee Chatterjee 5b57e78486 Update README.md 2021-08-06 10:37:22 +05:30
Rajarshee Chatterjee 6430c11cae Update README.md 2021-08-06 10:31:09 +05:30
Rajarshee Chatterjee 322bfc224d Full backups (Closes #34) 2021-08-05 12:24:54 +05:30
Rajarshee Chatterjee a14d35f031 Minor fixes 2021-08-05 12:23:59 +05:30
Rajarshee Chatterjee f03b1703e2 fix(source): ArNovel (Closes #61)
Closes LNReader/lnreader-sources#52
2021-08-04 09:20:35 +05:30
Rajarshee Chatterjee 40d2052f16 Custom covers and open links in reader 2021-08-03 14:38:54 +05:30
Rajarshee Chatterjee 01814e92d0 Fix empty novelCover crash 2021-08-03 10:52:13 +05:30
Rajarshee Chatterjee dffc9c3b99 fix(source): LightNovelPub 2021-08-03 10:48:12 +05:30
Rajarshee Chatterjee 8bb3ffe82c fix(source): ComradeMao 2021-08-03 10:40:34 +05:30
Rajarshee Chatterjee c746081dee Minor fixes 2021-08-03 09:44:14 +05:30
Rajarshee Chatterjee d25fe85a64 Fix discord link 2021-08-02 16:52:32 +05:30
Rajarshee Chatterjee 92d9d53da7 Fix no novelCover crash 2021-07-31 13:32:00 +05:30
Rajarshee Chatterjee 17fcd96f16 Source fixes 2021-07-30 09:15:15 +05:30
Rajarshee Chatterjee 31bada1c1a Refactor 2021-07-29 20:49:21 +05:30
Rajarshee Chatterjee 605bd6a514 Add edit info modal 2021-07-29 11:17:13 +05:30
Rajarshee Chatterjee 01bac76bed Minor fixes 2021-07-29 09:35:55 +05:30
Rajarshee Chatterjee b5ed62d9f8 Fix global search and splashscreen 2021-07-28 17:47:23 +05:30
Rajarshee Chatterjee fd21cc6e85 Minor fixes 2021-07-28 12:14:38 +05:30
Rajarshee Chatterjee 40f1495cf1 Add webview option to support tables and original text style 2021-07-28 11:46:57 +05:30
Rajarshee Chatterjee 983b069dba Add Readwn.com source 2021-07-28 09:47:12 +05:30
Rajarshee Chatterjee e21101ca28 Fix build 2021-07-26 17:01:18 +05:30
Bread Genie d381e878bc docs(readme): Add badges (#60) 2021-07-26 16:59:43 +05:30
Rajarshee Chatterjee bcf5632668 Remove history from redux state and minor fixes 2021-07-26 08:24:59 +05:30
Bread Genie ac8bca7f03 feat(sources): Add ReaperScans Novels (#59) 2021-07-25 21:38:33 +05:30
Bread Genie 62a5e27b1e fix: Indonesia -> Indonesian (#58) 2021-07-25 19:19:08 +05:30
Rajarshee Chatterjee 7c5a9a407f Add new sources 2021-07-23 09:04:47 +05:30
Rajarshee Chatterjee d8d231cb90 Add source WLNUpdates 2021-07-22 09:08:40 +05:30
Rajarshee Chatterjee a5f90eaf8b Add new sources 2021-07-21 20:32:30 +05:30
Rajarshee Chatterjee ec50189ea4 Minor fixes 2021-07-21 08:34:45 +05:30
Rajarshee Chatterjee ccdccdb6bb Remove prevChapter and nextChapter 2021-07-20 08:38:55 +05:30
Bread Genie 059f440713 fix(source): nextChapter link undefined (#55) 2021-07-20 07:55:48 +05:30
Rajarshee Chatterjee b695f57ef4 Refactor 2021-07-19 09:32:48 +05:30
Rajarshee Chatterjee db86b707e7 Fix bookmark icon 2021-07-19 06:00:51 +05:30
Rajarshee Chatterjee 7db4e4b872 Minor fixes 2021-07-18 18:21:25 +05:30
Rajarshee Chatterjee a2c6e9fe58 Custom checkbox 2021-07-18 10:31:07 +05:30
Rajarshee Chatterjee 6c27993454 Remove [hr]() chapter content 2021-07-18 10:30:21 +05:30
Rajarshee Chatterjee 63de0a3794 Fix long chapter names (Closes #53) 2021-07-17 20:24:32 +05:30
Marcin Majewski 93fbcf1246 fix(syosetu): change oneshot chapter name (#52)
Changed oneshot chapter names to "Oneshot" to avoid too long chapters names destroying UI.
2021-07-17 19:55:24 +05:30
Rajarshee Chatterjee 50357f7d6f Release v1.1.2 2021-07-17 08:12:04 +05:30
Rajarshee Chatterjee 1a8d640db1 Add delete downloads dialog and refactor themes 2021-07-17 07:13:00 +05:30
Rajarshee Chatterjee dc6b2deddd Minor fixes 2021-07-16 22:05:49 +05:30
Rajarshee Chatterjee a9fcf2fe08 Fix NovelCover 2021-07-16 17:46:04 +05:30
Rajarshee Chatterjee f195b9e6df Minor fixes 2021-07-16 15:50:01 +05:30
Rajarshee Chatterjee d07fd26cb3 Refactor 2021-07-16 15:22:36 +05:30
Rajarshee Chatterjee 5aee0d1b04 Refactor 2021-07-15 22:51:50 +05:30
Rajarshee Chatterjee c4457d74c4 Parse links in chapter 2021-07-15 08:52:04 +05:30
Rajarshee Chatterjee ba90a6fb84 Refactor sources and show headings 2021-07-14 12:27:07 +05:30
Bread Genie e7424cea06 Fix: source images (#50)
One of the source image was linked to a fork and rest were linked to the old extension repo (this would still work, but for consistency's sake every image is linked to the repo under the org).
2021-07-14 10:19:16 +05:30
Rajarshee Chatterjee e274feda6e Minor fixes 2021-07-13 17:07:55 +05:30
Bread Genie 8ec2378191 feat(source): Add Yushubo (#48) 2021-07-13 17:05:42 +05:30
Rajarshee Chatterjee ef57a98681 Minor fixes 2021-07-12 09:49:05 +05:30
Rajarshee Chatterjee bdda959f36 Improve novel updates 2021-07-11 16:14:17 +05:30
Rajarshee Chatterjee 04f3ba2b45 Refactor themes 2021-07-11 09:43:12 +05:30
Rajarshee Chatterjee f1a261ab28 Add ranobes.net 2021-07-10 10:52:26 +05:30
Rajarshee Chatterjee da2ee3b883 Pause/Resume downloads in queue 2021-07-09 17:58:19 +05:30
Marcin Majewski b98d3861b4 format: Setting Prettier formating in package.json (#47)
Because of different formatting on some computers
Prettier settings were set in package.json file so that everyone
will format their code in the same way using Prettier
2021-07-09 15:13:56 +05:30
Rajarshee Chatterjee ff59330d20 Add Novel Updates 2021-07-09 14:24:26 +05:30
Rajarshee Chatterjee b0639e79a8 Add new sources 2021-07-09 08:51:08 +05:30
Rajarshee Chatterjee 5931a0dc07 Cleanup 2021-07-08 11:22:45 +05:30
Rajarshee Chatterjee cf40acb725 Create multisrc 2021-07-07 14:56:01 +05:30
Rajarshee Chatterjee a2974ccb44 Merge 2021-07-06 20:11:45 +05:30
Rajarshee Chatterjee 5eda558f09 Add LNMTL 2021-07-06 20:07:45 +05:30
Marcin Majewski cf7f1402d3 Fixed Syosetu name and Oneshot not working (#46)
* Fixed Syosetu name and Oneshot not working

Oneshots didn't work at all because of use of scaner from lnreader-sources
Oneshots now load properly desciptions (it didn't work before)
Syosetsu changed into Syosetu as it should be

* Remove unnecessary console.logs
2021-07-06 20:06:36 +05:30
Rajarshee Chatterjee 834a8d9e2e Minor fix 2021-07-06 06:16:28 +05:30
Rajarshee Chatterjee fe5b3f4a5b Add Syosetu 2021-07-06 06:11:30 +05:30
Rajarshee Chatterjee ec4eaf4d49 Remove mipmap-anydpi-v26 folder 2021-07-05 16:15:20 +05:30
Rajarshee Chatterjee 0c0b599452 v1.1.0 2021-07-04 21:04:18 +05:30
Rajarshee Chatterjee ac26c67361 Fix build workflow 2021-07-04 10:45:19 +05:30
Rajarshee Chatterjee d205572a5e Add Gradle cache 2021-07-04 10:36:53 +05:30
Rajarshee Chatterjee e5d52fcd9d Fix build workflow 2021-07-04 10:23:39 +05:30
Rajarshee Chatterjee 61424e533a Minor fixes 2021-07-04 10:16:29 +05:30
Rajarshee Chatterjee c3ef170385 Lightnovelpub: Fix chapterUrl 2021-07-03 16:31:55 +05:30
Rajarshee Chatterjee 430c7a7341 Minor fixes 2021-07-03 14:59:55 +05:30
Rajarshee Chatterjee e4b934061b History and UI fixes 2021-07-03 13:43:14 +05:30
Rajarshee Chatterjee 3579671ade Fix global search and migration 2021-07-03 13:42:48 +05:30
Rajarshee Chatterjee 893d229c25 Add themes 2021-07-03 11:52:31 +05:30
Rajarshee Chatterjee ea3f5ac7ee Add jump to chapter 2021-07-03 11:24:04 +05:30
Rajarshee Chatterjee e4027efbb1 Add update library on start option and save select text option 2021-07-03 10:06:07 +05:30
Rajarshee Chatterjee f5dd7153cc Add details in novel updates & mal 2021-06-30 10:23:26 +05:30
Rajarshee Chatterjee 38b0097261 Add Scribble Hub 2021-06-30 10:22:00 +05:30
Rajarshee Chatterjee 2f7215512f Fix continue reading button 2021-06-27 19:18:00 +05:30
Rajarshee Chatterjee 9a96a34cda Add NovelPassion & Royal Road 2021-06-27 19:17:43 +05:30
Rajarshee Chatterjee a7f6d2cd3c Fix sources 2021-06-27 10:51:27 +05:30
Rajarshee Chatterjee 5dfe6a7ab8 Minor fixes 2021-06-24 07:53:30 +05:30
Rajarshee Chatterjee 3fb35e2d32 v1.1.0 2021-06-20 23:06:06 +05:30
Rajarshee Chatterjee 35d5cf987a Fixes 2021-06-20 23:03:02 +05:30
Rajarshee Chatterjee 7e28d12a8a v1.1.0 2021-06-20 21:46:16 +05:30
Rajarshee Chatterjee ff575de2e8 Fixes 2021-06-20 21:44:58 +05:30
Rajarshee Chatterjee 962fcc534d Minor fixes 2021-06-20 18:19:50 +05:30
Rajarshee Chatterjee acd8843b0e Fix sources 2021-06-20 17:49:53 +05:30
Rajarshee Chatterjee c956d764c5 Add option to search all sources 2021-06-20 17:39:31 +05:30
Rajarshee Chatterjee ca0f62f118 Add pagination 2021-06-20 11:20:40 +05:30
Rajarshee Chatterjee 4d766555b7 Add incognito mode 2021-06-20 08:31:51 +05:30
Rajarshee Chatterjee edcc4c0bcd Use background service for downloads and updates (fixes #36) 2021-06-19 13:47:07 +05:30
Rajarshee Chatterjee 8e1a9274e5 Rename 2021-06-19 09:18:50 +05:30
Rajarshee Chatterjee d0b11c9b47 Rename folders 2021-06-19 09:17:52 +05:30
Rajarshee Chatterjee 3a9784a7a0 Fix launch crash on android 7 2021-06-15 09:46:50 +05:30
Rajarshee Chatterjee 66e3945427 Add option to disbale swipe gestures 2021-06-15 09:46:24 +05:30
Rajarshee Chatterjee 7773d50607 Filter sources by languages 2021-06-13 10:47:41 +05:30
Rajarshee Chatterjee 721d3842fb Fix swipe directions 2021-06-12 20:29:07 +05:30
Rajarshee Chatterjee 773c33f3bf Add swipe gestures 2021-06-12 15:52:42 +05:30
Rajarshee Chatterjee 1addb54690 Vertical Scrollbar 2021-06-12 14:32:34 +05:30
Rajarshee Chatterjee ce29a5456d Html to text 2021-06-11 17:54:07 +05:30
Rajarshee Chatterjee 4eda2d4624 Add action bar and use pressable 2021-06-11 17:53:33 +05:30
Rajarshee Chatterjee bae2fa40f3 Chapter footer 2021-06-11 17:52:34 +05:30
Rajarshee Chatterjee cf5d9e18bb Update all english sources 2021-06-10 21:53:59 +05:30
Rajarshee Chatterjee e87ecb48b4 Add more sources and fix sources 1-9 2021-06-10 18:29:13 +05:30
Rajarshee Chatterjee d4140fcc52 (~_~;) 2021-06-10 15:46:39 +05:30
Rajarshee Chatterjee 4858f22a88 Parse chapter 2021-06-10 11:51:22 +05:30
Rajarshee Chatterjee 6aa977a562 Add ReadLightNovel 2021-06-10 10:33:12 +05:30
492 changed files with 66933 additions and 14061 deletions
+3
View File
@@ -0,0 +1,3 @@
# Windows files
[*.bat]
end_of_line = crlf
+19
View File
@@ -0,0 +1,19 @@
module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': ['warn'],
'no-shadow': 'off',
'no-undef': 'off',
'react-native/no-inline-styles': 'warn',
'no-console': 'warn',
'react-hooks/exhaustive-deps': 'warn',
},
},
],
};
-4
View File
@@ -1,4 +0,0 @@
{
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
}
+3
View File
@@ -0,0 +1,3 @@
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

+35
View File
@@ -0,0 +1,35 @@
name: CI
on:
push:
branches:
- main
jobs:
build-android:
name: Build App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
npm install --legacy-peer-deps
- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew
- name: Build Android Release
run: |
cd android && ./gradlew assembleRelease --no-daemon
+19
View File
@@ -0,0 +1,19 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: npm i --legacy-peer-deps
- name: Run ESLint
run: npm run lint
+4 -1
View File
@@ -70,4 +70,7 @@ buck-out/
.expo/
web-build/
# @end expo-cli
# @end expo-cli
.vscode/
src/sources/en/generators/
+1
View File
@@ -0,0 +1 @@
_
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
+1
View File
@@ -0,0 +1 @@
**/node_modules
+10
View File
@@ -0,0 +1,10 @@
module.exports = {
tabWidth: 2,
bracketSpacing: true,
useTabs: false,
bracketSameLine: false,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
quoteProps: 'preserve',
};
+30 -32
View File
@@ -1,41 +1,39 @@
import React, { useEffect } from "react";
import { StatusBar } from "react-native";
import { enableFreeze } from 'react-native-screens';
import { useFonts } from "expo-font";
import { Provider as PaperProvider } from "react-native-paper";
import { Provider } from "react-redux";
import { persistor, store } from "./src/redux/store";
import { PersistGate } from "redux-persist/lib/integration/react";
enableFreeze(true);
import Main from "./src/Navigators/Main";
import React, { useEffect } from 'react';
import { StatusBar } from 'react-native';
import { createDB, deleteDb } from "./src/Database/DBHelper";
import { fonts } from "./src/Theme/fonts";
import { Provider as PaperProvider } from 'react-native-paper';
import { Provider } from 'react-redux';
import { persistor, store } from './src/redux/store';
import { PersistGate } from 'redux-persist/lib/integration/react';
import * as SplashScreen from 'expo-splash-screen';
import Main from './src/navigators/Main';
import { createDB } from './src/database/db';
import { SafeAreaProvider } from 'react-native-safe-area-context';
const App = () => {
const [loaded] = useFonts(fonts);
useEffect(() => {
SplashScreen.preventAutoHideAsync();
createDB();
}, []);
useEffect(() => {
createDB();
}, []);
if (!loaded) {
return null;
}
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<PaperProvider>
<StatusBar
translucent={true}
backgroundColor="transparent"
/>
<Main />
</PaperProvider>
</PersistGate>
</Provider>
);
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<SafeAreaProvider>
<PaperProvider>
<StatusBar translucent={true} backgroundColor="transparent" />
<Main />
</PaperProvider>
</SafeAreaProvider>
</PersistGate>
</Provider>
);
};
export default App;
+128
View File
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
rajarshee.adm@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
+40
View File
@@ -0,0 +1,40 @@
# Contributing Guide
Contributions are welcome and are greatly appreciated!
## Setting up your environment
After forking to your own github org or account, do the following steps to get started:
```bash
# clone your fork to your local machine
git clone https://github.com/<your-account-name>/lnreader.git
# step into local repo
cd lnreader
# install dependencies
npm install
# run metro for development
npm start
```
### Developing on Android
While the packager is running and you have an Android device or emulator connected to your computer, build and launch the Android app.
```
npm run android
```
### Style & Linting
This codebase's linting rules are enforced using [ESLint](http://eslint.org/).
It is recommended that you install an eslint plugin for your editor of choice when working on this
codebase, however you can always check to see if the source code is compliant by running:
```bash
npm run lint
```
+40 -12
View File
@@ -1,20 +1,48 @@
<h1 align="center">
<br>
LNReader
<br>
</h1>
<p align="center">LNReader is a Tachiyomi-like, free and open source light novel reader for Android.</p>
---
## Screenshots:
<p align="center">
<img src="./.github/readme-images/screenshots.png" align="center" height="350" />
<img src="./.github/readme-images/icon_alt.png" align="center" width="128" />
<p>
<h1 align="center">
LNReader
</h1>
<p align="center">
LNReader is a Tachiyomi-like, free and open source light novel reader for Android.
</p>
<div align="center">
<a href="https://github.com/LNReader/lnreader/actions/workflows/build.yml">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/LNReader/lnreader/CI">
</a>
<a href="https://discord.gg/QdcWN4MD63">
<img alt="Discord Chat" src="https://img.shields.io/discord/835746409357246465.svg?logo=discord&logoColor=white&logoWidth=20&labelColor=7289DA&label=Discord&color=17cf48">
</a>
<a href="https://github.com/LNReader/lnreader/releases/latest">
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/LNReader/lnreader">
</a>
<a href="https://github.com/LNReader/lnreader-preview/releases/latest">
<img alt="GitHub release (latest SemVer)" src="https://img.shields.io/github/v/release/LNReader/lnreader-preview?color=red&label=preview">
</a>
<a title="Crowdin" target="_blank" href="https://crowdin.com/project/lnreader"><img src="https://badges.crowdin.net/lnreader/localized.svg"></a>
<a href="https://github.com/LNReader/lnreader/blob/main/LICENSE">
<img alt="GitHub" src="https://img.shields.io/github/license/LNReader/lnreader">
</a>
</div>
<br>
<br>
<p align="center">
<img src="./.github/readme-images/screenshots.png" align="center" />
</p>
## Download
Get the app from our [releases page](https://github.com/rajarsheechatterjee/LNReader/releases).
## Sources
LNReader does not have any affiliation with the content providers available.
Source requests should be created at [LNReader/lnreader-sources](https://github.com/LNReader/lnreader-sources).
## License
[MIT ](https://github.com/rajarsheechatterjee/lnreader/blob/main/LICENSE)
+5 -2
View File
@@ -84,7 +84,6 @@ project.ext.react = [
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/expo-constants/scripts/get-app-config-android.gradle"
apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"
/**
* Set this to true to create two separate APKs instead of one:
@@ -136,7 +135,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.21"
versionName "1.1.10"
}
splits {
abi {
@@ -188,6 +187,10 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
+10
View File
@@ -8,3 +8,13 @@
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }
-keep public class com.dylanvann.fastimage.* {*;}
-keep public class com.dylanvann.fastimage.** {*;}
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
+77 -36
View File
@@ -1,36 +1,77 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.rajarsheechatterjee.LNReader">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme">
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@rajarsheechatterjee/LNReader"/>
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="41.0.0"/>
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/notification_icon"/>
<meta-data android:name="expo.modules.notifications.default_notification_color" android:resource="@color/notification_icon_color"/>
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="lnreader"/>
<data android:scheme="com.rajarsheechatterjee.LNReader"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
</application>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rajarsheechatterjee.LNReader">
<!-- Internet -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<!-- Storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!-- For background jobs -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
<application
android:name=".MainApplication"
android:largeHeap="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<meta-data
android:name="expo.modules.notifications.default_notification_icon"
android:resource="@drawable/notification_icon"/>
<meta-data
android:name="expo.modules.notifications.default_notification_color"
android:resource="@color/notification_icon_color"/>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.App.SplashScreen"
android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="lnreader"/>
<data android:scheme="com.rajarsheechatterjee.LNReader"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<service android:name="com.asterinet.react.bgactions.RNBackgroundActionsTask" />
</application>
</manifest>
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,62 +0,0 @@
// FullScreenModule.java
package com.rajarsheechatterjee.LNReader;
import android.os.Build;
import android.view.View;
import android.view.WindowManager;
import android.app.Activity;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
public class FullScreenModule extends ReactContextBaseJavaModule {
@Override
public String getName() {
return "FullScreen";
}
@ReactMethod
public void enable() {
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override
public void run() {
getCurrentActivity().getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
}
);
}
@ReactMethod
public void disable() {
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override
public void run() {
getCurrentActivity().getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
);
}
}
);
}
FullScreenModule(ReactApplicationContext reactContext) {
super(reactContext);
}
}
@@ -1,29 +0,0 @@
package com.rajarsheechatterjee.LNReader;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class FullScreenPackage implements ReactPackage {
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
@Override
public List<NativeModule> createNativeModules(
ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>();
modules.add(new FullScreenModule(reactContext));
return modules;
}
}
@@ -1,14 +1,20 @@
package com.rajarsheechatterjee.LNReader;
import android.content.res.Configuration;
import android.content.Intent;
import android.os.Bundle;
import android.graphics.Color;
import android.view.KeyEvent;
import android.view.WindowManager;
import android.os.Build;
import android.view.View;
import android.view.Window;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.rajarsheechatterjee.VolumeButtonListener.VolumeButtonListener;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import expo.modules.splashscreen.singletons.SplashScreen;
@@ -26,20 +32,55 @@ public class MainActivity extends ReactActivity {
sendBroadcast(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
// SplashScreen.show(...) has to be called after super.onCreate(...)
// Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
getWindow().setAttributes(layoutParams);
@Override
protected void onCreate(Bundle savedInstanceState) {
// SplashScreen.show(...) has to be called after super.onCreate(...)
// Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
layoutParams.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
getWindow().setAttributes(layoutParams);
}
Window w = getWindow();
w.setStatusBarColor(Color.TRANSPARENT);
w.setNavigationBarColor(Color.TRANSPARENT);
w.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
super.onCreate(null);
SplashScreen.show(this, SplashScreenImageResizeMode.COVER, ReactRootView.class, false);
}
super.onCreate(savedInstanceState);
SplashScreen.show(this, SplashScreenImageResizeMode.COVER, ReactRootView.class, false);
}
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (VolumeButtonListener.isActive()) {
int action = event.getAction();
int keyCode = event.getKeyCode();
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP:
if (action == KeyEvent.ACTION_DOWN) {
// volup
VolumeButtonListener.up();
if (!VolumeButtonListener.prevent)
return super.dispatchKeyEvent(event);
}
return true;
case KeyEvent.KEYCODE_VOLUME_DOWN:
if (action == KeyEvent.ACTION_DOWN) {
//voldown
VolumeButtonListener.down();
if (!VolumeButtonListener.prevent)
return super.dispatchKeyEvent(event);
}
return true;
default:
return super.dispatchKeyEvent(event);
}
}
return super.dispatchKeyEvent(event);
}
/**
* Returns the name of the main component registered from JavaScript.
@@ -59,4 +100,5 @@ public class MainActivity extends ReactActivity {
}
};
}
}
@@ -2,37 +2,24 @@ package com.rajarsheechatterjee.LNReader;
import android.app.Application;
import android.content.Context;
import android.net.Uri;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
import com.rajarsheechatterjee.LNReader.generated.BasePackageList;
import com.rajarsheechatterjee.VolumeButtonListener.VolumeButtonListenerPackage;
import org.unimodules.adapters.react.ReactAdapterPackage;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
import org.unimodules.core.interfaces.Package;
import org.unimodules.core.interfaces.SingletonModule;
import expo.modules.constants.ConstantsPackage;
import expo.modules.permissions.PermissionsPackage;
import expo.modules.filesystem.FileSystemPackage;
import expo.modules.updates.UpdatesController;
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Nullable;
import com.rajarsheechatterjee.LNReader.FullScreenPackage;
public class MainApplication extends Application implements ReactApplication {
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(
@@ -49,7 +36,8 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider));
packages.add(new FullScreenPackage());
packages.add(new com.rajarsheechatterjee.LNReader.NavigationBarColorPackage());
packages.add(new VolumeButtonListenerPackage());
return packages;
}
@@ -62,24 +50,6 @@ public class MainApplication extends Application implements ReactApplication {
protected JSIModulePackage getJSIModulePackage() {
return new ReanimatedJSIModulePackage();
}
@Override
protected @Nullable String getJSBundleFile() {
if (BuildConfig.DEBUG) {
return super.getJSBundleFile();
} else {
return UpdatesController.getInstance().getLaunchAssetFile();
}
}
@Override
protected @Nullable String getBundleAssetName() {
if (BuildConfig.DEBUG) {
return super.getBundleAssetName();
} else {
return UpdatesController.getInstance().getBundleAssetName();
}
}
};
@Override
@@ -92,10 +62,6 @@ public class MainApplication extends Application implements ReactApplication {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (!BuildConfig.DEBUG) {
UpdatesController.initialize(this);
}
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
@@ -8,22 +8,20 @@ public class BasePackageList {
public List<Package> getPackageList() {
return Arrays.<Package>asList(
new expo.modules.application.ApplicationPackage(),
new expo.modules.backgroundfetch.BackgroundFetchPackage(),
new expo.modules.constants.ConstantsPackage(),
new expo.modules.documentpicker.DocumentPickerPackage(),
new expo.modules.errorrecovery.ErrorRecoveryPackage(),
new expo.modules.filesystem.FileSystemPackage(),
new expo.modules.font.FontLoaderPackage(),
new expo.modules.haptics.HapticsPackage(),
new expo.modules.imageloader.ImageLoaderPackage(),
new expo.modules.keepawake.KeepAwakePackage(),
new expo.modules.lineargradient.LinearGradientPackage(),
new expo.modules.localization.LocalizationPackage(),
new expo.modules.notifications.NotificationsPackage(),
new expo.modules.permissions.PermissionsPackage(),
new expo.modules.sharing.SharingPackage(),
new expo.modules.splashscreen.SplashScreenPackage(),
new expo.modules.sqlite.SQLitePackage(),
new expo.modules.taskManager.TaskManagerPackage(),
new expo.modules.updates.UpdatesPackage(),
new expo.modules.webbrowser.WebBrowserPackage()
);
}
@@ -0,0 +1,170 @@
package com.rajarsheechatterjee.LNReader;
import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.graphics.Color;
import android.os.Build;
import android.app.Activity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import androidx.annotation.UiThread;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.bridge.WritableMap;
import java.util.HashMap;
import java.util.Map;
import com.facebook.react.uimanager.IllegalViewOperationException;
import static com.facebook.react.bridge.UiThreadUtil.runOnUiThread;
public class NavigationBarColorModule extends ReactContextBaseJavaModule {
public static final String REACT_CLASS = "NavigationBarColor";
private static final String ERROR_NO_ACTIVITY = "E_NO_ACTIVITY";
private static final String ERROR_NO_ACTIVITY_MESSAGE = "Tried to change the navigation bar while not attached to an Activity";
private static final String ERROR_API_LEVEL = "API_LEVEl";
private static final String ERROR_API_LEVEL_MESSAGE = "Only Android Oreo and above is supported";
private static ReactApplicationContext reactContext = null;
private static final int UI_FLAG_HIDE_NAV_BAR = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
public NavigationBarColorModule(ReactApplicationContext context) {
super(context);
reactContext = context;
}
public void setNavigationBarTheme(Activity activity, Boolean light) {
if (activity != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Window window = activity.getWindow();
int flags = window.getDecorView().getSystemUiVisibility();
if (light) {
flags |= View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
} else {
flags &= ~View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
}
window.getDecorView().setSystemUiVisibility(flags);
}
}
@Override
public String getName() {
return REACT_CLASS;
}
@Override
public Map<String, Object> getConstants() {
final Map<String, Object> constants = new HashMap<>();
constants.put("EXAMPLE_CONSTANT", "example");
return constants;
}
@ReactMethod
public void changeNavigationBarColor(final String color, final Boolean light, final Boolean animated, final Promise promise) {
final WritableMap map = Arguments.createMap();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (getCurrentActivity() != null) {
try {
final Window window = getCurrentActivity().getWindow();
runOnUiThread(new Runnable() {
@Override
public void run() {
if (color.equals("transparent") || color.equals("translucent")) {
window.clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
if (color.equals("transparent")) {
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
} else {
window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
setNavigationBarTheme(getCurrentActivity(), light);
map.putBoolean("success", true);
promise.resolve(map);
return;
} else {
window.clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
if (animated) {
Integer colorFrom = window.getNavigationBarColor();
Integer colorTo = Color.parseColor(String.valueOf(color));
//window.setNavigationBarColor(colorTo);
ValueAnimator colorAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), colorFrom, colorTo);
colorAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animator) {
window.setNavigationBarColor((Integer) animator.getAnimatedValue());
}
});
colorAnimation.start();
} else {
window.setNavigationBarColor(Color.parseColor(String.valueOf(color)));
}
setNavigationBarTheme(getCurrentActivity(), light);
WritableMap map = Arguments.createMap();
map.putBoolean("success", true);
promise.resolve(map);
}
});
} catch (IllegalViewOperationException e) {
map.putBoolean("success", false);
promise.reject("error", e);
}
} else {
promise.reject(ERROR_NO_ACTIVITY, new Throwable(ERROR_NO_ACTIVITY_MESSAGE));
}
} else {
promise.reject(ERROR_API_LEVEL, new Throwable(ERROR_API_LEVEL_MESSAGE));
}
}
@ReactMethod
public void hideNavigationBar(Promise promise) {
try {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (getCurrentActivity() != null) {
View decorView = getCurrentActivity().getWindow().getDecorView();
decorView.setSystemUiVisibility(UI_FLAG_HIDE_NAV_BAR);
}
}
});
} catch (IllegalViewOperationException e) {
WritableMap map = Arguments.createMap();
map.putBoolean("success", false);
promise.reject("error", e);
}
}
@ReactMethod
public void showNavigationBar(Promise promise) {
try {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (getCurrentActivity() != null) {
Window w = getCurrentActivity().getWindow();
w.setStatusBarColor(Color.TRANSPARENT);
w.setNavigationBarColor(Color.TRANSPARENT);
View decorView = w.getDecorView();
decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
}
}
});
} catch (IllegalViewOperationException e) {
WritableMap map = Arguments.createMap();
map.putBoolean("success", false);
promise.reject("error", e);
}
}
}
@@ -0,0 +1,25 @@
package com.rajarsheechatterjee.LNReader;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class NavigationBarColorPackage implements ReactPackage {
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<>();
modules.add(new NavigationBarColorModule(reactContext));
return modules;
}
}
@@ -0,0 +1,93 @@
package com.rajarsheechatterjee.VolumeButtonListener;
import androidx.annotation.NonNull;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
public class VolumeButtonListener extends ReactContextBaseJavaModule {
static ReactApplicationContext appContext;
public VolumeButtonListener(ReactApplicationContext context) {
super(context);
appContext = context;
}
private static boolean active = false;
public static boolean isActive() {
return active;
}
public static boolean prevent = false;
public static void sendEvent(boolean up) {
if (active) {
WritableMap args = Arguments.createMap();
if (up)
appContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("VolumeUp", args);
else
appContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("VolumeDown", args);
}
}
public static void down() {
sendEvent(false);
}
public static void up() {
sendEvent(true);
}
@ReactMethod
public void connect() {
active = true;
}
@ReactMethod
void disconnect() {
active = false;
}
@ReactMethod
public void pause() {
active = false;
}
@ReactMethod
public void unpause() {
active = true;
}
@ReactMethod
public void preventDefault() {
prevent = true;
}
@ReactMethod
public void noPreventDefault() {
prevent = false;
}
@NonNull
@Override
public String getName() {
return "VolumeButtonListener";
}
@ReactMethod
public void addListener(String eventName) {
// Keep: Required for RN built in Event Emitter Calls.
}
@ReactMethod
public void removeListeners(Integer count) {
// Keep: Required for RN built in Event Emitter Calls.
}
}
@@ -0,0 +1,30 @@
package com.rajarsheechatterjee.VolumeButtonListener;
import androidx.annotation.NonNull;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class VolumeButtonListenerPackage implements ReactPackage {
@NonNull
@Override
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
List<NativeModule> modules = new ArrayList<NativeModule>();
modules.add(new VolumeButtonListener(reactContext));
return modules;
}
@NonNull
@Override
public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
return Collections.emptyList();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

+3 -3
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<color name="iconBackground">#FFFFFF</color>
<color name="splashscreen_background">#000000</color>
<color name="splashscreen_background">#202125</color>
<color name="colorPrimary">#023c69</color>
<color name="colorPrimaryDark">#00000000</color>
<color name="navigationBarColor">#000000</color>
<color name="colorPrimaryDark">#202125</color>
<color name="navigationBarColor">#202125</color>
<color name="notification_icon_color">#00adb5</color>
</resources>
+4 -4
View File
@@ -8,16 +8,16 @@
<item name="android:textColor">#000000</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="android:navigationBarColor">#000000</item>
<item name="android:statusBarColor">#000000</item>
<item name="android:navigationBarColor">#202125</item>
<item name="android:statusBarColor">#202125</item>
</style>
<style name="Theme.App.SplashScreen" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually -->
<!-- Customize your splash screen theme here -->
<item name="android:windowBackground">@drawable/splashscreen</item>
<item name="android:navigationBarColor">#000000</item>
<item name="android:statusBarColor">#000000</item>
<item name="android:navigationBarColor">#202125</item>
<item name="android:statusBarColor">#202125</item>
</style>
</resources>
Vendored Regular → Executable
View File
+8 -43
View File
@@ -1,46 +1,11 @@
{
"expo": {
"name": "LNReader",
"slug": "LNReader",
"scheme": "lnreader",
"version": "1.0.21",
"orientation": "default",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0,
"enabled": false
},
"notification": {
"icon": "./assets/notification.png",
"color": "#00adb5"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.rajarsheechatterjee.LNReader"
},
"androidStatusBar": {
"barStyle": "light-content",
"backgroundColor": "#00000000",
"translucent": true
},
"androidNavigationBar": {
"barStyle": "light-content",
"backgroundColor": "#000000"
},
"web": {
"favicon": "./assets/favicon.png"
}
"expo": {
"name": "LNReader",
"slug": "LNReader",
"scheme": "lnreader",
"notification": {
"icon": "./assets/notification.png",
"color": "#00adb5"
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

+17 -1
View File
@@ -1,6 +1,22 @@
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module-resolver',
{
root: ['./src'],
alias: {
'@components': './src/components',
'@hooks': './src/hooks',
'@screens': './src/screens',
'@strings': './strings',
'@redux': './src/redux',
},
extensions: ['.ios.js', '.android.js', '.js', '.ts', '.tsx', '.json'],
},
],
],
};
};
+5
View File
@@ -0,0 +1,5 @@
pull_request_title: 'chore: Update translations'
commit_message: '[ci skip]'
files:
- source: /strings/languages/en/strings.json
translation: /strings/languages/%two_letters_code%/strings.json
+4
View File
@@ -0,0 +1,4 @@
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};
+20471 -794
View File
File diff suppressed because it is too large Load Diff
+79 -49
View File
@@ -1,71 +1,101 @@
{
"name": "lnreader",
"version": "1.1.10",
"private": true,
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web",
"eject": "expo eject"
"start": "react-native start",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"prettier": "prettier --write \"./src/**/*.{js,jsx,ts,tsx}\"",
"buildRelease": "cd android && gradlew clean && gradlew assembleRelease",
"sources:madara": "node scripts/generateMadaraSource.cjs && prettier --write {src/sources/multisrc/madara/MadaraGenerator.ts,src/sources/sources.json}",
"source:generator": "node scripts/generateSource.cjs",
"strings": "node scripts/stringTypes.cjs",
"prepare": "husky install"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.13.0",
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/netinfo": "6.0.0",
"@react-native-community/slider": "3.0.3",
"@react-navigation/material-bottom-tabs": "^5.3.10",
"@react-navigation/native": "^5.8.10",
"@react-navigation/stack": "^5.12.8",
"@react-native-async-storage/async-storage": "^1.15.11",
"@react-native-community/clipboard": "^1.5.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/slider": "^4.1.12",
"@react-native-picker/picker": "^2.4.1",
"@react-navigation/material-bottom-tabs": "^6.0.9",
"@react-navigation/native": "^6.0.6",
"@react-navigation/stack": "^6.0.11",
"@reduxjs/toolkit": "^1.7.2",
"buffer": "^6.0.3",
"cheerio": "^1.0.0-rc.10",
"expo": "^41.0.1",
"expo-background-fetch": "~9.1.0",
"expo-document-picker": "^9.1.2",
"expo-document-picker": "^9.2.4",
"expo-file-system": "~11.0.2",
"expo-font": "~9.1.0",
"expo-haptics": "~10.0.0",
"expo-keep-awake": "~9.1.2",
"expo-linear-gradient": "~9.1.0",
"expo-linking": "~2.2.3",
"expo-localization": "~10.1.0",
"expo-notifications": "~0.11.6",
"expo-permissions": "^12.0.1",
"expo-sharing": "~9.1.2",
"expo-splash-screen": "~0.10.2",
"expo-splash-screen": "^0.11.4",
"expo-sqlite": "~9.1.0",
"expo-status-bar": "~1.0.4",
"expo-task-manager": "~9.1.0",
"expo-updates": "~0.5.4",
"expo-web-browser": "~9.1.0",
"moment": "^2.29.1",
"i18n-js": "^3.8.0",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"prop-types": "^15.7.2",
"qs": "^6.10.1",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "^0.64.2",
"react-native-cheerio": "^1.0.0-rc.4",
"react-native-collapsible-header-views": "^1.1.2",
"react-native-device-info": "^8.1.3",
"react-native-easing-gradient": "^0.1.2",
"react-native-fast-image": "^8.3.4",
"react-native-fit-image": "^1.5.5",
"react-native": "^0.64.3",
"react-native-background-actions": "^2.6.5",
"react-native-device-info": "^8.4.7",
"react-native-easing-gradient": "^1.0.0",
"react-native-fast-image": "^8.5.11",
"react-native-gesture-handler": "~1.10.2",
"react-native-immersive-mode": "^2.0.0",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-offline": "^5.7.0",
"react-native-pager-view": "^5.1.10",
"react-native-paper": "^4.5.0",
"react-native-reanimated": "~2.1.0",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-tab-view": "^3.0.1",
"react-native-unimodules": "~0.13.3",
"react-native-vector-icons": "^7.1.0",
"react-native-web": "^0.16.5",
"react-native-webview": "^11.6.2",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.9",
"react-native-pager-view": "^5.4.9",
"react-native-paper": "^4.10.1",
"react-native-reanimated": "^2.2.4",
"react-native-render-html": "^6.3.4",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.9.0",
"react-native-swipe-gestures": "^1.0.5",
"react-native-tab-view": "^3.1.1",
"react-native-tts": "^4.1.0",
"react-native-unimodules": "^0.13.3",
"react-native-vector-icons": "^9.0.0",
"react-native-webview": "^11.14.3",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"rn-sliding-up-panel": "^2.4.4"
"rn-fetch-blob": "^0.12.0",
"rn-sliding-up-panel": "^2.4.4",
"sanitize-html": "^2.7.0"
},
"devDependencies": {
"@babel/core": "~7.9.0"
"@babel/core": "^7.16.0",
"@react-native-community/eslint-config": "^3.0.1",
"@types/i18n-js": "^3.8.2",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.179",
"@types/react-native": "^0.66.15",
"@types/react-native-vector-icons": "^6.4.10",
"@types/react-test-renderer": "^17.0.1",
"@types/sanitize-html": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^7.32.0",
"eslint-plugin-react-native": "^3.11.0",
"husky": "^7.0.4",
"lint-staged": "^12.3.7",
"typescript": "^4.5.5"
},
"private": true,
"name": "lnreader-eject",
"version": "1.0.0"
"resolutions": {
"@types/react": "^17"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --check"
]
}
}
+7
View File
@@ -0,0 +1,7 @@
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['./assets/fonts/'],
};
+65
View File
@@ -0,0 +1,65 @@
const path = require('path');
const fs = require('fs');
const MadaraSources = require('../src/sources/multisrc/madara/MadaraSources.json');
const AllSources = require('../src/sources/sources.json');
const getScraperName = scraperName => {
let name = scraperName
.replace(/\s+/g, '')
.replace(/\./g, 'Dot')
.replace('1st', 'First');
return name;
};
let content =
"/**\n * This file is auto-generated\n */\n\nimport MadaraScraper from './MadaraScraper';\n\n";
MadaraSources.forEach(source => {
content =
content +
`export const ${getScraperName(
source.sourceName,
)}Scraper = new MadaraScraper(${source.sourceId}, "${source.baseUrl}", "${
source.sourceName
}", ${source.options ? JSON.stringify(source.options) : ''});\n\n`;
});
fs.writeFile(
path.resolve(process.cwd(), 'src/sources/multisrc/madara/MadaraGenerator.ts'),
content,
error => {
if (error) {
console.log(error);
}
},
);
MadaraSources.forEach(madaraSource => {
if (!AllSources.some(source => source.sourceId === madaraSource.sourceId)) {
let allSourcesContent = AllSources;
allSourcesContent.push({
sourceId: madaraSource.sourceId,
sourceName: madaraSource.sourceName,
icon: `https://github.com/LNReader/lnreader-sources/blob/main/multisrc/madara/icons/${madaraSource.sourceName
.replace(/\s+/g, '')
.toLowerCase()}.png?raw=true`,
url: madaraSource.baseUrl,
lang: madaraSource.options.lang || 'English',
});
allSourcesContent = JSON.stringify(allSourcesContent);
fs.writeFile(
path.resolve(process.cwd(), 'src/sources/sources.json'),
allSourcesContent,
error => {
if (error) {
console.log(error);
}
},
);
}
});
+328
View File
@@ -0,0 +1,328 @@
/**
* This script can be used to generate sources
*/
const fs = require('fs');
const path = require('path');
const prettier = require('prettier');
const prettierConfig = require('../.prettierrc');
const AllSources = require('../src/sources/sources.json');
const getLanguageCode = language => {
const codes = {
English: 'en',
Arabic: 'ar',
French: 'fr',
Turkish: 'tr',
Chinese: 'cn',
Japanese: 'jp',
Vietnamese: 'vi',
};
return codes[language];
};
try {
if (process.argv[2]) {
const source = JSON.parse(
fs.readFileSync(path.resolve(process.cwd(), process.argv[2]), 'utf8'),
);
const isDuplicate = AllSources.some(
item => item.sourceId === source.sourceId,
);
const content = `
import * as cheerio from 'cheerio';
import { isUrlAbsolute } from '../../utils/isAbsoluteUrl';
${
source?.options?.imports?.toaster
? "import { showToast } from '../../hooks/showToast'"
: ''
};
import {
SourceChapter,
SourceChapterItem,
SourceNovel,
SourceNovelItem,
} from '../types';
const sourceId = ${source.sourceId};
const sourceName = "${source.sourceName}";
const baseUrl = "${source.baseUrl}";
${
!source.popularNovels.url.includes('${page}')
? '// eslint-disable-next-line @typescript-eslint/no-unused-vars'
: ''
}
const popularNovels = async (page: number) => {
const totalPages = ${source.popularNovels.totalPages};
const url = \`${source.popularNovels.url}\`;
const result = await fetch(url);
const body = await result.text();
const loadedCheerio = cheerio.load(body);
const novels: SourceNovelItem[] = [];
loadedCheerio('${
source.popularNovels.selectors.novelList
}').each(function () {
let novelUrl = loadedCheerio(this).find('${
source.popularNovels.selectors.novelUrl
}').attr('href');
if (novelUrl && !isUrlAbsolute(novelUrl)) {
novelUrl = baseUrl + novelUrl;
}
if (novelUrl) {
const novelName = loadedCheerio(this).find('${
source.popularNovels.selectors.novelName
}').text().trim();
let novelCover = loadedCheerio(this).find('${
source.popularNovels.selectors.novelCover
}').attr('src');
if (novelCover && !isUrlAbsolute(novelCover)) {
novelCover = baseUrl + novelCover;
}
const novel = {
sourceId,
novelUrl,
novelName,
novelCover,
};
novels.push(novel);
}
});
return { totalPages, novels };
};
const parseNovelAndChapters = async (novelUrl: string) => {
const url = novelUrl;
const result = await fetch(url);
const body = await result.text();
let loadedCheerio = cheerio.load(body);
const novel: SourceNovel = {
sourceId,
sourceName,
url: novelUrl,
novelUrl,
chapters: [],
};
novel.novelName = loadedCheerio('${
source.novelAndChapters.selectors.novelName
}').text();
let novelCover = loadedCheerio('${
source.novelAndChapters.selectors.novelCover
}').attr('src');
novel.novelCover = novelCover
? isUrlAbsolute(novelCover)
? novelCover
: baseUrl + novelCover
: undefined;
novel.summary = loadedCheerio('${
source.novelAndChapters.selectors.summary
}').text().trim();
novel.author = loadedCheerio('${
source.novelAndChapters.selectors.author
}').text().trim();
novel.genre = loadedCheerio('${
source.novelAndChapters.selectors.genre
}').text().trim()${source?.options?.status?.replace || ''};
novel.status = loadedCheerio('${
source.novelAndChapters.selectors.status
}').text().trim();
loadedCheerio('${
source.novelAndChapters.selectors.chapterList
}').each(function () {
let chapterUrl = loadedCheerio(this).find('a').attr('href');
if (chapterUrl && !isUrlAbsolute(chapterUrl)) {
chapterUrl = baseUrl + chapterUrl;
}
if (chapterUrl) {
const chapterName = loadedCheerio(this).find('${
source.novelAndChapters.selectors.chapterName
}').text().trim();
const releaseDate = ${
source.novelAndChapters.selectors.releaseDate
? `loadedCheerio(this).find('${source.novelAndChapters.selectors.releaseDate}').text();`
: null
}
const chapter: SourceChapterItem = {
chapterName,
releaseDate,
chapterUrl,
};
novel.chapters?.push(chapter);
}
});
return novel;
};
const parseChapter = async (novelUrl: string, chapterUrl: string) => {
const url = chapterUrl;
const result = await fetch(url);
const body = await result.text();
const loadedCheerio = cheerio.load(body);
const chapterName = loadedCheerio('${
source.chapter.selectors.chapterName
}').text();
const chapterText = loadedCheerio('${
source.chapter.selectors.chapterText
}').html() || '';
const chapter: SourceChapter = {
sourceId,
novelUrl,
chapterUrl,
chapterName,
chapterText,
};
return chapter;
};
${
!source.search.url.includes('${searchTerm}')
? '// eslint-disable-next-line @typescript-eslint/no-unused-vars'
: ''
}
const searchNovels = async (searchTerm: string) => {
${
source.search
? `
const url = \`${source.search.url}\`;
const result = await fetch(url);
const body = await result.text();
const loadedCheerio = cheerio.load(body);
const novels: SourceNovelItem[] = [];
loadedCheerio('${source.search.selectors.novelList}').each(function () {
let novelUrl = loadedCheerio(this).find('${source.search.selectors.novelUrl}').attr('href');
if (novelUrl && !isUrlAbsolute(novelUrl)) {
novelUrl = baseUrl + novelUrl;
}
if (novelUrl) {
const novelName = loadedCheerio(this).find('${source.search.selectors.novelName}').text();
let novelCover = loadedCheerio(this).find('${source.search.selectors.novelCover}').attr('src');
if (novelCover && !isUrlAbsolute(novelCover)) {
novelCover = baseUrl + novelCover;
}
novels.push({
sourceId,
novelUrl,
novelName,
novelCover,
});
}
});
return novels;`
: `
showToast('${source.sourceName}: Search is not available in this source')
return [];
`
}
};
const ${source.sourceName}Scraper = {
popularNovels,
parseNovelAndChapters,
parseChapter,
searchNovels,
};
export default ${source.sourceName}Scraper;
`;
const formatContent = prettier.format(content, {
parser: 'typescript',
...prettierConfig,
});
fs.writeFile(
path.resolve(
process.cwd(),
`src/sources/${getLanguageCode(source.lang)}/${source.sourceName}.ts`,
),
formatContent,
error => {
if (error) {
console.log(error);
}
},
);
if (!isDuplicate) {
let allSourcesContent = AllSources;
allSourcesContent.push({
sourceId: source.sourceId,
sourceName: source.sourceName,
icon: `https://github.com/LNReader/lnreader-sources/blob/main/src/${getLanguageCode(
source.lang,
)}/${source.sourceName.toLowerCase()}/icon.png?raw=true`,
url: source.baseUrl,
lang: source.lang || 'English',
});
allSourcesContent = prettier.format(JSON.stringify(allSourcesContent), {
parser: 'json',
...prettierConfig,
});
fs.writeFile(
path.resolve(process.cwd(), 'src/sources/sources.json'),
allSourcesContent,
error => {
if (error) {
console.log(error);
}
},
);
} else {
console.log('Source with same id already exists');
}
} else {
console.log('Template path not provided');
}
} catch (e) {
console.log(e);
}
+44
View File
@@ -0,0 +1,44 @@
const fs = require('fs');
const path = require('path');
const prettier = require('prettier');
const prettierConfig = require('../.prettierrc');
const flatten = (obj, target, prefix) => {
(target = target || {}), (prefix = prefix || '');
Object.keys(obj).forEach(function (key) {
if (typeof obj[key] === 'object' && obj[key] !== null) {
flatten(obj[key], target, prefix + key + '.');
} else {
return (target[prefix + key] = 'string');
}
});
return target;
};
const strings = fs.readFileSync(
path.resolve(process.cwd(), 'strings/languages/en/strings.json'),
'utf8',
);
const stringTypes = `/**\n * This file is auto-generated\n */\n\n
export interface StringMap ${JSON.stringify(flatten(JSON.parse(strings)))}
`;
const formatContent = prettier.format(stringTypes, {
parser: 'typescript',
...prettierConfig,
});
fs.writeFile(
path.resolve(process.cwd(), 'strings/types/index.ts'),
formatContent,
err => {
if (err) {
console.log(err);
}
},
);
-142
View File
@@ -1,142 +0,0 @@
import React, { useRef } from "react";
import { View, TextInput, StyleSheet } from "react-native";
import {
TouchableRipple,
IconButton,
Appbar as MaterialAppbar,
} from "react-native-paper";
import Constants from "expo-constants";
import { useNavigation } from "@react-navigation/native";
import { useSelector } from "react-redux";
export const Appbar = ({ title, onBackAction, style, children }) => {
const theme = useSelector((state) => state.settingsReducer.theme);
return (
<MaterialAppbar.Header
style={[{ backgroundColor: theme.colorPrimary }, style]}
>
{onBackAction && (
<MaterialAppbar.BackAction onPress={onBackAction} />
)}
<MaterialAppbar.Content
title={title}
titleStyle={{ color: theme.textColorPrimary }}
/>
{children}
</MaterialAppbar.Header>
);
};
export const SearchAppbar = ({
placeholder,
getSearchResults,
setSearchText,
searchText,
getNovels,
setLoading,
screen,
openWebView,
}) => {
const searchRef = useRef(null);
const navigation = useNavigation();
const theme = useSelector((state) => state.settingsReducer.theme);
return (
<TouchableRipple
borderless
onPress={() => searchRef.current.focus()}
style={[
styles.searchAppbarContainer,
{ backgroundColor: theme.searchBarColor },
]}
>
<View
style={{
flex: 1,
flexDirection: "row",
justifyContent: "space-between",
}}
>
<View style={{ flex: 1, flexDirection: "row" }}>
{screen === "Library" ? (
<IconButton
icon="magnify"
color={theme.textColorSecondary}
style={{ marginLeft: 0 }}
size={23}
/>
) : (
<IconButton
icon="arrow-left"
color={theme.textColorSecondary}
style={{ marginLeft: 0 }}
size={23}
onPress={() => navigation.goBack()}
/>
)}
<TextInput
ref={searchRef}
style={{
fontSize: 16,
color: theme.textColorSecondary,
}}
placeholder={placeholder}
placeholderTextColor={theme.textColorSecondary}
onChangeText={(text) => {
setSearchText(text);
if (screen === "Library") {
getSearchResults(text);
}
}}
onSubmitEditing={() => {
if (screen === "Extension") {
getSearchResults(searchText);
}
}}
defaultValue={searchText}
/>
</View>
{searchText !== "" && (
<IconButton
icon="close"
color={theme.textColorSecondary}
style={{ marginRight: 0 }}
size={23}
onPress={() => {
setLoading?.(true);
getNovels();
setSearchText("");
}}
/>
)}
{openWebView && (
<IconButton
icon="earth"
color={theme.textColorSecondary}
style={{ marginRight: 0 }}
size={23}
onPress={openWebView}
/>
)}
</View>
</TouchableRipple>
);
};
const styles = StyleSheet.create({
searchAppbarContainer: {
marginTop: Constants.statusBarHeight + 8,
height: 48,
flexDirection: "row",
alignItems: "center",
paddingHorizontal: 16,
marginBottom: 12,
borderRadius: 8,
marginHorizontal: 12,
elevation: 2,
},
});
-17
View File
@@ -1,17 +0,0 @@
import React from "react";
import { View } from "react-native";
const BottomSheetHandle = ({ theme }) => (
<View
style={{
backgroundColor: theme.textColorHint,
height: 5,
width: 30,
borderRadius: 50,
top: 10,
alignSelf: "center",
}}
/>
);
export default BottomSheetHandle;
-97
View File
@@ -1,97 +0,0 @@
import React, { useState } from "react";
import { StyleSheet, Text } from "react-native";
import { Modal, Portal, TextInput } from "react-native-paper";
const ColorPickerModal = ({
theme,
color,
title,
onSubmit,
hideModal,
modalVisible,
}) => {
const [text, setText] = useState(color);
const [error, setError] = useState();
const onDismiss = () => {
hideModal();
setText();
setError();
};
const onChangeText = (text) => setText(text);
const onSubmitEditing = () => {
const re = /^#([0-9a-f]{6}|[0-9a-f]{3})$/i;
if (text.match(re)) {
onSubmit(text);
hideModal();
} else {
setError("Enter a valid hex color code");
}
};
const textInputTheme = {
colors: {
primary: color,
placeholder: theme.textColorHint,
text: theme.textColorPrimary,
background: "transparent",
},
};
return (
<Portal>
<Modal
visible={modalVisible}
onDismiss={onDismiss}
contentContainerStyle={[
styles.modalContainer,
{ backgroundColor: theme.colorPrimary },
]}
>
<Text
style={[
styles.modalTitle,
{ color: theme.textColorPrimary },
]}
>
{title}
</Text>
<TextInput
value={text}
defaultValue={color}
placeholder="Hex Color Code (E.g. #3399FF)"
onChangeText={onChangeText}
onSubmitEditing={onSubmitEditing}
mode="outlined"
theme={textInputTheme}
underlineColor={theme.textColorHint}
dense
error={error}
/>
<Text style={styles.errorText}>{error}</Text>
</Modal>
</Portal>
);
};
export default ColorPickerModal;
const styles = StyleSheet.create({
modalContainer: {
margin: 30,
padding: 20,
borderRadius: 8,
},
modalTitle: {
fontSize: 18,
marginBottom: 16,
},
errorText: {
color: "#FF0033",
paddingTop: 8,
},
});
-21
View File
@@ -1,21 +0,0 @@
import React from "react";
import { View, Text, Image, StyleSheet } from "react-native";
const ScreenContainer = ({ children, theme }) => (
<View style={{ flex: 1, backgroundColor: theme.colorPrimaryDark }}>
{children}
</View>
);
const Row = ({ children, style }) => (
<View style={[styles.row, style]}>{children}</View>
);
export { ScreenContainer, Row };
const styles = StyleSheet.create({
row: {
flexDirection: "row",
alignItems: "center",
},
});
-51
View File
@@ -1,51 +0,0 @@
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { useSelector } from "react-redux";
const EmptyView = ({ icon, description, style, children, iconStyle }) => {
const theme = useSelector((state) => state.settingsReducer.theme);
return (
<View style={styles.emptyViewContainer}>
<Text
style={[
styles.emptyViewIcon,
{ color: theme.textColorSecondary },
style,
iconStyle,
]}
>
{icon}
</Text>
<Text
style={[
styles.emptyViewText,
{ color: theme.textColorSecondary },
style,
]}
>
{description}
</Text>
{children}
</View>
);
};
export default EmptyView;
const styles = StyleSheet.create({
emptyViewContainer: {
flex: 1,
justifyContent: "center",
alignItems: "center",
},
emptyViewIcon: {
fontSize: 45,
},
emptyViewText: {
fontWeight: "bold",
marginTop: 10,
textAlign: "center",
paddingHorizontal: 30,
},
});
-28
View File
@@ -1,28 +0,0 @@
import React from "react";
import { Text, View } from "react-native";
import { IconButton } from "react-native-paper";
import { Row } from "./Common";
import EmptyView from "./EmptyView";
const ErrorView = ({ theme, onRetry, error, openWebView }) => (
<View style={{ flex: 1, justifyContent: "center" }}>
<EmptyView
icon="(; ̄Д ̄)"
description={error}
style={{ color: theme.textColorSecondary }}
>
<IconButton
icon="reload"
size={25}
style={{ margin: 0, marginTop: 24 }}
color={theme.textColorSecondary}
onPress={onRetry}
/>
<Text style={{ color: theme.textColorPrimary }}>Retry</Text>
</EmptyView>
</View>
);
export default ErrorView;
-2
View File
@@ -1,2 +0,0 @@
import { NativeModules } from "react-native";
module.exports = NativeModules.FullScreen;
-92
View File
@@ -1,92 +0,0 @@
import React from "react";
import { StyleSheet } from "react-native";
import { List, Divider as PaperDivider } from "react-native-paper";
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
const ListSection = ({ children }) => (
<List.Section style={styles.listSection}>{children}</List.Section>
);
const ListSubHeader = ({ children, theme }) => (
<List.Subheader
style={[styles.listSubHeader, { color: theme.colorAccent }]}
>
{children}
</List.Subheader>
);
const ListItem = ({
title,
description,
icon,
onPress,
theme,
right,
iconColor,
titleStyle,
style,
}) => (
<List.Item
title={title}
style={style}
titleStyle={[{ color: theme.textColorPrimary }, titleStyle]}
description={description}
descriptionStyle={{ color: theme.textColorSecondary }}
descriptionNumberOfLines={1}
left={() =>
icon && (
<List.Icon
color={theme.colorAccent}
icon={icon}
style={{ marginVertical: 0 }}
/>
)
}
right={() =>
right && (
<MaterialCommunityIcons
name={right}
color={iconColor || "#47a84a"}
size={23}
style={{ marginRight: 16, textAlignVertical: "center" }}
/>
)
}
onPress={onPress}
rippleColor={theme.rippleColor}
/>
);
const Divider = ({ theme }) => (
<PaperDivider style={{ backgroundColor: theme.dividerColor, height: 1 }} />
);
const InfoItem = ({ title, icon, theme }) => (
<List.Item
title={title}
titleStyle={{ color: theme.textColorSecondary, fontSize: 14 }}
titleNumberOfLines={5}
left={() =>
icon && (
<List.Icon
color={theme.textColorSecondary}
icon={icon}
style={{ marginVertical: 0 }}
/>
)
}
/>
);
export { ListSection, ListSubHeader, ListItem, Divider, InfoItem };
const styles = StyleSheet.create({
listSection: {
flex: 1,
marginVertical: 0,
},
listSubHeader: {
paddingBottom: 5,
},
});
-65
View File
@@ -1,65 +0,0 @@
import React from "react";
import { StyleSheet, View, Text, Image } from "react-native";
import FastImage from "react-native-fast-image";
import { TouchableRipple } from "react-native-paper";
const ListView = ({ item, downloadBadge, unreadBadge, theme, onPress }) => {
return (
<TouchableRipple
borderless
centered
rippleColor={theme.rippleColor}
style={styles.listView}
onPress={onPress}
>
<>
<FastImage
source={{ uri: item.novelCover }}
style={styles.extensionIcon}
/>
<Text
style={[
{ color: theme.textColorPrimary },
styles.novelName,
]}
numberOfLines={1}
>
{item.novelName}
</Text>
<View style={styles.badgeContainer}>
{downloadBadge}
{unreadBadge}
</View>
</>
</TouchableRipple>
);
};
export default ListView;
const styles = StyleSheet.create({
listView: {
flex: 1,
flexDirection: "row",
alignItems: "center",
paddingVertical: 8,
paddingHorizontal: 12,
},
extensionIcon: {
width: 40,
height: 40,
borderRadius: 4,
},
novelName: {
flex: 1,
marginLeft: 16,
fontSize: 15,
paddingRight: 8,
flexWrap: "wrap",
},
badgeContainer: {
flexDirection: "row",
justifyContent: "flex-end",
alignItems: "flex-end",
},
});
-80
View File
@@ -1,80 +0,0 @@
import React, { useState } from "react";
import { StyleSheet, View, Text } from "react-native";
import { Portal, Modal, Button } from "react-native-paper";
import * as Linking from "expo-linking";
import { useTheme } from "../Hooks/reduxHooks";
const NewUpdateDialog = ({ newVersion }) => {
const [newUpdateDialog, showNewUpdateDialog] = useState(true);
const theme = useTheme();
return (
<Portal>
<Modal
visible={newUpdateDialog}
onDismiss={() => showNewUpdateDialog(false)}
contentContainerStyle={[
styles.containerStyle,
{ backgroundColor: theme.colorPrimaryDark },
]}
>
<Text
style={[
styles.modalHeader,
{ color: theme.textColorPrimary },
]}
>
{`New update available ${newVersion.tag_name}`}
</Text>
<Text style={{ color: theme.textColorSecondary, fontSize: 16 }}>
{newVersion.body}
</Text>
<View
style={{
flexDirection: "row",
marginTop: 30,
justifyContent: "flex-end",
}}
>
<Button
labelStyle={{
color: theme.colorAccent,
letterSpacing: 0,
textTransform: "none",
}}
theme={{ colors: { primary: theme.colorAccent } }}
onPress={() => showNewUpdateDialog(false)}
>
Cancel
</Button>
<Button
labelStyle={{
color: theme.colorAccent,
letterSpacing: 0,
textTransform: "none",
}}
theme={{ colors: { primary: theme.colorAccent } }}
onPress={() => Linking.openURL(newVersion.downloadUrl)}
>
Install
</Button>
</View>
</Modal>
</Portal>
);
};
export default NewUpdateDialog;
const styles = StyleSheet.create({
containerStyle: {
padding: 20,
margin: 20,
borderRadius: 6,
},
modalHeader: {
fontSize: 20,
marginBottom: 10,
},
});
-189
View File
@@ -1,189 +0,0 @@
import React from "react";
import { StyleSheet, View, Text, useWindowDimensions } from "react-native";
import { LinearGradient } from "expo-linear-gradient";
import { TouchableRipple } from "react-native-paper";
import { useSelector } from "react-redux";
import { useSettings, useTheme } from "../Hooks/reduxHooks";
import ListView from "./ListView";
import FastImage from "react-native-fast-image";
import { getDeviceOrientation } from "../Services/utils/helpers";
const NovelCover = ({ item, onPress, libraryStatus }) => {
const theme = useTheme();
const { displayMode, novelsPerRow, showDownloadBadges, showUnreadBadges } =
useSettings();
const window = useWindowDimensions();
const orientation = getDeviceOrientation();
const getNovelsPerRow = () =>
orientation === "landscape" ? 6 : novelsPerRow;
const getHeight = () => (window.width / getNovelsPerRow()) * (4 / 3);
const comfortableTitle = () =>
displayMode === 1 && (
<Text
numberOfLines={2}
style={[
styles.title,
{
color: theme.textColorPrimary,
padding: 4,
},
]}
>
{item.novelName}
</Text>
);
const compactTitle = () =>
displayMode === 0 && (
<View style={styles.titleContainer}>
<LinearGradient
colors={["transparent", "rgba(0,0,0,0.6)"]}
style={styles.linearGradient}
>
<Text
numberOfLines={2}
style={[styles.title, { color: "rgba(255,255,255,1)" }]}
>
{item.novelName}
</Text>
</LinearGradient>
</View>
);
const unreadBadge = () =>
showUnreadBadges &&
item.chaptersUnread && (
<Text
style={[
styles.unreadBadge,
!item.chaptersDownloaded && {
borderTopLeftRadius: 4,
borderBottomLeftRadius: 4,
},
!showDownloadBadges && {
borderRadius: 4,
},
{ backgroundColor: theme.colorAccent },
]}
>
{item.chaptersUnread}
</Text>
);
const downloadBadge = () =>
showDownloadBadges &&
item.chaptersDownloaded && (
<Text
style={[
styles.downloadBadge,
!item.chaptersUnread && {
borderTopRightRadius: 4,
borderBottomRightRadius: 4,
},
!showUnreadBadges && {
borderRadius: 4,
},
]}
>
{item.chaptersDownloaded}
</Text>
);
return displayMode !== 2 ? (
<View style={{ flex: 1 / getNovelsPerRow() }}>
<TouchableRipple
borderless
centered
rippleColor={theme.rippleColor}
style={styles.opac}
onPress={onPress}
>
<>
<FastImage
source={{ uri: item.novelCover }}
style={[
{ height: getHeight(), borderRadius: 4 },
libraryStatus && { opacity: 0.5 },
]}
>
<View style={{ flexDirection: "row", margin: 4 }}>
{downloadBadge()}
{unreadBadge()}
</View>
{compactTitle()}
</FastImage>
{comfortableTitle()}
</>
</TouchableRipple>
</View>
) : (
<ListView
item={item}
downloadBadge={downloadBadge()}
unreadBadge={unreadBadge()}
theme={theme}
onPress={onPress}
/>
);
};
export default NovelCover;
const styles = StyleSheet.create({
titleContainer: {
flex: 1,
justifyContent: "flex-end",
borderRadius: 4,
},
title: {
fontFamily: "pt-sans-bold",
fontSize: 14,
padding: 8,
},
linearGradient: {
bottom: -1,
borderRadius: 4,
},
opac: {
paddingHorizontal: 4.5,
paddingVertical: 4,
borderRadius: 4,
},
extensionIcon: {
width: 42,
height: 42,
borderRadius: 4,
},
listView: {
flex: 1,
paddingVertical: 8,
paddingHorizontal: 12,
flexDirection: "row",
alignItems: "center",
borderRadius: 4,
},
downloadBadge: {
backgroundColor: "#47a84a",
color: "#FFFFFF",
borderTopLeftRadius: 4,
borderBottomLeftRadius: 4,
paddingTop: 2,
paddingHorizontal: 4,
fontSize: 12,
},
unreadBadge: {
color: "#FFFFFF",
borderTopRightRadius: 4,
borderBottomRightRadius: 4,
paddingTop: 2,
paddingHorizontal: 4,
fontSize: 12,
},
});
-51
View File
@@ -1,51 +0,0 @@
import React from "react";
import { StyleSheet, FlatList } from "react-native";
import { useSettings } from "../Hooks/reduxHooks";
import { getDeviceOrientation } from "../Services/utils/helpers";
const NovelList = ({
data,
renderItem,
refreshControl,
ListEmptyComponent,
}) => {
const { displayMode, novelsPerRow } = useSettings();
const orientation = getDeviceOrientation();
const getNovelsPerRow = () => {
if (displayMode === 2) {
return 1;
}
if (orientation === "landscape") {
return 6;
} else {
return novelsPerRow;
}
};
return (
<FlatList
contentContainerStyle={styles.flatListCont}
numColumns={getNovelsPerRow()}
key={[orientation, getNovelsPerRow()]}
data={data}
keyExtractor={(item) => item.novelUrl}
renderItem={renderItem}
refreshControl={refreshControl}
ListEmptyComponent={ListEmptyComponent}
/>
);
};
export default NovelList;
const styles = StyleSheet.create({
flatListCont: {
flexGrow: 1,
paddingVertical: 8,
paddingHorizontal: 4,
},
});
-40
View File
@@ -1,40 +0,0 @@
import React from "react";
import { StyleSheet, View, Text } from "react-native";
import { RadioButton as MaterialRadioButton } from "react-native-paper";
export const RadioButtonGroup = ({ children, value, onValueChange }) => (
<MaterialRadioButton.Group onValueChange={onValueChange} value={value}>
{children}
</MaterialRadioButton.Group>
);
export const RadioButton = ({ value, label, theme, labelStyle }) => (
<View style={styles.radioButtonContainer}>
<MaterialRadioButton
value={value}
color={theme.colorAccent}
uncheckedColor={theme.textColorSecondary}
/>
<Text
style={[
styles.radioButtonLabel,
{ color: theme.textColorPrimary },
labelStyle,
]}
>
{label}
</Text>
</View>
);
const styles = StyleSheet.create({
radioButtonContainer: {
flexDirection: "row",
alignItems: "center",
paddingVertical: 8,
},
radioButtonLabel: {
marginLeft: 16,
fontSize: 16,
},
});
-97
View File
@@ -1,97 +0,0 @@
import React, { useRef } from "react";
import { StyleSheet, View, TextInput, Text, StatusBar } from "react-native";
import { TouchableRipple, IconButton } from "react-native-paper";
import { Row } from "./Common";
export const Searchbar = ({
theme,
placeholder,
searchText,
backAction,
onBackAction,
clearSearchbar,
onChangeText,
onSubmitEditing,
actions,
}) => {
const searchRef = useRef(null);
return (
<TouchableRipple
borderless
onPress={() => searchRef.current.focus()}
style={[
styles.searchbarContainer,
{ backgroundColor: theme.searchBarColor },
]}
rippleColor={theme.rippleColor}
>
<View style={styles.container}>
<Row style={{ flex: 1 }}>
{backAction && (
<IconButton
icon={backAction}
color={theme.textColorSecondary}
style={{ marginLeft: 0 }}
size={23}
onPress={onBackAction}
/>
)}
<TextInput
ref={searchRef}
style={{
fontSize: 16,
color: theme.textColorSecondary,
}}
placeholder={placeholder}
placeholderTextColor={theme.textColorSecondary}
onChangeText={onChangeText}
onSubmitEditing={onSubmitEditing}
defaultValue={searchText}
/>
</Row>
{searchText !== "" && (
<IconButton
icon="close"
color={theme.textColorSecondary}
style={{ marginRight: 0 }}
size={23}
onPress={clearSearchbar}
/>
)}
{actions &&
actions.map((action, index) => (
<IconButton
key={index}
icon={action.icon}
color={action.color ?? theme.textColorSecondary}
style={{ marginRight: 0 }}
size={23}
onPress={action.onPress}
/>
))}
</View>
</TouchableRipple>
);
};
const styles = StyleSheet.create({
searchbarContainer: {
marginTop: StatusBar.currentHeight + 4,
height: 48,
flexDirection: "row",
alignItems: "center",
paddingHorizontal: 16,
marginBottom: 12,
borderRadius: 8,
marginHorizontal: 12,
elevation: 2,
backgroundColor: "white",
},
container: {
flex: 1,
flexDirection: "row",
justifyContent: "space-between",
},
});
-55
View File
@@ -1,55 +0,0 @@
import * as SQLite from "expo-sqlite";
import {
createNovelTableQuery,
createUrlIndexQuery,
createLibraryIndexQuery,
} from "./tables/NovelTable";
import {
createChapterTableQuery,
createNovelIdIndexQuery,
createUnreadChaptersIndexQuery,
} from "./tables/ChapterTable";
import {
createHistoryTableQuery,
createChapterIdIndexQuery,
} from "./tables/HistoryTable";
import { createDownloadTableQuery } from "./tables/DownloadTable";
import {
createUpdatesTableQuery,
updatesSeedDataQuery,
} from "./tables/UpdateTable";
/**
* Database Version = 2
*/
const dbName = "lnreader.db";
const db = SQLite.openDatabase(dbName);
export const createDB = () => {
db.transaction((tx) => {
tx.executeSql(createNovelTableQuery);
tx.executeSql(createChapterTableQuery);
tx.executeSql(createHistoryTableQuery);
tx.executeSql(createDownloadTableQuery);
tx.executeSql(createUpdatesTableQuery);
//Db indexes
tx.executeSql(createUrlIndexQuery);
tx.executeSql(createLibraryIndexQuery);
tx.executeSql(createNovelIdIndexQuery);
tx.executeSql(createUnreadChaptersIndexQuery);
tx.executeSql(createChapterIdIndexQuery);
});
};
export const deleteDb = () => {
db.transaction((tx) => {
tx.executeSql("DROP TABLE novels");
tx.executeSql("DROP TABLE chapters");
tx.executeSql("DROP TABLE history");
tx.executeSql("DROP TABLE downloads");
tx.executeSql("DROP TABLE updates");
});
};
-264
View File
@@ -1,264 +0,0 @@
import * as SQLite from "expo-sqlite";
const db = SQLite.openDatabase("lnreader.db");
const insertChaptersQuery = `INSERT INTO chapters (chapterUrl, chapterName, releaseDate, novelId) values (?, ?, ?, ?)`;
export const insertChapters = async (novelId, chapters) => {
db.transaction((tx) => {
chapters.map(
(chapter) =>
tx.executeSql(
insertChaptersQuery,
[
chapter.chapterUrl,
chapter.chapterName,
chapter.releaseDate,
novelId,
],
(txObj, res) => {},
(txObj, error) =>
console.log(
"Error ",
error,
" Chapter URL: ",
chapter.chapterUrl,
" Novel ID ",
novelId
)
),
(txObj, res) => {
console.log("Success");
},
(txObj, error) => console.log("Error ", error)
);
});
};
const getChaptersQuery = (sort, filter) =>
`SELECT * FROM chapters WHERE novelId = ? ${filter || ""} ${
sort || "ORDER BY chapterId ASC"
}`;
export const getChapters = (novelId, sort, filter) => {
// console.log(getChaptersQuery(sort, filter));
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
getChaptersQuery(sort, filter),
[novelId],
(txObj, { rows: { _array } }) => {
resolve(_array);
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
const getChapterQuery = `SELECT * FROM downloads WHERE downloadChapterId = ?`;
export const getChapterFromDB = async (chapterId) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
getChapterQuery,
[chapterId],
(tx, results) => {
resolve(results.rows.item(0));
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
export const getNextChapterFromDB = async (novelId, chapterId) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
`SELECT * FROM chapters WHERE novelId = ? AND chapterId > ?`,
[novelId, chapterId],
(tx, results) => {
resolve(results.rows.item(0));
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
export const getPrevChapterFromDB = async (novelId, chapterId) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
`SELECT * FROM chapters WHERE novelId = ? AND chapterId < ?`,
[novelId, chapterId],
(tx, results) => {
resolve(results.rows.item(results.rows.length - 1));
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
const markChapterReadQuery = `UPDATE chapters SET \`read\` = 1 WHERE chapterId = ?`;
export const markChapterRead = async (chapterId) => {
db.transaction((tx) => {
tx.executeSql(
markChapterReadQuery,
[chapterId],
(tx, res) => {},
(tx, error) => console.log(error)
);
});
};
const markChapterUnreadQuery = `UPDATE chapters SET \`read\` = 0 WHERE chapterId = ?`;
export const markChapterUnread = async (chapterId) => {
db.transaction((tx) => {
tx.executeSql(
markChapterUnreadQuery,
[chapterId],
(tx, res) => {},
(tx, error) => console.log(error)
);
});
};
const isChapterDownloadedQuery = `SELECT * FROM downloads WHERE downloadChapterId=?`;
export const isChapterDownloaded = async (chapterId) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
isChapterDownloadedQuery,
[chapterId],
(txObj, res) => {
if (res.rows.length !== 0) {
resolve(true);
} else {
resolve(false);
}
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
const downloadChapterQuery = `INSERT INTO downloads (downloadChapterId, chapterName, chapterText, prevChapter, nextChapter) VALUES (?, ?, ?, ?, ?)`;
export const downloadChapter = async (
sourceId,
novelUrl,
chapterUrl,
chapterId
) => {
const downloadUrl = `https://lnreader-extensions.vercel.app/api/${sourceId}/novel/${novelUrl}${chapterUrl}`;
const response = await fetch(downloadUrl);
const chapter = await response.json();
db.transaction((tx) => {
tx.executeSql(
`UPDATE chapters SET downloaded = 1 WHERE chapterId = ?`,
[chapterId]
);
tx.executeSql(
downloadChapterQuery,
[
chapterId,
chapter.chapterName,
chapter.chapterText,
chapter.prevChapter,
chapter.nextChapter,
],
(tx, res) =>
console.log(`Downloaded Chapter ${chapter.chapterUrl}`),
(txObj, error) => console.log("Error ", error)
);
});
};
export const deleteChapter = async (chapterId) => {
const updateIsDownloadedQuery = `UPDATE chapters SET downloaded = 0 WHERE chapterId=?`;
const deleteChapterQuery = `DELETE FROM downloads WHERE downloadChapterId=?`;
db.transaction((tx) => {
tx.executeSql(
updateIsDownloadedQuery,
[chapterId],
(tx, res) => {},
(txObj, error) => console.log("Error ", error)
);
tx.executeSql(
deleteChapterQuery,
[chapterId],
(tx, res) => console.log(`Chapter deleted`),
(txObj, error) => console.log("Error ", error)
);
});
};
const getLastReadChapterQuery = `
SELECT chapters.*
FROM history
JOIN chapters
ON history.historyChapterId = chapters.chapterId
WHERE history.historyNovelId = ?
`;
export const getLastReadChapter = async (novelId) => {
return new Promise((resolve, reject) => {
db.transaction((tx) => {
tx.executeSql(
getLastReadChapterQuery,
[novelId],
(tx, { rows }) => resolve(rows.item(0)),
(txObj, error) => console.log("Error ", error)
);
});
});
};
const bookmarkChapterQuery = `UPDATE chapters SET bookmark = ? WHERE chapterId = ?`;
export const bookmarkChapter = async (bookmark, chapterId) => {
db.transaction((tx) => {
tx.executeSql(
bookmarkChapterQuery,
[!bookmark, chapterId],
(tx, res) => {},
(txObj, error) => console.log("Error ", error)
);
});
};
const markPreviuschaptersReadQuery = `UPDATE chapters SET \`read\` = 1 WHERE chapterId < ? AND novelId = ?`;
export const markPreviuschaptersRead = async (chapterId, novelId) => {
db.transaction((tx) => {
tx.executeSql(
markPreviuschaptersReadQuery,
[chapterId, novelId],
(tx, res) => {},
(tx, error) => console.log(error)
);
});
};
const markPreviousChaptersUnreadQuery = `UPDATE chapters SET \`read\` = 0 WHERE chapterId < ? AND novelId = ?`;
export const markPreviousChaptersUnread = async (chapterId, novelId) => {
db.transaction((tx) => {
tx.executeSql(
markPreviousChaptersUnreadQuery,
[chapterId, novelId],
(tx, res) => {},
(tx, error) => console.log(error)
);
});
};
-62
View File
@@ -1,62 +0,0 @@
import * as SQLite from "expo-sqlite";
const db = SQLite.openDatabase("lnreader.db");
const getHistoryQuery = `
SELECT history.*, chapters.*, novels.*
FROM history
JOIN chapters
ON history.historyChapterId = chapters.chapterId
JOIN novels
ON history.historyNovelId = novels.novelId
GROUP BY novels.novelId
HAVING history.historyTimeRead = MAX(history.historyTimeRead)
ORDER BY history.historyTimeRead DESC
`;
export const getHistory = async () => {
return new Promise((resolve, reject) => {
db.transaction((tx) => {
tx.executeSql(
getHistoryQuery,
null,
(txObj, { rows: { _array } }) => {
resolve(_array);
},
(txObj, error) => console.log("Error ", error)
);
});
});
};
// const insertHistoryQuery =
export const insertHistory = async (novelId, chapterId) => {
db.transaction((tx) => {
tx.executeSql(
"INSERT OR REPLACE INTO history (historyNovelId, historyChapterId, historyTimeRead) VALUES (?, ?, (datetime('now','localtime')))",
[novelId, chapterId],
(txObj, res) => {},
(txObj, error) => console.log("Error ", error)
);
tx.executeSql("UPDATE novels SET unread = 0 WHERE novelId = ?", [
novelId,
]);
});
};
export const deleteHistory = async (historyId) => {
db.transaction((tx) => {
tx.executeSql(
"DELETE FROM history WHERE historyId = ?",
[historyId],
(txObj, res) => {},
(txObj, error) => console.log("Error ", error)
);
});
};
export const deleteAllHistory = async () => {
db.transaction((tx) => {
tx.executeSql("DELETE FROM history; VACCUM;");
});
};
-75
View File
@@ -1,75 +0,0 @@
import * as SQLite from "expo-sqlite";
const db = SQLite.openDatabase("lnreader.db");
const getLibraryQuery = (sort, filter) => `
SELECT novels.*, C.chaptersUnread, D.chaptersDownloaded
FROM novels
LEFT JOIN (
SELECT chapters.novelId, COUNT(*) AS chaptersUnread
FROM chapters
WHERE chapters.read = 0
GROUP BY chapters.novelId
) AS C
ON novels.novelId = C.novelId
LEFT JOIN (
SELECT chapters.novelId, COUNT(*) AS chaptersDownloaded
FROM chapters
WHERE chapters.downloaded = 1
GROUP BY chapters.novelId
) AS D
ON novels.novelId = D.novelId
WHERE novels.followed = 1 ${filter ? "AND " + filter : ""}
${sort ? "ORDER BY " + sort : ""}
`;
export const getLibrary = (sort, filter) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
getLibraryQuery(sort, filter),
null,
(txObj, { rows: { _array } }) => {
// console.log(_array);
resolve(_array);
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
const searchLibraryQuery = (searchText, sort, filter) =>
`
SELECT novels.*, C.chaptersUnread, D.chaptersDownloaded
FROM novels
LEFT JOIN (
SELECT chapters.novelId, COUNT(*) AS chaptersUnread
FROM chapters
WHERE chapters.read = 0
GROUP BY chapters.novelId
) AS C
ON novels.novelId = C.novelId
LEFT JOIN (
SELECT chapters.novelId, COUNT(*) AS chaptersDownloaded
FROM chapters
WHERE chapters.downloaded = 1
GROUP BY chapters.novelId
) AS D
ON novels.novelId = D.novelId
WHERE novels.followed = 1 AND novelName LIKE '%${searchText}%' ${
filter ? "AND " + filter : ""
}
${sort ? "ORDER BY " + sort : ""} `;
export const searchLibrary = (searchText, sort, filter) => {
return new Promise((resolve, reject) => {
db.transaction((tx) => {
tx.executeSql(
searchLibraryQuery(searchText, sort, filter),
null,
(txObj, { rows: { _array } }) => resolve(_array),
(txObj, error) => console.log("Error ", error)
);
});
});
};
-159
View File
@@ -1,159 +0,0 @@
import * as SQLite from "expo-sqlite";
const db = SQLite.openDatabase("lnreader.db");
import { fetchChapters, fetchNovel } from "../../Services/Source/source";
import { insertChapters } from "./ChapterQueries";
const insertNovelQuery = `INSERT INTO novels (novelUrl, sourceUrl, sourceId, source, novelName, novelCover, novelSummary, author, artist, status, genre) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
export const insertNovel = async (novel) => {
return new Promise((resolve, reject) =>
db.transaction((tx) =>
tx.executeSql(
insertNovelQuery,
[
novel.novelUrl,
novel.sourceUrl,
novel.sourceId,
novel.source,
novel.novelName,
novel.novelCover,
novel.novelSummary,
novel.author,
novel.artist,
novel.status,
novel.genre,
],
(txObj, { insertId }) => resolve(insertId),
(txObj, error) => console.log("Error ", error)
)
)
);
};
export const followNovel = async (followed, novelId) => {
db.transaction((tx) => {
tx.executeSql(
"UPDATE novels SET followed = ? WHERE novelId = ?",
[!followed, novelId],
(tx, res) => {},
(txObj, error) => console.log("Error ", error)
);
});
};
const checkNovelInCacheQuery = `SELECT * FROM novels WHERE novelUrl=? LIMIT 1`;
export const checkNovelInCache = (novelUrl) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
checkNovelInCacheQuery,
[novelUrl],
(txObj, res) => {
if (res.rows.length !== 0) {
resolve(true);
} else {
resolve(false);
}
},
(txObj, error) => console.log("Error ", error)
);
})
);
};
export const getNovel = async (sourceId, novelUrl) => {
return new Promise((resolve, reject) =>
db.transaction((tx) => {
tx.executeSql(
`SELECT * FROM novels WHERE novelUrl = ? AND sourceId = ?`,
[novelUrl, sourceId],
(txObj, { rows }) => resolve(rows.item(0)),
(txObj, error) => console.log("Error ", error)
);
})
);
};
export const deleteNovelCache = () => {
db.transaction((tx) => {
tx.executeSql(
"DELETE FROM novels WHERE followed = 0",
null,
(txObj, res) => {
console.log("Cleared Novel Cache");
},
(txObj, error) => console.log("Error ", error)
);
});
};
const restoreFromBackupQuery = `INSERT INTO novels (novelUrl, sourceUrl, sourceId, source, novelName, novelCover, novelSummary, author, artist, status, genre, followed, unread) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
export const restoreLibrary = async (novel) => {
return new Promise((resolve, reject) =>
db.transaction((tx) =>
tx.executeSql(
restoreFromBackupQuery,
[
novel.novelUrl,
novel.sourceUrl,
novel.sourceId,
novel.source,
novel.novelName,
novel.novelCover,
novel.novelSummary,
novel.author,
novel.artist,
novel.status,
novel.genre,
novel.followed,
novel.unread,
],
async (txObj, { insertId }) => {
const chapters = await fetchChapters(
novel.sourceId,
novel.novelUrl
);
await insertChapters(insertId, chapters);
},
(txObj, error) => console.log("Error ", error)
)
)
);
};
const migrateNovelQuery = `INSERT INTO novels (novelUrl, sourceUrl, sourceId, source, novelName, novelCover, novelSummary, author, artist, status, genre, followed) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
export const migrateNovel = async (sourceId, novelUrl) => {
const novel = await fetchNovel(sourceId, novelUrl);
db.transaction((tx) =>
tx.executeSql(
migrateNovelQuery,
[
novel.novelUrl,
novel.sourceUrl,
novel.sourceId,
novel.source,
novel.novelName,
novel.novelCover,
novel.novelSummary,
novel.author,
novel.artist,
novel.status,
novel.genre,
1,
],
async (txObj, { insertId }) => {
const chapters = await fetchChapters(
novel.sourceId,
novel.novelUrl
);
await insertChapters(insertId, chapters);
},
(txObj, error) => console.log("Error ", error)
)
);
};
-38
View File
@@ -1,38 +0,0 @@
import * as SQLite from "expo-sqlite";
const db = SQLite.openDatabase("lnreader.db");
const getUpdatesQuery = `
SELECT chapters.chapterId, chapters.read, chapters.downloaded, chapters.chapterUrl, chapters.chapterName, novels.novelUrl, novels.novelId, novels.novelCover, novels.novelName, novels.sourceId, updates.updateTime, updates.updateId
FROM updates
JOIN chapters
ON updates.chapterId = chapters.chapterId
JOIN novels
ON updates.novelId = novels.novelId
ORDER BY updates.updateTime DESC
`;
export const getUpdates = async () => {
return new Promise((resolve, reject) => {
db.transaction((tx) => {
tx.executeSql(
getUpdatesQuery,
null,
(txObj, { rows: { _array } }) => {
resolve(_array);
},
(txObj, error) => console.log("Error ", error)
);
});
});
};
export const deleteNovelUpdates = (novelId) => {
db.transaction((tx) => {
tx.executeSql(
"DELETE FROM updates WHERE novelId = ?",
[novelId],
(txObj, res) => {},
(txObj, error) => console.log("Error ", error)
);
});
};
-11
View File
@@ -1,11 +0,0 @@
export const createDownloadTableQuery = `
CREATE TABLE IF NOT EXISTS downloads(
downloadId INTEGER PRIMARY KEY AUTOINCREMENT,
downloadChapterId INTEGER NOT NULL,
chapterName TEXT,
chapterText TEXT,
nextChapter TEXT,
prevChapter TEXT,
FOREIGN KEY (downloadChapterId) REFERENCES chapters(chapterId)
ON DELETE CASCADE
)`;
-46
View File
@@ -1,46 +0,0 @@
import { useState, useEffect } from "react";
export const githubUpdateChecker = () => {
const latestReleaseUrl =
"https://api.github.com/repos/rajarsheechatterjee/lnreader/releases/latest";
const [checking, setChecking] = useState(true);
const [latestRelease, setLatestRelease] = useState();
const checkForRelease = async () => {
let res = await fetch(latestReleaseUrl);
res = await res.json();
const release = {
tag_name: res.tag_name,
body: res.body,
downloadUrl: res.assets[0].browser_download_url,
};
setLatestRelease(release);
setChecking(false);
};
const isNewVersion = (versionTag) => {
let currentVersion = "v1.0.21";
const regex = /[^\\d.]/;
let newVersion = versionTag.replace(regex, "");
currentVersion = currentVersion.replace(regex, "");
return newVersion !== currentVersion;
};
useEffect(() => {
checkForRelease();
}, []);
if (!checking) {
const data = {
latestRelease,
isNewVersion: isNewVersion(latestRelease.tag_name),
};
return data;
}
};
-131
View File
@@ -1,131 +0,0 @@
import { shallowEqual, useSelector } from "react-redux";
import { showChapterTitlesAction } from "../redux/novel/novel.actions";
const useTheme = () => {
const theme = useSelector((state) => state.settingsReducer.theme);
return theme;
};
const useReaderSettings = () => {
const readerSettings = useSelector((state) => state.settingsReducer.reader);
return readerSettings;
};
const useSettings = () => {
const settings = useSelector((state) => state.settingsReducer);
return settings;
};
const useLibrary = () => {
const library = useSelector((state) => state.libraryReducer.novels);
return library;
};
const useNovel = () => {
const novel = useSelector((state) => state.novelReducer);
return novel;
};
const useChapter = () => {
const chapter = useSelector((state) => state.chapterReducer);
return chapter;
};
const findNovel = (novelId) => {
let novel = useSelector((state) => state.preferenceReducer.novelSettings);
novel = novel[novelId];
return novel;
};
const usePreferences = (novelId) => {
let sort, filter, position, showChapterTitles;
const novel = findNovel(novelId);
if (novel) {
sort = novel.sort;
filter = novel.filter;
position = novel.position;
showChapterTitles = novel.showChapterTitles;
}
return { sort, filter, position, showChapterTitles };
};
const useSavedSettings = () => {
const settings = useSelector(
(state) => state.preferenceReducer.novelSettings
);
return settings;
};
const useContinueReading = (chapters, novelId) => {
let lastReadChapter, chapterId, novel, position;
novel = findNovel(novelId);
if (novel) {
chapterId = novel.lastRead;
position = novel.position;
}
if (chapterId) {
lastReadChapter = chapters.find(
(obj) => obj.chapterId === chapterId && obj.read === 0
);
}
if (!lastReadChapter) {
lastReadChapter = chapters.find((obj) => obj.read === 0);
}
return { lastReadChapter, position };
};
const usePosition = (novelId, chapterId) => {
let novel, position;
novel = findNovel(novelId);
if (novel) {
if (novel.position) {
position = novel.position[chapterId] || null;
}
}
return position;
};
const useTrackingStatus = () => {
const tracker = useSelector((state) => state.trackerReducer);
return tracker;
};
const useLibraryFilters = () => {
const filters = useSelector((state) => state.libraryReducer.filters);
return filters;
};
export {
useTheme,
useReaderSettings,
useLibrary,
useSettings,
usePreferences,
useContinueReading,
useTrackingStatus,
useNovel,
useChapter,
useSavedSettings,
useLibraryFilters,
usePosition,
};
-10
View File
@@ -1,10 +0,0 @@
import { setStatusBarStyle as setExpoStatusBarStyle } from "expo-status-bar";
import { useTheme } from "../Hooks/reduxHooks";
import changeNavigationBarColor from "react-native-navigation-bar-color";
export const setStatusBarStyle = () => {
const theme = useTheme();
setExpoStatusBarStyle(theme.id === 1 ? "dark" : "light");
changeNavigationBarColor(theme.colorPrimary);
};
-5
View File
@@ -1,5 +0,0 @@
import { ToastAndroid } from "react-native";
export const showToast = (message) => {
ToastAndroid.show(message, ToastAndroid.SHORT);
};
-96
View File
@@ -1,96 +0,0 @@
import React from "react";
import { View } from "react-native";
import { createMaterialBottomTabNavigator } from "@react-navigation/material-bottom-tabs";
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
import Library from "../Screens/Library/Library";
import Updates from "../Screens/Updates/Updates";
import History from "../Screens/History/History";
import Browse from "../Screens/Browse/Browse";
import More from "../Screens/More/More";
import { useTheme } from "../Hooks/reduxHooks";
const Tab = createMaterialBottomTabNavigator();
const BottomNavigator = () => {
const theme = useTheme();
return (
<View style={{ flex: 1, backgroundColor: theme.colorPrimaryDark }}>
<Tab.Navigator
barStyle={{ backgroundColor: theme.colorPrimary }}
activeColor={theme.colorAccent}
>
<Tab.Screen
name="Library"
component={Library}
options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons
name="book-variant-multiple"
color={color}
size={24}
/>
),
}}
/>
<Tab.Screen
name="Updates"
component={Updates}
options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons
name="alert-decagram-outline"
color={color}
size={24}
/>
),
}}
/>
<Tab.Screen
name="History"
component={History}
options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons
name="history"
color={color}
size={24}
/>
),
}}
/>
<Tab.Screen
name="Browse"
component={Browse}
options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons
name="compass-outline"
color={color}
size={24}
/>
),
}}
/>
<Tab.Screen
name="More"
component={More}
options={{
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons
name="dots-horizontal"
color={color}
size={24}
/>
),
}}
/>
</Tab.Navigator>
</View>
);
};
export default BottomNavigator;
-85
View File
@@ -1,85 +0,0 @@
import React from "react";
import {
createStackNavigator,
TransitionPresets,
} from "@react-navigation/stack";
import BottomNavigator from "./BottomNavigator";
import Novel from "../Screens/Novel/Novel";
import Chapter from "../Screens/Chapter/Chapter";
import Extension from "../Screens/Extension/Extension";
import GlobalSearch from "../Screens/Browse/globalsearch/GlobalSearch";
import Migration from "../Screens/Browse/migration/Migration";
import SourceNovels from "../Screens/Browse/SourceNovels";
import MigrateNovel from "../Screens/Browse/migration/MigrationNovels";
import MoreStack from "./More";
import MalTopNovels from "../Screens/Browse/discover/MalTopNovels";
import { setStatusBarStyle } from "../Hooks/setStatusBarStyle";
import { View } from "react-native";
import { useTheme } from "../Hooks/reduxHooks";
import { githubUpdateChecker } from "../Hooks/githubUpdateChecker";
import NewUpdateDialog from "../Components/NewUpdateDialog";
import { NavigationContainer } from "@react-navigation/native";
import BrowseNovelUpdates from "../Screens/Browse/discover/BrowseNovelUpdates";
const Stack = createStackNavigator();
const stackNavigatorConfig = {
headerShown: false,
};
const MainNavigator = () => {
const theme = useTheme();
setStatusBarStyle();
const { isNewVersion, latestRelease } = githubUpdateChecker() || {};
return (
<NavigationContainer
theme={{ colors: { background: theme.colorPrimaryDark } }}
>
<View style={{ flex: 1, backgroundColor: theme.colorPrimaryDark }}>
{isNewVersion && <NewUpdateDialog newVersion={latestRelease} />}
<Stack.Navigator screenOptions={stackNavigatorConfig}>
<Stack.Screen
name="BottomNavigator"
component={BottomNavigator}
/>
<Stack.Screen
name="Novel"
component={Novel}
options={{
...TransitionPresets.RevealFromBottomAndroid,
}}
/>
<Stack.Screen
name="Chapter"
component={Chapter}
options={{ ...TransitionPresets.SlideFromRightIOS }}
/>
<Stack.Screen name="MoreStack" component={MoreStack} />
<Stack.Screen name="Extension" component={Extension} />
<Stack.Screen name="BrowseMal" component={MalTopNovels} />
<Stack.Screen
name="BrowseNovelUpdates"
component={BrowseNovelUpdates}
/>
<Stack.Screen
name="GlobalSearch"
component={GlobalSearch}
/>
<Stack.Screen name="Migration" component={Migration} />
<Stack.Screen
name="SourceNovels"
component={SourceNovels}
/>
<Stack.Screen
name="MigrateNovel"
component={MigrateNovel}
/>
</Stack.Navigator>
</View>
</NavigationContainer>
);
};
export default MainNavigator;
-64
View File
@@ -1,64 +0,0 @@
import React from "react";
import { View } from "react-native";
import { useTheme } from "../Hooks/reduxHooks";
import { createStackNavigator } from "@react-navigation/stack";
import About from "../Screens/More/About";
import Settings from "../Screens/More/Settings";
import TrackerSettings from "../Screens/More/TrackerSettings";
import ReaderSettings from "../Screens/More/ReaderSettings";
import BackupSettings from "../Screens/More/BackupSettings";
import AdvancedSettings from "../Screens/More/AdvancedSettings";
import GeneralSettings from "../Screens/More/GeneralSettings";
const Stack = createStackNavigator();
const stackNavigatorConfig = { headerShown: false };
const SettingsStack = () => {
const theme = useTheme();
return (
<View style={{ flex: 1, backgroundColor: theme.colorPrimaryDark }}>
<Stack.Navigator screenOptions={stackNavigatorConfig}>
<Stack.Screen name="Settings" component={Settings} />
<Stack.Screen
name="GeneralSettings"
component={GeneralSettings}
/>
<Stack.Screen
name="ReaderSettings"
component={ReaderSettings}
/>
<Stack.Screen
name="TrackerSettings"
component={TrackerSettings}
/>
<Stack.Screen
name="BackupSettings"
component={BackupSettings}
/>
<Stack.Screen
name="AdvancedSettings"
component={AdvancedSettings}
/>
</Stack.Navigator>
</View>
);
};
const MoreStack = () => {
const theme = useTheme();
return (
<View style={{ flex: 1, backgroundColor: theme.colorPrimaryDark }}>
<Stack.Navigator screenOptions={stackNavigatorConfig}>
<Stack.Screen name="SettingsStack" component={SettingsStack} />
<Stack.Screen name="About" component={About} />
</Stack.Navigator>
</View>
);
};
export default MoreStack;
-174
View File
@@ -1,174 +0,0 @@
import React, { useEffect, useState } from "react";
import {
StyleSheet,
View,
Text,
FlatList,
ActivityIndicator,
RefreshControl,
} from "react-native";
import { useTheme } from "../../Hooks/reduxHooks";
import { useDispatch, useSelector } from "react-redux";
import {
getSourcesAction,
searchSourcesAction,
} from "../../redux/source/source.actions";
import SourceCard from "./components/SourceCard";
import { showToast } from "../../Hooks/showToast";
import { Searchbar } from "../../Components/Searchbar";
import MalCard from "./components/MalCard";
import NovelUpdatesCard from "./components/NovelUpdatesCard";
const Browse = ({ navigation }) => {
const [refreshing, setRefreshing] = useState(false);
const [searchText, setSearchText] = useState("");
// const [globalSearch, setGlobalSearch] = useState(false);
// const [searchResult, setSearchResults] = useState();
const { sources, search, loading, pinned } = useSelector(
(state) => state.sourceReducer
);
const theme = useTheme();
const dispatch = useDispatch();
const isPinned = (sourceId) =>
pinned.indexOf(sourceId) === -1 ? false : true;
useEffect(() => {
dispatch(getSourcesAction());
}, [getSourcesAction]);
const onRefresh = () => {
showToast("Updating extension list");
setRefreshing(true);
getSourcesAction();
setRefreshing(false);
};
const clearSearchbar = () => {
setSearchText("");
};
const onChangeText = (text) => {
setSearchText(text);
dispatch(searchSourcesAction(text));
};
// const onSubmitEditing = () => {};
const renderItem = ({ item }) => (
<SourceCard
item={item}
isPinned={isPinned(item.sourceId)}
theme={theme}
/>
);
return (
<View
style={[
styles.container,
{ backgroundColor: theme.colorPrimaryDark },
]}
>
<Searchbar
theme={theme}
placeholder="Search Source"
backAction="magnify"
searchText={searchText}
onChangeText={onChangeText}
clearSearchbar={clearSearchbar}
actions={[
{
icon: "book-search",
onPress: () => navigation.navigate("GlobalSearch"),
},
{
icon: "swap-vertical-variant",
onPress: () => navigation.navigate("Migration"),
},
]}
/>
<FlatList
contentContainerStyle={{ flexGrow: 1 }}
data={!searchText ? sources : search}
keyExtractor={(item) => item.sourceId.toString()}
renderItem={renderItem}
extraData={pinned}
ListHeaderComponent={
<View>
<Text
style={{
color: theme.textColorSecondary,
paddingHorizontal: 16,
paddingVertical: 8,
}}
>
Discover
</Text>
<NovelUpdatesCard theme={theme} />
<MalCard theme={theme} />
{pinned.length > 0 && (
<FlatList
contentContainerStyle={{ paddingBottom: 16 }}
data={sources.filter((source) =>
isPinned(source.sourceId)
)}
keyExtractor={(item) =>
item.sourceId.toString()
}
renderItem={renderItem}
extraData={pinned}
ListHeaderComponent={
<Text
style={{
color: theme.textColorSecondary,
paddingHorizontal: 16,
paddingVertical: 8,
}}
>
Pinned
</Text>
}
/>
)}
<Text
style={{
color: theme.textColorSecondary,
paddingHorizontal: 16,
paddingVertical: 8,
}}
>
Sources
</Text>
</View>
}
ListEmptyComponent={
loading && (
<ActivityIndicator
size="small"
color={theme.colorAccent}
style={{ marginTop: 16 }}
/>
)
}
refreshControl={
<RefreshControl
refreshing={refreshing}
onRefresh={onRefresh}
colors={["white"]}
progressBackgroundColor={theme.colorAccent}
/>
}
/>
</View>
);
};
export default Browse;
const styles = StyleSheet.create({
container: { flex: 1 },
});
-166
View File
@@ -1,166 +0,0 @@
import React, { useEffect, useState } from "react";
import { StyleSheet, View, ActivityIndicator, FlatList } from "react-native";
import * as WebBrowser from "expo-web-browser";
import NovelCover from "../../Components/NovelCover";
import { Searchbar } from "../../Components/Searchbar";
import ErrorView from "../../Components/ErrorView";
import { useTheme, useSettings } from "../../Hooks/reduxHooks";
import { showToast } from "../../Hooks/showToast";
import { getDeviceOrientation } from "../../Services/utils/helpers";
import { scrapeSearchResults } from "./discover/MyAnimeListScraper";
const BrowseMalScreen = ({ navigation, route }) => {
const theme = useTheme();
const [loading, setLoading] = useState(true);
const [novels, setNovels] = useState();
const [error, setError] = useState();
const [searchText, setSearchText] = useState("");
const baseUrl = "https://api.jikan.moe/v3/";
const malUrl = "https://myanimelist.net/topmanga.php?type=lightnovels";
const getNovels = async () => {
try {
const url = `${baseUrl}top/manga/1/novels`;
const res = await fetch(url);
const data = await res.json();
setNovels(data.top);
setLoading(false);
} catch (error) {
setError(error.message);
setNovels([]);
setLoading(false);
showToast(error.message);
}
};
const clearSearchbar = () => {
getNovels();
setLoading(true);
setSearchText("");
};
const getSearchResults = async () => {
try {
setLoading(true);
const data = await scrapeSearchResults(searchText);
setNovels(data);
setLoading(false);
} catch (error) {
setError(error.message);
setNovels([]);
setLoading(false);
showToast(error.message);
}
};
useEffect(() => {
getNovels();
}, []);
const renderItem = ({ item }) => (
<NovelCover
item={{ novelName: item.title, novelCover: item.image_url }}
onPress={() =>
navigation.navigate("GlobalSearch", {
novelName: item.title,
})
}
/>
);
const { displayMode, novelsPerRow } = useSettings();
const orientation = getDeviceOrientation();
const getNovelsPerRow = () => {
if (displayMode === 2) {
return 1;
}
if (orientation === "landscape") {
return 6;
} else {
return novelsPerRow;
}
};
const ListEmptyComponent = () => (
<ErrorView
error={error || "No results found"}
onRetry={() => {
getNovels();
setLoading(true);
setError();
}}
openWebView={() => WebBrowser.openBrowserAsync(topNovelsUrl)}
theme={theme}
/>
);
return (
<View
style={[
styles.container,
{ backgroundColor: theme.colorPrimaryDark },
]}
>
<Searchbar
theme={theme}
placeholder="Search MyAnimeList"
backAction="arrow-left"
onBackAction={() => navigation.goBack()}
searchText={searchText}
onChangeText={(text) => setSearchText(text)}
onSubmitEditing={getSearchResults}
clearSearchbar={clearSearchbar}
actions={[
{
icon: "earth",
onPress: () => WebBrowser.openBrowserAsync(malUrl),
},
]}
/>
{loading ? (
<View style={{ flex: 1, justifyContent: "center" }}>
<ActivityIndicator size={60} color={theme.colorAccent} />
</View>
) : (
<FlatList
contentContainerStyle={styles.novelsContainer}
numColumns={getNovelsPerRow()}
key={getNovelsPerRow()}
data={novels}
keyExtractor={(item) => item.mal_id.toString()}
renderItem={renderItem}
ListEmptyComponent={ListEmptyComponent}
/>
)}
</View>
);
};
export default BrowseMalScreen;
const styles = StyleSheet.create({
container: {
flex: 1,
},
contentContainer: {
flex: 1,
},
novelsContainer: {
flexGrow: 1,
paddingVertical: 8,
paddingHorizontal: 4,
},
});
-83
View File
@@ -1,83 +0,0 @@
import React from "react";
import { StyleSheet, View, FlatList, Text } from "react-native";
import { useLibrary, useTheme } from "../../Hooks/reduxHooks";
import EmptyView from "../../Components/EmptyView";
import { Appbar } from "../../Components/Appbar";
import ListView from "../../Components/ListView";
const SourceNovels = ({ navigation, route }) => {
const sourceId = route.params;
const theme = useTheme();
const library = useLibrary();
const sourceNovels = library.filter((novel) => novel.sourceId === sourceId);
const renderItem = ({ item }) => (
<ListView
item={item}
theme={theme}
onPress={() =>
navigation.navigate("MigrateNovel", {
sourceId: item.sourceId,
novelName: item.novelName,
})
}
/>
);
return (
<View
style={[
styles.container,
{ backgroundColor: theme.colorPrimaryDark },
]}
>
<Appbar
title="Select Novel"
onBackAction={() => navigation.goBack()}
/>
<FlatList
data={sourceNovels}
keyExtractor={(item) => item.novelId.toString()}
renderItem={renderItem}
ListEmptyComponent={
<Text
style={{
color: theme.textColorSecondary,
padding: 20,
textAlign: "center",
}}
>
Your library does not have any novels from this source
</Text>
}
/>
{/* <Portal>
<MigrationDialog
migrationDialog={migrationDialog}
hideMigrationDialog={hideMigrationDIalog}
theme={theme}
selectedNovel={selectedNovel}
loading={loading}
migrationNovel={migrationNovel}
/>
<SourceToMigrateDialog
selectedNovel={selectedNovel}
sourceToMigrateDialog={sourceToMigrateDialog}
hideSourceToMigrateDialog={hideSourceToMigrateDialog}
sources={sources}
theme={theme}
showMigrationDialog={showMigrationDialog}
selectSourceToMigrate={selectSourceToMigrate}
/>
</Portal> */}
</View>
);
};
export default SourceNovels;
const styles = StyleSheet.create({
container: { flex: 1 },
});
-80
View File
@@ -1,80 +0,0 @@
import React from "react";
import { View, Text, Image, StyleSheet } from "react-native";
import { TouchableRipple, Button } from "react-native-paper";
import { useNavigation } from "@react-navigation/native";
const MalCard = ({ theme }) => {
const navigation = useNavigation();
const navigateToExtension = () => navigation.navigate("BrowseMal");
return (
<TouchableRipple
style={styles.extensionCard}
onPress={navigateToExtension}
rippleColor={theme.rippleColor}
>
<>
<Image
source={require("../../../../assets/mal.png")}
style={styles.extensionIcon}
resizeMode="contain"
/>
<View style={styles.extensionDetails}>
<View>
<Text
style={{
color: theme.textColorPrimary,
fontSize: 14,
}}
>
MyAnimeList
</Text>
</View>
<View
style={{ flexDirection: "row", alignItems: "center" }}
>
<Button
labelStyle={{ letterSpacing: 0 }}
uppercase={false}
color={theme.colorAccent}
onPress={navigateToExtension}
>
Browse
</Button>
</View>
</View>
</>
</TouchableRipple>
);
};
export default MalCard;
const styles = StyleSheet.create({
extensionCard: {
flexDirection: "row",
alignItems: "center",
marginVertical: 4,
paddingVertical: 8,
paddingHorizontal: 20,
},
extensionIcon: {
width: 40,
height: 40,
borderRadius: 8,
},
extensionDetails: {
flex: 1,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
marginLeft: 16,
},
sourceStatus: {
color: "#C14033",
fontSize: 12,
marginLeft: 5,
},
});
@@ -1,80 +0,0 @@
import React from "react";
import { View, Text, Image, StyleSheet } from "react-native";
import { TouchableRipple, Button } from "react-native-paper";
import { useNavigation } from "@react-navigation/native";
const NovelUpdatesCard = ({ theme }) => {
const navigation = useNavigation();
const navigateToExtension = () => navigation.navigate("BrowseNovelUpdates");
return (
<TouchableRipple
style={styles.extensionCard}
onPress={navigateToExtension}
rippleColor={theme.rippleColor}
>
<>
<Image
source={require("../../../../assets/novelupdates.png")}
style={styles.extensionIcon}
resizeMode="contain"
/>
<View style={styles.extensionDetails}>
<View>
<Text
style={{
color: theme.textColorPrimary,
fontSize: 14,
}}
>
Novel Updates
</Text>
</View>
<View
style={{ flexDirection: "row", alignItems: "center" }}
>
<Button
labelStyle={{ letterSpacing: 0 }}
uppercase={false}
color={theme.colorAccent}
onPress={navigateToExtension}
>
Browse
</Button>
</View>
</View>
</>
</TouchableRipple>
);
};
export default NovelUpdatesCard;
const styles = StyleSheet.create({
extensionCard: {
flexDirection: "row",
alignItems: "center",
marginVertical: 4,
paddingVertical: 8,
paddingHorizontal: 20,
},
extensionIcon: {
width: 40,
height: 40,
borderRadius: 8,
},
extensionDetails: {
flex: 1,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
marginLeft: 16,
},
sourceStatus: {
color: "#C14033",
fontSize: 12,
marginLeft: 5,
},
});
-115
View File
@@ -1,115 +0,0 @@
import React from "react";
import { View, Text, Image, StyleSheet } from "react-native";
import { TouchableRipple, Button, IconButton } from "react-native-paper";
import { useNavigation } from "@react-navigation/native";
import { useDispatch } from "react-redux";
import { pinSourceAction } from "../../../redux/source/source.actions";
import FastImage from "react-native-fast-image";
const ExtensionCard = ({ item, theme, isPinned }) => {
const { sourceId, sourceName, sourceCover, sourceLanguage, status } = item;
const navigation = useNavigation();
const dispatch = useDispatch();
const navigateToExtension = () =>
navigation.navigate("Extension", {
sourceId: item.sourceId,
sourceName: item.sourceName,
sourceUrl: item.sourceUrl,
});
return (
<TouchableRipple
style={styles.extensionCard}
onPress={navigateToExtension}
rippleColor={theme.rippleColor}
>
<>
<Image
source={{ uri: sourceCover }}
style={styles.extensionIcon}
resizeMode="contain"
/>
<View style={styles.extensionDetails}>
<View>
<Text
style={{
color: theme.textColorPrimary,
fontSize: 14,
}}
>
{sourceName}
</Text>
<View style={{ flexDirection: "row" }}>
<Text
style={{
color: theme.textColorSecondary,
fontSize: 12,
}}
>
{sourceLanguage}
</Text>
<Text style={styles.sourceStatus}>
{status === 0 && "• Down"}
</Text>
</View>
</View>
<View
style={{ flexDirection: "row", alignItems: "center" }}
>
<Button
labelStyle={{ letterSpacing: 0 }}
uppercase={false}
color={theme.colorAccent}
onPress={navigateToExtension}
>
Browse
</Button>
<IconButton
icon={isPinned ? "pin" : "pin-outline"}
animated
size={21}
onPress={() => dispatch(pinSourceAction(sourceId))}
color={
isPinned
? theme.colorAccent
: theme.textColorSecondary
}
style={{ margin: 2 }}
/>
</View>
</View>
</>
</TouchableRipple>
);
};
export default ExtensionCard;
const styles = StyleSheet.create({
extensionCard: {
flexDirection: "row",
alignItems: "center",
marginVertical: 4,
paddingVertical: 8,
paddingHorizontal: 20,
},
extensionIcon: {
width: 40,
height: 40,
borderRadius: 8,
},
extensionDetails: {
flex: 1,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
marginLeft: 16,
},
sourceStatus: {
color: "#C14033",
fontSize: 12,
marginLeft: 5,
},
});
@@ -1,127 +0,0 @@
import React, { useState, useEffect } from "react";
import {
ActivityIndicator,
Button,
FlatList,
StyleSheet,
Text,
View,
} from "react-native";
import * as WebBrowser from "expo-web-browser";
import { ScreenContainer } from "../../../Components/Common";
import { Searchbar } from "../../../Components/Searchbar";
import { useTheme } from "../../../Hooks/reduxHooks";
import { scrapeSearchResults, scrapeTopNovels } from "./NovelUpdatesScraper";
import NovelUpdatesNovelCard from "./NovelUpdatesNovelCard";
const BrowseNovelUpdates = ({ navigation }) => {
const theme = useTheme();
const [novels, setNovels] = useState([]);
const [pageNo, setPageNo] = useState(1);
const [loading, setLoading] = useState(true);
const [searchText, setSearchText] = useState("");
const getNovels = async (pageNo) => {
const data = await scrapeTopNovels(pageNo);
setNovels((novels) => novels.concat(data));
setLoading(false);
};
useEffect(() => {
getNovels(1);
}, []);
const getSearchResults = async () => {
setLoading(true);
const data = await scrapeSearchResults(searchText);
setNovels(data);
setLoading(false);
};
const clearSearchbar = () => {
getNovels();
setLoading(true);
setSearchText("");
};
const isCloseToBottom = ({
layoutMeasurement,
contentOffset,
contentSize,
}) => {
const paddingToBottom = 20;
return (
layoutMeasurement.height + contentOffset.y >=
contentSize.height - paddingToBottom
);
};
return (
<ScreenContainer theme={theme}>
<Searchbar
theme={theme}
placeholder="Search Novel Updates"
backAction="arrow-left"
onBackAction={navigation.goBack}
searchText={searchText}
onChangeText={(text) => setSearchText(text)}
onSubmitEditing={getSearchResults}
clearSearchbar={clearSearchbar}
actions={[
{
icon: "earth",
onPress: () =>
WebBrowser.openBrowserAsync(
"https://www.novelupdates.com/"
),
},
]}
/>
{loading ? (
<View style={{ flex: 1, justifyContent: "center" }}>
<ActivityIndicator size={60} color={theme.colorAccent} />
</View>
) : (
<FlatList
data={novels}
keyExtractor={(item) => item.novelName.toString()}
renderItem={({ item }) => (
<NovelUpdatesNovelCard
novel={item}
theme={theme}
onPress={() =>
navigation.navigate("GlobalSearch", {
novelName: item.novelName,
})
}
/>
)}
onScroll={({ nativeEvent }) => {
if (!searchText && isCloseToBottom(nativeEvent)) {
getNovels(pageNo + 1);
setPageNo((pageNo) => pageNo + 1);
}
}}
ListFooterComponent={
!searchText && (
<View style={{ paddingVertical: 16 }}>
<ActivityIndicator color={theme.colorAccent} />
</View>
)
}
/>
)}
</ScreenContainer>
);
};
export default BrowseNovelUpdates;
const styles = StyleSheet.create({});
-195
View File
@@ -1,195 +0,0 @@
import React, { useEffect, useState } from "react";
import {
StyleSheet,
View,
ActivityIndicator,
FlatList,
Button,
} from "react-native";
import * as WebBrowser from "expo-web-browser";
import NovelCover from "../../../Components/NovelCover";
import { Searchbar } from "../../../Components/Searchbar";
import ErrorView from "../../../Components/ErrorView";
import { useTheme, useSettings } from "../../../Hooks/reduxHooks";
import { showToast } from "../../../Hooks/showToast";
import { getDeviceOrientation } from "../../../Services/utils/helpers";
import { scrapeSearchResults, scrapeTopNovels } from "./MyAnimeListScraper";
const BrowseMalScreen = ({ navigation, route }) => {
const theme = useTheme();
const [loading, setLoading] = useState(true);
const [novels, setNovels] = useState([]);
const [error, setError] = useState();
const [limit, setLimit] = useState(0);
const [searchText, setSearchText] = useState("");
const baseUrl = "https://api.jikan.moe/v3/";
const malUrl = "https://myanimelist.net/topmanga.php?type=lightnovels";
const getNovels = async (limit) => {
try {
const data = await scrapeTopNovels(limit);
setNovels((novels) => novels.concat(data));
setLoading(false);
} catch (error) {
setError(error.message);
setNovels([]);
setLoading(false);
showToast(error.message);
}
};
const clearSearchbar = () => {
getNovels();
setLoading(true);
setSearchText("");
};
const getSearchResults = async () => {
try {
setLoading(true);
const data = await scrapeSearchResults(searchText);
setNovels(data);
setLoading(false);
} catch (error) {
setError(error.message);
setNovels([]);
setLoading(false);
showToast(error.message);
}
};
useEffect(() => {
getNovels();
}, []);
const renderItem = ({ item }) => (
<NovelCover
item={{ novelName: item.novelName, novelCover: item.novelCover }}
onPress={() =>
navigation.navigate("GlobalSearch", {
novelName: item.novelName,
})
}
/>
);
const { displayMode, novelsPerRow } = useSettings();
const orientation = getDeviceOrientation();
const getNovelsPerRow = () => {
if (displayMode === 2) {
return 1;
}
if (orientation === "landscape") {
return 6;
} else {
return novelsPerRow;
}
};
const isCloseToBottom = ({
layoutMeasurement,
contentOffset,
contentSize,
}) => {
const paddingToBottom = 20;
return (
layoutMeasurement.height + contentOffset.y >=
contentSize.height - paddingToBottom
);
};
const ListEmptyComponent = () => (
<ErrorView
error={error || "No results found"}
onRetry={() => {
getNovels();
setLoading(true);
setError();
}}
openWebView={() => WebBrowser.openBrowserAsync(topNovelsUrl)}
theme={theme}
/>
);
return (
<View
style={[
styles.container,
{ backgroundColor: theme.colorPrimaryDark },
]}
>
<Searchbar
theme={theme}
placeholder="Search MyAnimeList"
backAction="arrow-left"
onBackAction={() => navigation.goBack()}
searchText={searchText}
onChangeText={(text) => setSearchText(text)}
onSubmitEditing={getSearchResults}
clearSearchbar={clearSearchbar}
actions={[
{
icon: "earth",
onPress: () => WebBrowser.openBrowserAsync(malUrl),
},
]}
/>
{loading ? (
<View style={{ flex: 1, justifyContent: "center" }}>
<ActivityIndicator size={60} color={theme.colorAccent} />
</View>
) : (
<FlatList
contentContainerStyle={styles.novelsContainer}
numColumns={getNovelsPerRow()}
key={getNovelsPerRow()}
data={novels}
keyExtractor={(item) => item.novelName}
renderItem={renderItem}
ListEmptyComponent={ListEmptyComponent}
onScroll={({ nativeEvent }) => {
if (!searchText && isCloseToBottom(nativeEvent)) {
getNovels(limit + 50);
setLimit((limit) => limit + 50);
}
}}
ListFooterComponent={
!searchText && (
<View style={{ paddingVertical: 16 }}>
<ActivityIndicator color={theme.colorAccent} />
</View>
)
}
/>
)}
</View>
);
};
export default BrowseMalScreen;
const styles = StyleSheet.create({
container: {
flex: 1,
},
contentContainer: {
flex: 1,
},
novelsContainer: {
flexGrow: 1,
paddingVertical: 8,
paddingHorizontal: 4,
},
});
@@ -1,70 +0,0 @@
import cheerio from "react-native-cheerio";
const scrapeTopNovels = async (pageNo) => {
const url =
"https://myanimelist.net/topmanga.php?type=lightnovels&limit=" + pageNo;
const res = await fetch(url);
const body = await res.text();
const $ = cheerio.load(body);
const novels = [];
$("tr.ranking-list").each(function (res) {
const novelId = $(this).find("img").attr("data-src").split("/");
const novelCover =
"https://cdn.myanimelist.net/images/manga/" +
novelId[7] +
"/" +
novelId[8].split(".")[0] +
".jpg";
const novelName = $(this).find("h3").text();
const novel = { novelName, novelCover };
novels.push(novel);
});
return novels;
};
const scrapeSearchResults = async (searchTerm) => {
const url =
"https://myanimelist.net/manga.php?q=" +
searchTerm +
"&cat=manga&type=2";
const res = await fetch(url);
const body = await res.text();
const $ = cheerio.load(body);
const novels = [];
$(".list")
.find("tr")
.each(function (res) {
const novelName = $(this).find("a > strong").text();
if (novelName) {
const novelId = $(this).find("img").attr("data-src").split("/");
const novelCover =
"https://cdn.myanimelist.net/images/manga/" +
novelId[7] +
"/" +
novelId[8].split(".")[0] +
".jpg";
const novel = { novelName, novelCover };
novels.push(novel);
}
});
return novels;
};
export { scrapeTopNovels, scrapeSearchResults };

Some files were not shown because too many files have changed in this diff Show More