avoonix / material-e621

Material e621 is a modern, open source web client for e621.net. It is customizable, comes with a bunch of additional features that are not available on e621.net, and makes browsing posts a delightful experience.
https://material-e621.vercel.app
GNU Affero General Public License v3.0
54 stars 6 forks source link

[Bug]: Can't mark Favorite at local websever or app #25

Open NaughtDZ opened 9 months ago

NaughtDZ commented 9 months ago

Expected Behavior

I can mark an image to My favorite.

Actual Behavior

Using https://github.com/avoonix/material-e621/commit/142eed1391215e40e9d0cf19192cdff013285bad OS:Windows 11 Webbrowser:Edage

After using API login e621,I cant mark favorite whatever "builded desktop app" or just "npm run preview"in local website and It shows "network error",but nothing show up in console. Other feature is working well,and I can do it on https://material-e621.vercel.app/#/ Did I miss something?

Steps to Reproduce the Problem

No response

avoonix commented 9 months ago

In the network tab it should say something along the lines of cross origin resource sharing error. This is because the proxy only allows localhost:8080 and material-e621.vercel.app (https://github.com/avoonix/material-e621-proxy/blob/2a47c3b4cdcc379972861f74653881974fbff837/util.ts#L26).

For development, you can use pnpm dev --port 8080 (this is probably the correct command, or something similar).

If you want to host material e621 somewhere else, you can deploy your own version of the proxy, or use other proxies like https://github.com/Rob--W/cors-anywhere. You can change the proxy address in https://material-e621.vercel.app/#/settings/account to http://localhost:1234/https://e621.net/ (eg if cors-anywhere is listening on 1234).

As for the desktop app, this is a bug - I will probably have a look at it at some point; in the meantime you can also deploy my proxy or cors-anywhere or something similar yourself.