-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP DO NOT MERGE [fix #608] add opds feed catalog in add feed modal #735
WIP DO NOT MERGE [fix #608] add opds feed catalog in add feed modal #735
Conversation
} | ||
|
||
export class OpdsFeedAddForm extends React.Component<Props, State> { | ||
constructor(props: any) { | ||
private defaultSelectValue = "undefined"; | ||
private opdsFeedListServerUrl = "http://thorium-opds.edrlab.org/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would strongly suggest using the secure HTTPS URL (there is no justification for using HTTP nowadays).
(for example, if the renderer process is moved to secure HTTPS in the future, then this non-HTTPS window.fetch
request will fail)
https://www.eff.org/https-everywhere
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://thorium-opds.edrlab.org/ doesn't works. spoken with Laurent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTTP CORS headers are missing in the root EDRLab URL, so fetch()
Web API will reject the request.
Workaround: use request
NodeJS API instead of window.fetch
(nodeIntegration
will be removed at some point, but we can still use it now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note the discrepancy in the context where the HTTP request is created (i.e. renderer processes for library and reader BrowserWindows):
- dev:
http://localhost:8090
(WebPack dev server) - prod:
file://
(normal Electron URL from the filesystem / ASAR bundle in a packaged app)
|
||
npm install --global surge | ||
|
||
surge THIS_FOLDER thorium-reader.surge.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ensure --add EMAIL_ADDRESS
to ensure multiple "admins" can remotely control the contents of the deployed list of OPDS feeds (otherwise, only a single developer can edit this data, which can be problematic if an urgent change is required, and the developer is not reachable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your email address ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aozora": "http://aozora.textlive.net/catalog.opds", | ||
"prestigio plaza": "http://ebooks.prestigioplaza.com/feed", | ||
"bnf.fr (gallica)": "http://gallica.bnf.fr/opds" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO @llemeurfr Curate an acceptable list of OPDS feeds (some of these are a bit, erm ... let's say "dodgy" :)
Original source:
https://github.com/readium/r2-streamer-js/blob/develop/docs/opds.md#a-selection-of-public-opds-feeds
(please contribute additions / modifications there as well, as this long list is great for testing edge-cases, including network errors, incomplete HTTP headers, invalid OPDS format, etc.)
Suggestion: use a catalog registry format/JSON syntax similar to the NYPL one: |
I have made no design to implement this feature. just a simple select html element
I saw an html glitch on the first initialisation of component : the name placeholder isn't displayed. Like a space in input field, why ?
fixes #608