Commit Graph

1886 Commits

Author SHA1 Message Date
Syer10
8dbab23de7 [skip ci] Manual release only 2025-07-07 23:21:29 -04:00
Syer10
825d232613 [skip ci] Manually input version 2025-07-07 23:14:51 -04:00
Syer10
d797a03502 Modify Winget 2025-07-07 23:05:33 -04:00
Mitchell Syer
0ef6d74514 Add auth to log protection (#1501) 2025-07-06 14:01:37 -04:00
Constantin Piber
6234e897a8 [#1497] WebView: Localstorage (#1500)
* [#1497] WebView: Localstorage

* WebView: Transition to our own header/postData system

This is also what is recommended by most other posts, I haven't seen the
context used anywhere, and `KCEFResourceRequestHandler` seems to just
bypass a lot of CEF

* Lint
2025-07-06 12:09:31 -04:00
renovate[bot]
fe121f59b0 Update okhttp monorepo to v5.0.0 (#1493)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-06 12:09:16 -04:00
renovate[bot]
90cf5fcdec Update dependency com.squareup.okio:okio to v3.15.0 (#1488)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-06 12:09:00 -04:00
renovate[bot]
8b5782a5b6 Update dependency gradle to v8.14.3 (#1494)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-06 12:08:44 -04:00
Constantin Piber
68a131dbeb [#1349] Basic Cookie Authentication (#1498)
* [#1349] Stub basic cookie authentication

* [#1349] Basic login page

Also adjusts WebView header color and shadow to match WebUI. WebUI uses
a background-image gradient to change the perceived color, which was not
noticed originally.

* [#1349] Handle login post

* [#1349] Redirect to previous URL

* [#1349] Return a basic 401 for api endpoints

Instead of redirecting to a visual login page, API should just indicate
the bad state

* Use more appropriate 303 redirect

* Update server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>

* Update server/src/main/kotlin/suwayomi/tachidesk/server/JavalinSetup.kt

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>

* Lint

* Transition to AuthMode enum with migration path

* Make basicAuthEnabled auto property, Lint

* ConfigManager: Make sure to re-parse the config after migration

* basicAuth{Username,Password} -> auth{Username,Password}

* Lint

* Update server settings backup model

* Update comment

* Minor cleanup

* Improve backup legacy settings fix

* Lint

* Simplify config value migration

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2025-07-06 12:08:29 -04:00
Mitchell Syer
1411c02e18 [skip ci] Update CONTRIBUTING.md 2025-07-02 23:38:22 -04:00
Constantin Piber
81fe3f0108 Stop dumping cookies in the console (#1490) 2025-07-02 13:35:56 -04:00
Constantin Piber
c15cf23168 Kcef: Disable SHM (#1489)
In Docker, `/dev/shm` is restricted, so Chromium dies of OOM

See also https://stackoverflow.com/a/56941767/7508309
2025-07-02 13:23:21 -04:00
Constantin Piber
a79dc580a5 Browser Webview (#1486)
* WebView: Add initial controller

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>

* WebView: Prepare page

* WebView: Basic HTML setup

* WebView: Improve navigation

* WebView: Refactor message class deserialization

* WebView: Refactor event message serialization

* WebView: Handle click events

* WebView: Fix events after refactor

* WebView: Fix normalizing of URLs

* WebView: HTML remove navigation buttons

* WebView: Handle more events

* WebView: Handle document change in events

* WebView: Refactor to send mutation events

* WebView: More mouse events

* WebView: Include bubbles, cancelable in event

Those seem to be important

* WebView: Attempt to support nested iframe

* WebView: Handle long titles

* WebView: Avoid setting invalid url

* WebView: Send mousemove

* WebView: Start switch to canvas-based render

* WebView: Send on every render

* WebView: Dynamic size

* WebView: Keyboard events

* WebView: Handle mouse events in CEF

This is important because JS can't click into iFrames, meaning the
previous solution doesn't work for captchas

* WebView: Cleanup

* WebView: Cleanup 2

* WebView: Document title

* WebView: Also send title on address change

* WebView: Load and flush cookies from store

* WebView: remove outdated TODOs

* Offline WebView: Load cookies from store

* Cleanup

* Add KcefCookieManager, need to figure out how to inject it

* ktLintFormat

* Fix a few cookie bugs

* Fix Webview on Windows

* Minor cleanup

* WebView: Remove /tmp image write, lint

* Remove custom cookie manager

* Multiple cookie fixes

* Minor fix

* Minor cleanup and add support for MacOS meta key

* Get enter working

* WebView HTML: Make responsive for mobile pages

* WebView: Translate touch events to mouse scroll

* WebView: Overlay an actual input to allow typing on mobile

Browsers will only show the keyboard if an input is focused. This also
removes the `tabstop` hack.

* WebView: Protect against occasional NullPointerException

* WebView: Use float for clientX/Y

* WebView: Fix ChromeAndroid being a pain

* Simplify enter fix

* NetworkHelper: Fix cache

* Improve CookieStore url matching, fix another cookie conversion issue

* Move distinctBy

* WebView: Mouse direction toggle

* Remove accidentally copied comment

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
2025-07-01 17:28:41 -04:00
renovate[bot]
8a62c6295d Update moko to v0.25.0 (#1487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 17:28:28 -04:00
renovate[bot]
88e77e1547 Update okhttp monorepo to v5.0.0-alpha.17 (#1485)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-01 17:28:06 -04:00
Weblate (bot)
534619bc1a Weblate translations (#1484)
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/ja/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/pl/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/pt/
Translation: Suwayomi/Suwayomi-Server

Co-authored-by: 9811pc <9811.main@gmail.com>
Co-authored-by: N'Num Yutthaphon Inchaiya <yutthaphon30667@gmail.com>
Co-authored-by: Psico <psikenji@users.noreply.hosted.weblate.org>
Co-authored-by: Syer10 <Mitchellptbo@gmail.com>
Co-authored-by: UnknownSkyrimPasserby <f7022961@opayq.com>
2025-07-01 17:27:56 -04:00
Constantin Piber
ae904753f7 systemd: use startup script, X server (#1482)
* systemd: use startup script

* script: Start X server using `xvfb-run` if DISPLAY is not set
2025-06-28 17:04:13 -04:00
Mitchell Syer
8c4a2cb529 Add chapter lastReadAt to backups as BackupHistory (#1477)
* Add chapter lastReadAt to backups as BackupHistory

* MaxOrNull
2025-06-28 17:04:04 -04:00
renovate[bot]
16d4893480 Update dependency com.squareup.okio:okio to v3.14.0 (#1483)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:03:55 -04:00
renovate[bot]
a7446e2f4c Update dependency com.github.usefulness:webp-imageio to v0.10.1 (#1480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:03:47 -04:00
renovate[bot]
9dcae193a9 Update serialization to v1.9.0 (#1479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:03:36 -04:00
renovate[bot]
36fac0f3f4 Update dependency com.android.tools.build:apksig to v8.11.0 (#1473)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:03:26 -04:00
renovate[bot]
24a4c176c0 Update plugin buildconfig to v5.6.7 (#1469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:03:17 -04:00
renovate[bot]
9c7f50e91e Update kotlin monorepo to v2.2.0 (#1466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:03:07 -04:00
renovate[bot]
e52bc255f3 Update dependency org.jsoup:jsoup to v1.21.1 (#1465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-28 17:02:58 -04:00
Weblate (bot)
ae4c9887d8 Translations update from Hosted Weblate (#1471)
* Weblate translations

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: N'Num Yutthaphon Inchaiya <yutthaphon30667@gmail.com>
Co-authored-by: Psico <psikenji@users.noreply.hosted.weblate.org>
Co-authored-by: UnknownSkyrimPasserby <f7022961@opayq.com>
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/pl/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/pt/
Translation: Suwayomi/Suwayomi-Server

* Deleted translation using Weblate (Thai)

* Deleted translation using Weblate (Portuguese (Portugal))

* Update languages.json

---------

Co-authored-by: N'Num Yutthaphon Inchaiya <yutthaphon30667@gmail.com>
Co-authored-by: Psico <psikenji@users.noreply.hosted.weblate.org>
Co-authored-by: UnknownSkyrimPasserby <f7022961@opayq.com>
Co-authored-by: Syer10 <Mitchellptbo@gmail.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2025-06-28 17:02:46 -04:00
Mitchell Syer
52201e2488 Add private to trackrecords filter (#1468)
* Add private to trackrecords filter

* Remove sourceMapping from base

* Format
2025-06-26 22:04:26 -04:00
renovate[bot]
c3e2b0e002 Update dependency io.mockk:mockk to v1.14.4 (#1464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-22 20:19:08 -04:00
renovate[bot]
709915bf59 Update dependency io.javalin:javalin to v6.7.0 (#1460)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-22 20:17:52 -04:00
renovate[bot]
9d7ec6fd60 Update dependency io.mockk:mockk to v1.14.3 (#1462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-22 20:17:46 -04:00
Mitchell Syer
ee9de376a3 Fix new private parameter in tracking backup (#1463)
* Fix new private parameter in tracking backup

* Cleanup uneeded models
2025-06-22 20:17:31 -04:00
Mitchell Syer
b54dc6f967 Fix Tracking DisplayScore (#1461) 2025-06-22 15:53:25 -04:00
Mitchell Syer
abea85d831 Update Tracking Backend (#1457)
* Update Tracking Library

* Update Bangumi

* Update Anilist

* Update MangaUpdates

* Update MAL

* Add private to bind track

* Use null

* Remove old nullable

* Remove custom implementation of supportsTrackDeletion

* Add private to updateTrack

* Some descriptions

* Another description
2025-06-22 10:38:22 -04:00
Constantin Piber
972137c035 Paint: Support Typeface (#1459)
* Paint: Support Typeface

* Paint: Undo textSize transform
2025-06-22 10:38:09 -04:00
Mitchell Syer
1cdef5e0ee Use Kotlin AppDirs (#1453) 2025-06-21 12:02:14 -04:00
Constantin Piber
bd7ea64b02 Add an abort handler and preload it on Linux (#1456)
Some native code (CEF) may cause SIGTRAP to be sent on fatal errors,
which brings down the entire server. Instead only kill the thread and
attempt to continue.
2025-06-21 12:02:05 -04:00
Constantin Piber
20c850c10b Implement Bitmap.copy, text layouting (#1455)
* Bitmap: Use provided config

* Bitmap: implement copy

* Bitmap: Simplify getPixels

This also fixes a bug where the returned data may not be in the correct
format

Android getPixels():
> The returned colors are non-premultiplied ARGB values in the sRGB color space.
BufferedImage getRGB():
> Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space

* Stub TextPaint and Paint

* Paint: Implement some required functions

* Stub StaticLayout and Layout

* Implement some Paint support

* Draw Bounds

* WebP write support

* First text rendering

* Paint: Fix text size, font metrics

* Paint: Fix not copying new properties

Fixes font size in draw

* Canvas: Stroke add cap/join for better aliasing

Otherwise we get bad artifacts on sharp corners

Based on https://stackoverflow.com/a/35222059/

* Remove logs

* Canvas: Implement other drawText methods

* Bitmap: support erase

* Layout: Fix text direction

Should be LTR, otherwise 0 is read, which is automatically interpreted
as RTL without explicit check

* Bitmap: scale to destination rectangle

* Canvas: drawBitmap with just x/y

* Bitmap: Convert image on JPEG export to RGB

JPEG does not support alpha, so will throw "bogus color space"

* Switch to newer fork
2025-06-21 12:01:56 -04:00
Constantin Piber
0b021e6c42 Increase WebView compatibility (#1451)
* LoadData: Use regular load but intercept request

The method we used before, `createBrowserWithHtml`, is implemented by
KCEF. This method creates a `file://` url and adds handlers for that.
Instead, use regular `createBrowser` and intercept the request later on.
This has the effect of creating the page with the correct origin, while
still setting the requested HTML instead of live data. This is important
for scripts due to CORS.

Also fixes a mistake in the ResourceRequestHandler, where (a) the status
was not set, resulting in ABORT, (b) the return value of `readResponse`
was correct (`false` too early) and (c) the callback was unnecessarily
called on the MainLoop.
Based on https://stackoverflow.com/a/52423252/

* Convince the compiler we're doing it right

Invoking "public final" methods would fail. Not sure why this only
happens for some extensions, but it does. We need to tell the compiler
we're sure we have access to it, for some reason...

* JS: Invoke result handler on the loop

Some extensions call WebView methods on the result, so this should be on
the same loop as the WebView itself

* JS: Await arguments

* Fix using wrong URL property for errors
2025-06-20 12:21:25 -04:00
renovate[bot]
0d109cdd4f Update graphqlkotlin to v8.8.1 (#1450)
* Update graphqlkotlin to v8.8.1

* Remove manual graphql-java-core update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Syer10 <syer10@users.noreply.github.com>
2025-06-20 12:21:13 -04:00
Syer10
1dab9e1a7d Fix database migration 2025-06-15 17:30:24 -04:00
Syer10
593b01819d Update locales 2025-06-15 17:16:51 -04:00
renovate[bot]
029aa9c01b Update plugin buildconfig to v5.6.6 (#1449)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 17:15:26 -04:00
schroda
149b549d8d Handle chapter marked as downloaded without downloaded files (#1448)
In case a chapter was marked as downloaded but did not have any downloaded files, an uncaught exception was thrown
2025-06-15 17:15:10 -04:00
renovate[bot]
786635010e Update dependency com.squareup.okio:okio to v3.13.0 (#1447)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 17:14:57 -04:00
Weblate (bot)
d7fe170067 Weblate translations (#1445)
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/de/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/ta/
Translate-URL: https://hosted.weblate.org/projects/suwayomi/suwayomi-server/zh_Hans/
Translation: Suwayomi/Suwayomi-Server

Co-authored-by: Constantin Piber <cp.piber@gmail.com>
Co-authored-by: Poesty Li <poesty7450@gmail.com>
Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
2025-06-15 17:14:44 -04:00
renovate[bot]
e3d4be9a5a Update dependency org.bouncycastle:bcprov-jdk18on to v1.81 (#1443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 17:14:29 -04:00
schroda
4086a73727 Feature/backup suwayomi data (#1430)
* Export meta data

* Import meta data

* Add missing "opdsUseBinaryFileSize" setting to gql

* Export server settings

* Import server settings

* Streamline server config enum handling

* Use "restore amount" in backup import progress
2025-06-15 17:14:13 -04:00
schroda
483e3a760f Increase chapter scanlator column max length (#1425) 2025-06-15 17:13:57 -04:00
renovate[bot]
2757f881dc Update plugin ktlint to v12.3.0 (#1403)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 17:13:39 -04:00
renovate[bot]
e2aff0ece7 Update dependency com.pinterest.ktlint:ktlint-cli to v1.6.0 (#1402)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-15 17:13:26 -04:00