Commit Graph

47 Commits

Author SHA1 Message Date
Innei a6d264de85
refactor: follow native example and int native pager view
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-31 00:49:58 +08:00
Innei 936dfa9082
fix: setting sync queue
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-29 22:00:05 +08:00
Innei 62e83822bd
chore(mobile): update iOS deployment target and podspec platform versions
- Removed the deployment target for iOS in app.config.ts.
- Updated the iOS and tvOS platform versions in FollowNative.podspec from '17.0' to '15.1'.
- Cleaned up unused spacing in ProfileView.swift.

These changes ensure compatibility with older iOS versions while maintaining code clarity.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-26 21:15:05 +08:00
Innei 1cd67cdac5
feat(mobile): enhance image sharing functionality with URL support
- Updated UIImage extension to include URL handling in the activity item source.
- Modified HelperModule to accept an optional URL parameter when sharing images.
- Adjusted ImageContextMenu to pass the image URL during sharing actions.

This improves the image sharing experience by allowing users to share images along with their associated URLs.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-26 18:29:01 +08:00
Innei 7ce1242f30
fix: image context menu actions via native code, fixed #3262
- Introduced a new UIImage extension to create a UIActivityItemSource, allowing images to be shared with titles and URLs.
- Enhanced HelperModule with new functions to save, share, copy images, and retrieve base64 from UIImageView.
- Updated MediaCarousel to use preview_image_url for video context menus.
- Refactored Image and ImageContextMenu components for improved image handling and context menu actions.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-26 16:50:21 +08:00
Innei 626e54dd84
fix(mobile): image preview can dismiss if image load error
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-25 14:48:51 +08:00
Innei 6c325d7cb8
feat: optimize user profile modal style
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-24 21:05:51 +08:00
Innei 149ca034f6
fix(mobile): profile modal header style
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-24 15:44:07 +08:00
Innei f21b9e7bf0
refactor: replace @react-navigation and expo-router (#3151)
* init

* init

* refactor(mobile): enhance tab navigation and structure

- Added `TabScreenModule` and `TabScreenView` to support dynamic tab management.
- Replaced `FOTabBarController` with a more streamlined `UITabBarController` implementation.
- Updated `TabBarModule` to utilize new tab switching logic and event handling.
- Modified `TabBarRootView` to manage tab views more effectively and handle tab index changes.
- Adjusted main application file to integrate new tab components and improve navigation flow.

These changes aim to improve the tab navigation experience and maintainability of the codebase.

* tabbar

* refactor(mobile): streamline navigation and tab management

- Refactored main application structure to enhance tab navigation, integrating `BottomTabs` and `TabRoot` components for improved tab management.
- Updated `NavigationHeader` and `SafeNavigationScrollView` to better handle header visibility and scrolling behavior.
- Introduced `ScreenItemContext` for managing screen state and scroll position across navigation.
- Cleaned up unused imports and optimized component structure for better maintainability.

These changes aim to improve the overall navigation experience and code organization within the mobile application.

* update

* feat(mobile): implement BottomTabProvider for enhanced tab management

- Introduced `BottomTabProvider` component to manage tab visibility and scroll view context.
- Refactored `BottomTabs` to utilize context for background opacity and tab visibility, simplifying the component structure.
- Removed the deprecated `TabClient` component to streamline the tab implementation.
- Added a null check in `Tabbar` to prevent rendering when there are no tab screens.

These changes aim to improve the organization and functionality of the tab navigation system within the mobile application.

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

* update

* update

* update

* update

* update

* feat(mobile): integrate ErrorBoundary and enhance navigation context

- Added `ErrorBoundary` component to handle errors gracefully within the application.
- Integrated `BottomTabProvider` to manage tab visibility and scroll view context more effectively.
- Refactored navigation components to utilize new context for improved state management.
- Updated `SafeNavigationScrollView` and `Settings` components to streamline scrolling behavior and context usage.
- Removed deprecated code and optimized component structure for better maintainability.

These changes enhance the user experience by providing error handling and improving navigation management.

* feat(mobile): enhance navigation and layout components

- Registered new screens (`TermsScreen`, `LoginScreen`, `SignUpScreen`, `ForgetPasswordScreen`, `TwoFactorAuthScreen`) with the `NavigationSitemapRegistry` for improved navigation management.
- Adjusted layout properties in `HeaderElements` and `NavigationHeader` for better alignment and responsiveness.
- Refactored `Tabbar` to remove unnecessary animated reactions, optimizing performance.
- Exported `ActionGroup` component for better reusability in `TimelineSelectorProvider`.
- Updated `DebugScreen` to utilize the new navigation methods for component presentation.

These changes improve the overall navigation experience and component structure within the mobile application.

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

* feat(mobile): implement new architecture support and refactor TabBar components

- Added support for the new architecture in the iOS podspec by conditionally defining `OTHER_SWIFT_FLAGS`.
- Refactored `TabBarPortalModule`, `TabBarRootView`, and `TabScreenView` to improve structure and maintainability.
- Replaced native view components with standard React Native views in `TabBarPortal`, `TabRoot`, and `TabScreen` for better compatibility and performance.
- Updated import paths for `TabScreenProps` to ensure correct type usage.

These changes enhance the navigation experience and prepare the codebase for future architecture improvements.

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

* feat(mobile): refactor navigation and onboarding components

- Removed outdated navigation dependencies from `package.json` to streamline the project.
- Enhanced `TabBarRootView` to improve tab switching animations and manage view transitions more effectively.
- Updated `App` component structure for better readability and integration of onboarding logic.
- Introduced `OnboardingScreen` with improved layout and navigation handling.
- Refactored navigation context types to include additional screen options for better flexibility.

These changes enhance the navigation experience and prepare the application for future onboarding features.

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

* feat(mobile): enhance intent handling with navigation integration

- Added navigation support in `useIntentHandler` to handle incoming URLs more effectively.
- Integrated `FollowScreen` for presenting user-specific content based on URL parameters.
- Updated effect dependencies to include navigation for improved functionality.

These changes improve the handling of deep links and enhance the user experience when navigating to the follow screen.

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

* chore: clean up pnpm-lock.yaml by removing unused navigation dependencies

- Removed outdated navigation packages including `@react-navigation/bottom-tabs`, `@react-navigation/drawer`, and `@react-navigation/native` to streamline the lock file.
- Cleaned up unnecessary entries and peer dependencies to improve maintainability and reduce clutter.

These changes help in optimizing the dependency management for the project.

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

* lint

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

* chore: auto-fix linting and formatting issues

* fix

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

* update

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

* refactor: update PickerIos component and remove FeedDrawer

- Added import for Portal in PickerIos component.
- Removed the FeedDrawer component entirely, cleaning up unused code.
- Replaced router.dismiss() with navigation.dismiss() in list screen options for better navigation handling.

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-19 22:35:49 +08:00
DIYgod 724ab17d1a
chore(mobile): upgrade react-native 2025-03-13 12:28:20 +08:00
Innei d9ea5754cb
feat(mobile): enhance dialog functionality and add ConfirmPasswordDialog
- Introduce ShowDialogOptions interface for customizable dialog actions
- Update Dialog component to support onClose and onConfirm overrides
- Add ConfirmPasswordDialog for password confirmation with custom actions
- Integrate ConfirmPasswordDialog into Account settings for 2FA setup
- Add new Key2CuteReIcon component for password confirmation UI
- Update package.json and other files for new icon and dialog features

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-13 00:07:45 +08:00
Innei 6438667f25
feat(mobile): enhance HelperModule and WebViewManager for improved link handling
- Update openLink function to support promises and handle dismiss events
- Refactor WebViewManager to accept an onDismiss callback for modal presentation
- Introduce SafariViewController to manage dismissal actions
- Modify native module interface to reflect changes in openLink
- Add new Setting2FA screen and update navigation routes accordingly

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-12 23:03:56 +08:00
Innei 6baf0745f0
feat(mobile): improve image carousel and avatar interactions
- Disable page control user interaction for single image
- Simplify navigation bar and background view initialization
- Add Galeria wrapper to UserAvatar for image preview
- Update UINavigationBar extension to use safe area layout guide

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-12 20:20:51 +08:00
Innei a2b13a2f09
refactor(mobile): extract image viewer actions to protocol
- Create ImageCarouselViewControllerProtocol to define image interaction methods
- Move save, copy, and share image methods from ImageViewerController to protocol implementation
- Remove setupOptionsButton method from ImageViewerController
- Add options menu directly in ImageCarouselViewController
- Enable page control user interaction
- Simplify image action handling across image viewer components

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-12 19:40:25 +08:00
Innei 9cf801634c
feat(mobile): enhance image viewer with page indicator and options menu
- Add UIPageControl to ImageCarouselViewController for image navigation
- Implement options menu with save, copy, and share actions
- Remove deprecated context menu and navigation item configurations
- Add UIImage extension for alpha manipulation
- Update GaleriaView to simplify navigation item handling

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-12 19:19:56 +08:00
Innei 06b5ead7ad
feat(mobile): add context menu for image viewer interactions
- Implement UIContextMenuInteraction for image viewer
- Add actions to save, copy, and share images
- Remove long press gesture recognizer
- Provide native iOS sharing and image management options

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-12 14:47:21 +08:00
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
Innei 085bb89b36
feat(mobile): add native iOS modules for shared functionality
- Implement native iOS modules for WebView, Toaster, Galeria, and Helper
- Add SPIndicator package for native toast notifications
- Create ImageViewer package for enhanced image preview
- Introduce utility extensions and helper methods for iOS development
- Remove SPIndicator dependency from podspec
- Update toast implementation to use native module

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-11 22:18:35 +08:00
Innei d4edfc4945
fix(mobile): image preview can not user interaction when loading or error
- Add sourceView parameter to ImageViewerController for smoother image transitions
- Implement activity indicator during image loading
- Improve initial image display with placeholder and source view image
- Refactor image loading logic to support better visual feedback

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-11 21:20:36 +08:00
Innei 6539b1b984
fix(mobile): image load should be https
- Update SDWebImageLoader to convert URLs to HTTPS
- Add error logging for image loading failures
- Simplify iOS 11+ content inset adjustment in ImageViewerController
- Change default image loader from URLSessionImageLoader to SDWebImageLoader

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-11 19:59:42 +08:00
Innei bb420bdbd9
refactor(mobile): improve Galeria view and accessory module memory management
- Remove complex deinit and notification observers in GaleriaAccessoryModule
- Add weak self references in GaleriaView callback methods to prevent retain cycles

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-11 11:49:07 +08:00
Innei b6e97fb74d
refactor(mobile): remove unused attachView function in GaleriaModule
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-11 11:14:35 +08:00
Innei 6e6b7e3936
feat(ios): Use the native image preview component (#3017)
* init

* done

* feat(mobile): integrate Galeria component for image preview and carousel

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

* revert

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

* chore: auto-fix linting and formatting issues

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-10 22:41:20 +08:00
Stephen Zhou ea53d1b9b5
fix(mobile): toast when toggling unread, fix entry context crash (#2997) 2025-03-07 12:16:49 +00:00
Innei a54a1b89dd
fix(mobile): `setURLSchemeHandler` not working
- Extract WebView configuration into a separate class
- Improve JavaScript injection mechanism
- Move injected script loading to a static method
- Enhance URL scheme handling and script management

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-05 22:31:12 +08:00
Innei c4174f909e
fix(mobile): adjust login UI and toast haptic feedback
- Update haptic feedback for different toast types in iOS
- Modify NoLoginInfo component spacing
- Restructure EmailLogin screen layout and styling

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-05 21:44:22 +08:00
Innei cead6dffd0
refactor(mobile): Simplify WebView delegate and improve state management
- Convert WebViewDelegate to an extension of FOWebView
- Remove separate delegate class
- Use direct access to state and view controller
- Simplify navigation and script message handling

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-03 19:04:21 +08:00
Innei 11b4027dfd
refactor(mobile): Improve WebView architecture and state management
Refactored the WebView implementation in the mobile app to:
- Separate concerns in WebView delegate and configuration
- Simplify WebView initialization and state management
- Improve JavaScript injection and custom URL scheme handling
- Add content height change event support

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-03 17:50:14 +08:00
Innei 7de1132f6c
refactor(mobile): replace custom web view with SFSafariViewController
This change updates the web view presentation logic to use SFSafariViewController instead of custom modal web view controllers. The modification simplifies the web view handling and provides a more standard iOS browsing experience with built-in Safari features.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-01 01:02:07 +08:00
Innei d45ba9ecfe
feat(mobile): add RNS base view controller and navigation utilities
- Create RNSViewController as a base view controller
- Update WebViewController to inherit from RNSViewController
- Add UIWindow extension to find RNS navigation controller
- Modify HelperModule to use new navigation and web view utilities
- Refactor WebViewManager to use WebViewController for modal views

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-27 21:09:14 +08:00
Innei 6c2bc6633e
feat(mobile): enhance web view navigation and header interactions
- Add ModalWebViewController and WebViewController for improved web browsing
- Implement WebViewManager method to push modal web views
- Create UINavigationHeaderActionButton for consistent header button styling
- Update header components to use new action button and back button components
- Refactor navigation header and scroll view interactions

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-27 19:44:49 +08:00
Innei 4d0a1129eb
chore: cleanup and format
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-25 22:42:37 +08:00
Innei 265f23fd76
feat(mobile): add native scroll to top functionality for iOS
- Implement `scrollToTop` function in HelperModule for iOS
- Add native module method to scroll scroll views to top
- Update hooks and components to use new native scroll to top method
- Enhance cross-platform scroll behavior for mobile app
2025-02-25 22:33:35 +08:00
Innei e75c37fa80
feat(mobile): add Apple Intelligence glow effect module for iOS
- Implement AppleIntelligenceGlowEffectModule with show/hide functionality
- Create SwiftUI-based glow effect with dynamic gradient animations
- Update expo-module.config.json to include new native module
- Add debug panel options to trigger glow effect
- Enhance DebugButton with ReAnimatedTouchableOpacity

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-24 23:51:54 +08:00
Innei ae89d8d716
refactor(mobile): simplify entry list rendering and context management
- Refactored EntryListContentGrid to use direct entry IDs instead of complex masonry item mapping
- Introduced EntryListContext to provide view type context
- Updated EntryGridItem to handle multiple media types and scrolling
- Simplified ViewPagerList to render a single view instead of multiple pages
- Removed unused pager view logic and simplified entry list rendering

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-21 21:48:02 +08:00
Innei 8dbb6343fb
feat(mobile): add native iOS toast module with SPIndicator
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-21 16:52:24 +08:00
DIYgod 2130af1079
chore: fix dependencies 2025-02-19 17:09:00 +08:00
DIYgod 36ea29ae7d
chore: update dependencies 2025-02-19 15:27:20 +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 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 17c7f9d3e9
chore(mobile): update dependencies and refactor UI components
- Upgrade react-native-uikit-colors to v0.2.0
- Enhance CustomURLSchemeHandler with improved task management
- Update RecommendationListItem and EntryListItem with context menu improvements
- Refactor entry list item styling using system colors and context menu preview
- Add context menu preview to login and entry list modules

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-08 22:24:17 +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
Innei 295b99e2ca
chore: update deps
Signed-off-by: Innei <tukon479@gmail.com>
2025-02-03 01:45:49 +08:00
Innei e1bf881e85
feat: use expo module to write native component/module (#2675)
* init

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

* test uikit

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

* uitable

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

* test webview

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

* shared webview

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

* refactor(shared-webview): Simplify WebView height management

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

* fix: add url prop

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

* rename

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

* feat: native module

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

* cleanup

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

* fix: export

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

* fix

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

* fix

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
2025-02-02 23:55:05 +08:00