Commit Graph

24 Commits

Author SHA1 Message Date
Innei b67685b6c1
feat(mobile): enhance image preview and URL scheme handling in iOS
- Implement FollowImageURLSchemeHandler for custom image loading and caching
- Update ImagePreview to support loading images from URLs
- Modify WebView configuration to use new image URL scheme handler
- Remove deprecated image preview methods
- Update bridge data structure for image preview
- Refactor image preview logic across multiple modules

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-12 00:05:14 +08:00
Stephen Zhou a110bbae4f
refactor(mobile): rename sourceContent to readabilityContent (#3013)
* refactor(mobile): rename sourceContent to readabilityContent

* update
2025-03-10 11:20:20 +08:00
Stephen Zhou 699b4d0ad8
feat(mobile): readability (#2978)
* feat(mobile): readability support

* update

* update

* silent lint

* chore: auto-fix linting and formatting issues

* update

* update

* manually trigger fetch
2025-03-06 15:50:45 +08:00
Stephen Zhou 414fee8c46
build: fix import path (#2932) 2025-03-02 18:01:11 +08:00
DIYgod 8b07a9a573
chore: desktop dir (#2924)
* chore: desktop dir

* chore: desktop src and configs

* chore: auto-fix linting and formatting issues

* fix: path

* fix: path

* fix: path

* fix: path

* fix

* fix

* fix

* test

* test

* test

* test

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: DIYgod <8266075+DIYgod@users.noreply.github.com>
2025-03-02 17:19:22 +08:00
Innei 956d9dfd1e
feat(mobile): add titles and improve navigation screen configurations
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-24 20:47:53 +08:00
Innei 5e53dd4927
feat(mobile): improve debug button with gesture handling and persistent position
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-24 19:43:09 +08:00
Innei 0d219a5a28
chore(mobile): Configure CI environment for build and asset handling
- Add CI environment variable to GitHub Actions workflow for iOS build
- Update app configuration to use CI-specific asset paths
- Modify Vite configuration for HTML renderer to support CI build output

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-19 21:37:06 +08:00
Innei 5d340ec0ca
feat(mobile/html-renderer): Add WrappedElementProvider for dynamic element tracking
- Introduce WrappedElementProvider to track element size and position
- Create ProviderComposer for composing multiple context providers
- Add hooks for accessing wrapped element details
- Update HTML component to use new provider
- Enhance image rendering with dynamic width calculation

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-19 21:23:18 +08:00
Innei 9113c0a2e5
feat(mobile): Add media preview accessories and no-media rendering support
- Enhance PreviewImage with optional Accessory component
- Update PreviewPageProvider to support rendering accessories in image preview
- Add noMedia prop to EntryContentWebView for selective media rendering
- Implement EntryGridItemAccessory to show entry details in image preview
- Update HTML renderer to support noMedia configuration

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-19 20:07:48 +08:00
DIYgod 36ea29ae7d
chore: update dependencies 2025-02-19 15:27:20 +08:00
Innei 63a1774635
refactor: reorganize html-renderer project structure and imports
This commit includes several structural changes:
- Added Vite alias for `~` to simplify imports
- Moved atoms and hooks into `src` directory
- Updated import paths across components
- Removed unused hooks and files

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-14 17:30:11 +08:00
Innei 62fea74c24
refactor: replace cn utility with clsx and update imports
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-14 17:26:42 +08:00
Innei fcdf4df5b2
chore: add eas build ci (#2741)
* eas build

Signed-off-by: Innei <tukon479@gmail.com>

* fix pnpm

Signed-off-by: Innei <tukon479@gmail.com>

* fix

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-13 21:56:24 +08:00
Innei bc252c33a0
refactor(mobile): improve AI summary component and remove unused assets
- Remove Media.xcassets and Accent color set
- Update Utils.swift to hardcode accent color
- Enhance AISummary component with error handling and retry functionality
- Adjust layout and styling for AI summary
- Update image size calculation to handle undefined dimensions

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-12 20:42:01 +08:00
Innei db5bd2641c
refactor(mobile): simplify heading component and remove unused imports
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-12 00:18:06 +08:00
Innei b7fce0e640
fix(mobile): update web-app build script and workspace configuration
- Modify pnpm workspace to point to 'web-app' directory
- Update web-app package.json build script to run build from html-renderer subdirectory

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-10 16:54:50 +08:00
Innei 160eb14258
feat(mobile): add reader inline style rendering option
- Implement dynamic inline style rendering for WebView content
- Create new atom for managing reader inline style preference
- Update EntryContentWebView to support toggling inline style rendering
- Modify HTML renderer to conditionally apply inline styles

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-10 16:39:37 +08:00
Innei 70e1de5a27
feat(mobile): add dynamic code highlighting theme support in WebView
- Implement code theme selection for light and dark modes
- Add Shiki code highlighter with dynamic theme loading
- Create atoms and hooks for managing code highlighting themes
- Enhance WebView rendering with customizable code block styling

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-10 16:28:42 +08:00
Innei ad06db9744
feat(mobile): enhance CORS handling and image loading in WebView
- Add CORS headers to CustomURLSchemeHandler for cross-origin requests
- Implement custom URL scheme protocol for image loading in MarkdownImage
- Replace HTTP/HTTPS URLs with a custom protocol to enable cross-origin image rendering

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 22:47:47 +08:00
Innei b534667c05
feat(mobile): enhance HTML renderer with image rendering and blurhash support
- Add blurhash and image scaling to MarkdownImage component
- Implement useCalculateNaturalSize hook for responsive image sizing
- Create atoms and types for entry model and media
- Update HTML renderer to support dynamic image rendering with Jotai state management
- Improve iOS image preview with save functionality and dynamic root view controller retrieval

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 19:12:47 +08:00
Innei 0011861e3f
feat(mobile): enhance iOS image preview with SDWebImage and improved QuickLook handling
- Add SDWebImage dependency to FollowNative.podspec
- Refactor ImagePreview and PreviewControllerController for robust image preview
- Implement dynamic file extension handling for image preview
- Update WebView bridge to support more flexible image preview payload
- Improve MarkdownImage component to use Uint8Array for image conversion

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 17:50:13 +08:00
Innei 975285ec30
feat(mobile): implement native image preview with QuickLook on iOS
- Add ImagePreview helper class for displaying images using QuickLook
- Extend HelperModule with previewImage function to load and display images
- Update WebView bridge to support image preview from web content
- Implement MarkdownImage component with base64 image conversion
- Add cross-platform quickLookImage method for native image preview

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 01:24:56 +08:00
Innei 64db32ef34
feat: Implement the webview sandbox using a microfront end for rn to implement the full html renderer (#2691)
* init

Signed-off-by: Innei <tukon479@gmail.com>

* feat: parser and renderer

Signed-off-by: Innei <tukon479@gmail.com>

* feat: shared webview

* feat: add UIColor hex conversion extension and accent color asset and xhr rewrite

* feat(mobile): enhance WebView and HTML rendering for iOS

- Refactor SharedWebView module with improved JavaScript injection and link handling
- Add ModalWebViewController for opening links in a modal view
- Implement dynamic content height measurement
- Update HTML renderer with Jotai state management
- Improve WebView configuration and debug mode

Signed-off-by: Innei <tukon479@gmail.com>

* lockfile

Signed-off-by: Innei <tukon479@gmail.com>

* chore: auto-fix linting and formatting issues

* fix(mobile): improve WebView debug mode and UI text styling

- Remove debug-only conditional for WebView inspector
- Add text label class to GroupedInsetListActionCell for consistent styling

Signed-off-by: Innei <tukon479@gmail.com>

* update

Signed-off-by: Innei <tukon479@gmail.com>

* feat(mobile): add FullScreenWKWebView for iOS WebView layout

- Create custom WKWebView subclass to override safe area insets
- Enables full-screen WebView rendering without default padding

Signed-off-by: Innei <tukon479@gmail.com>

* chore(mobile): remove FullScreenWKWebView Swift file

- Delete unused custom WKWebView subclass for iOS
- Cleanup unnecessary file after previous implementation

Signed-off-by: Innei <tukon479@gmail.com>

* feat(mobile): refactor iOS WebView infrastructure

Signed-off-by: Innei <tukon479@gmail.com>

* feat(mobile): add native helper module and improve entry detail screen

- Add HelperModule for iOS to open links in a modal WebView
- Implement cross-platform link opening mechanism
- Enhance entry detail screen with dynamic title and scroll behavior
- Add loading indicator for entry content
- Refactor navigation and scroll view components

Signed-off-by: Innei <tukon479@gmail.com>

* fix(mobile): improve WebView JavaScript and URL loading thread safety

- Dispatch JavaScript evaluation and URL loading on the main thread
- Ensure thread-safe WebView interactions for iOS
- Prevent potential race conditions in SharedWebViewModule

Signed-off-by: Innei <tukon479@gmail.com>

* refactor(mobile): remove useOpenLink hook and update link opening mechanism

- Replace custom useOpenLink hook with native openLink function
- Update WebView navigation and recommendation list item to use new link opening method
- Remove unnecessary hook and simplify link handling

Signed-off-by: Innei <tukon479@gmail.com>

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-07 23:15:29 +08:00