Closed david-allison closed 5 months ago
Anki's reference: https://github.com/ankitects/anki/pull/3077
The svelte changes are not in .1
Oh yeah, it's in 24.04.2beta1 https://github.com/ankitects/anki/compare/24.04.1...24.04.2beta1, not in 24.04.1
Got to the point of loading index.html
all the immutable resources (css, js, etc), but keep running into this error "Error: Not found: /sveltekit/graphs"
(source)
Currently with no time or interest to diagnose
Got a patch/branch? I'm also time-limited
For it to work, the webview should request '/graphs'. The web server should catch that request, and return the contents of index.html. You'll need to teach the web server the various endpoints it should map to index.html, like /graphs, /deck-options/{deck-id}, etc.
The webview should request '/graphs'. The web server should catch that request, and return the contents of index.html.
I did that
Patches:
Where is isSvelteKitPage() called?
It isn't called because I didn't see the need.
Anki uses it there because mediasrv.py
needs to differentiate between all the different requests in the app (media, reviewer JS, etc), but in AnkiDroid we can have the webview isolated to only the Svelte pages
There's these other calls, but they only make sense in Anki's architecture, AFAICT
For context, only one graphs
request is made to the webview, which is the one that successfully loads index.html, which loads all the CSS and JS files successfully, but client.js says that it couldn't find sveltekit/graphs
although no new requests are made.
For it to work, the webview should request '/graphs'.
but client.js says that it couldn't find sveltekit/graphs
Got it to work. Thanks!
I updated the patch. Idk when Anki will release it or when AnkiDroid will ship it, and I'm going to be out for some time, so I probably won't finish it out.
About the patch, the stuff I removed (like setting the background) was just to simplify the debugging process and should be added back. Also did that because I expect most of the PageFragment classes to be refactored and perhaps removed
Blocker for AnkiDroid 2.18 releaseSome SvelteKit changes are necessary