-
Notifications
You must be signed in to change notification settings - Fork 6
Implement web #15
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
Implement web #15
Conversation
- Added package.json for dependency management and build scripts. - Created pubspec.yaml to define package metadata and dependencies. - Implemented Peripherals class for keyboard navigation. - Developed preferences management functions for user settings. - Built ReadiumReader class to handle publication loading and navigation. - Added CSS styles for the web interface. - Configured TypeScript and Webpack for module bundling. - Created index.html as the entry point for the web application.
…ation method and managing publications in a static map
- Renamed the method `updatePreferences` to `setEPUBPreferences` to better match naming convention in FlutterReadium - Modified the logic for handling null or undefined preferences to ensure a default empty object is used. - Changed the default theme in preferences from 'day' to 'custom' as day has been removed. - Cleaned up the preferences module by renaming the original `setPreferencesFromString` to `initializePreferencesFromString` and `updatePreferences` to `setPreferencesFromString` for clarity.
…les to latest beta versions
…l and ReadiumWebView
… and type normalization
…tializing navigator
| final selector = locations?.cssSelector ?? locations?.domRange?.start.cssSelector; | ||
| final idFragment = selector?.startsWith('#') == true ? selector!.substring(1) : null; | ||
| // Make sure href only contains path. | ||
| final locationHref = hrefPath.startsWith('/') ? hrefPath.substring(1) : hrefPath; |
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.
Only contains path? This would make /some/path/to/file.json into some/path/to/file.json, but keep https://domain.dk/some/path/to/file.json as is.
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.
if it starts with / we get issues because readium itself already has it
| Future<Publication?> openPublicationFromUrl(String pubUrl) async { | ||
| try { | ||
| Publication pub = await _flutterReadiumPlugin.openPublication(pubUrl); | ||
| Publication pub = kIsWeb |
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.
Maybe we could generalize this, so all platforms use the same function here?
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 @ddfreiling has written for native uses openPublication, but that is not possible with ts-toolkit. We need to make another PR with implements getPublication in native and then we can generalize it. Until then this should stay
ddfreiling
left a comment
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.
Amazing work, merging before we hit too much drift from implementing audio navigators.
No description provided.