Commit Graph
92 Commits
Author SHA1 Message Date
Innei 4fc8ec3f42 feat: scrollview scroll to end detection
- Refactored HelperModule to include new async functions for scrolling and image handling.
- Removed ProfileViewModule and associated UI components to streamline the codebase.
- Updated expo-module.config.json to reflect the removal of ProfileViewModule.
- Improved SafeNavigationScrollView and TimelineSelectorList to utilize new scroll handling features.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-07 19:31:56 +08:00
DIYgod f51e71bce9 fix: types 2025-04-05 21:59:32 +08:00
Innei 2a290360d1 fix(mobile): merge TabScreenProps ios and other platform
- Added optional `identifier` property to `TabScreenProps` interface for better tab management.
- Updated import statements in `TabRoot` and `TabScreen` components to reference the new types file.
- Refactored `TabScreen` component to utilize the new `identifier` property in state management.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-05 21:46:05 +08:00
Innei 30a45666b9 feat(mobile): add tab screen identifiers and improve tab management
Signed-off-by: Innei <tukon479@gmail.com>
2025-04-05 20:22:37 +08:00
Innei 171f8be655 fix(mobile): fix safe area handling in navigation and login modules
Signed-off-by: Innei <tukon479@gmail.com>
2025-04-04 16:17:40 +08:00
Innei 4a779668e7 feat: introduce PlatformActivityIndicator for consistent loading indicators across mobile components
Signed-off-by: Innei <tukon479@gmail.com>
2025-04-03 16:14:04 +08:00
Innei 91a91d89c7 feat(mobile): add OTPWindow component to navigation sitemap and enhance screen registration logic
Signed-off-by: Innei <tukon479@gmail.com>
2025-04-03 14:28:23 +08:00
Stephen Zhou 7efa6aa96a feat(mobile): translation for operation (#3396) 2025-04-03 12:25:54 +08:00
Innei 9be249dba7 feat(mobile): enhance TOTP modal handling and invitation confirmation
- Added a new function to validate authentication codes in the auth module.
- Updated the useTOTPModalWrapper to include a dismiss option for better modal management.
- Integrated the TOTP modal wrapper into the invitation confirmation dialog for improved user experience.
- Refactored the Invitations screen to utilize the updated TOTP modal handling.

These changes improve the security and usability of the invitation process by ensuring proper two-factor authentication handling.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-02 17:49:32 +08:00
Stephen Zhou 584b2b500d chore: type check 2025-04-02 09:48:01 +08:00
Stephen Zhou 20f0abe302 feat(mobile): translation for home tabs (#3386)
* feat(mobile): translation content

* Starred

* inbox feeds lists

* profile

* discovery category

* search

* dayjs

* bring localizations back

* translation for mobile content

* todo note

* add settings resource

* settings

* Extract

* Extract

* Manually type

* extend

* remove feed_view_type

* remove discover.category

* update note

* type
2025-04-02 09:44:26 +08:00
Innei e7ae1f69ad feat(mobile): introduce HeaderSubmitTextButton and refactor header components
- Added HeaderSubmitTextButton for improved button functionality in headers.
- Updated various screens to utilize HeaderSubmitTextButton instead of HeaderSubmitButton for better consistency.
- Refactored header components to include new hooks and improve layout handling.
- Enhanced styling of FakeNativeHeaderTitle for better visual hierarchy.

These changes enhance the user interface and provide a more consistent experience across the application.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-01 23:56:34 +08:00
Innei 4bbc37fdb1 feat(mobile): enhance invitations screen with loading state and error handling
- Replaced the user avatar icon in the UserAvatar component for better visual consistency.
- Added a new GroupedInsetActivityIndicatorCell to display a loading indicator while fetching invitations.
- Updated the Invitations screen to handle loading states and improved error handling with toast notifications.
- Refactored invitation data fetching to ensure proper data structure and loading management.

These changes improve user experience by providing feedback during data loading and enhancing error visibility.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-01 23:12:40 +08:00
Stephen Zhou 776c63ec5c chore: lint 2025-04-01 20:26:14 +08:00
Innei f3fee3676f fix(mobile): trigger timeline twice if scroll to change page view
- Added EventBus integration to handle timeline selection in `atoms.ts` and `PageList.tsx`.
- Updated `selectTimeline` function to dispatch events for better state management.
- Specified `react-native` as a peer dependency in `package.json` to ensure compatibility.
- Updated `pnpm-lock.yaml` to reflect the new version of `react-native`.

These changes enhance the responsiveness of the UI and improve the overall architecture of the event handling system.
2025-04-01 18:48:07 +08:00
Stephen Zhou f1e34e9f04 feat(mobile): init i18n support (#3377)
* feat(mobile): init i18n support

* get default from device setting

* ios native support

* inline

* update

* update
2025-03-31 15:16:11 +00:00
Innei 1c99cbd033 refactor: rename internal context retrieval method and remove unused popTo function
- Renamed `__internal_getCtxValue` to `__dangerous_getCtxValue` for clarity.
- Removed the unused `popTo` method from the Navigation class.
- Updated references to the renamed method in StackNavigation and WrappedScreenItem components.
- Introduced a new `handleDismiss` function in WrappedScreenItem to handle dismiss events more effectively.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-30 21:57:47 +08:00
DIYgod e4d5dbd7a7 feat: firebase analytics 2025-03-28 00:01:07 +08:00
DIYgod bf127de547 feat(mobile): use firebase analytics together with track 2025-03-27 19:52:55 +08:00
DIYgod d2af10f366 feat(mobile): set op user agent in analytics init 2025-03-27 17:46:59 +08:00
DIYgod 962c31ffed feat(mobile): user agent 2025-03-27 17:40:24 +08:00
DIYgod 7b6950185a feat(mobile): nativate to invitation screen for api invitation error 2025-03-26 21:54:54 +08:00
DIYgod 3f551c6fcf feat(mobile): invitation screen 2025-03-26 21:44:13 +08:00
Innei b5fc2f6a70 feat: add some tracker
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-25 22:26:10 +08:00
Innei 549d76285a refactor(tracker): add tracker package
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-25 21:17:12 +08:00
Innei 81fc94c946 feat(mobile): don't need to swipe from the far left to go back to the previous page
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-25 14:15:05 +08:00
Innei 9ac2e169c8 refactor(mobile): enhance stack navigation structure and add state handling
- Introduced AttachNavigationScrollViewProvider for better context management.
- Added StateHandler component to manage screen name updates based on navigation events.
- Updated imports and optimized component structure for improved readability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-24 23:47:37 +08:00
Stephen Zhou 8a5f92d0e7 refactor: translation language -> action language (#3154)
* refactor: action language -> action language

* type

* mobile

* type

* fix

* prefer local settings, drop backward compatibility

* update

* update

* update

* chore: auto-fix linting and formatting issues

* update

* update

* update

* follow ui

* update

* add description

* fix build

* update

* update

* update
2025-03-24 10:10:48 +08:00
Stephen Zhou 7123b86d04 chore: fix lint 2025-03-23 08:00:39 +08:00
Innei 79aab469c3 feat(mobile): enhance screen options and header configuration
- Added new properties to ScreenOptionsContext for customizable header areas.
- Implemented resolveScreenOptions function to manage header configurations based on context options.
- Updated WrappedScreenItem to utilize new header area components for improved layout.
- Refactored EntryNormalItem to use SquareImage for better image handling.
- Introduced loading state for images to enhance user experience.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-22 22:08:56 +08:00
Innei fca0a94e6e feat(mobile): emit screen change events on route appearance and disappearance
- Added event emissions for screen changes when a route appears or disappears, including the screen ID and route details.
- Updated the ScreenChangeEventPayload type to optionally include route information.

These changes enhance navigation tracking within the mobile application.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-21 18:36:50 +08:00
Innei a635c242b4 feat(mobile): add lazy loading support to TabScreen component
- Introduced a `lazy` prop to the `TabScreen` and `TabScreenComponent` interfaces to enable lazy loading of tab screens.
- Updated the `TabScreen` implementation to conditionally render based on the `lazy` prop, improving performance by loading screens only when necessary.
- Set the `lazy` property to `true` for the `DiscoverTabScreen` to utilize the new functionality.

These changes enhance the tab navigation experience by optimizing screen loading behavior.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-20 13:52:42 +08:00
Innei 55aad71ab2 feat(mobile): integrate RootSiblingParent and Navigation context
- Wrapped children in RootSiblingParent within the App component to manage sibling overlays.
- Renamed main application component from App4 to Entry for clarity.
- Enhanced dialog component by adding SafeAreaProvider and NavigationInstanceContext for improved layout and navigation handling.
- Cleaned up provider structure by removing unnecessary RootSiblingParent in RootProviders.

These changes aim to improve the overlay management and navigation context within the mobile application.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-20 12:19:20 +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 f2e29252f2 feat: rename (#3181)
* feat: rename

* fix

* fix

* fix
2025-03-19 21:43:55 +08:00
Stephen ZhouandWhitewater 9d4f5749da feat(mobile): show onboarding check (#3104)
* feat(mobile): show onboarding check

* fix

---------

Co-authored-by: Whitewater <me@waterwater.moe>
2025-03-14 00:27:53 +08:00
Innei 2854255050 feat(mobile): enhance 2FA settings and loading experience
- Renamed `Setting2FA` to `TwoFASettingScreen` for clarity and consistency.
- Removed the deprecated `Setting2FAScreen` component.
- Updated loading behavior to support both promise-based and immediate loading states.
- Integrated `ActivityIndicator` for iOS and retained `RotateableLoading` for other platforms.
- Improved loading overlay with a `BlurView` for better visual feedback during operations.

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-13 23:29:24 +08:00
Stephen Zhou 76ebd6969d refactor(mobile): allow do not open links in app (#3101) 2025-03-13 17:20:07 +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 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 4e2cdbee2d feat(mobile): improve dialog confirmation and remove unused spring preset
- Remove unused bouncySpringPreset from spring constants
- Add handleConfirm method in dialog to support onConfirm callback
- Update AddFeedDialog to handle empty URL input more gracefully

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-11 18:50:09 +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
DIYgod 31a0568d29 feat(mobile): limited use token 2025-03-10 16:41:45 +08:00
DIYgod 519b82c790 feat(mobile): use app check 2025-03-09 16:23:33 +08:00
DIYgod 417fb843dc feat(mobile): add deviceToken 2025-03-09 14:22:38 +08:00
Innei 268d4da58f feat(mobile): add password reset functionality to account settings
Implement password reset screen with current and new password fields
Add changePassword method to auth client
Update settings navigation to include ResetPassword route
Enhance account security section with password change option

Signed-off-by: Innei <tukon479@gmail.com>
2025-03-08 14:26:09 +08:00
Innei a69878abc7 feat(mobile): implement social account linking and unlinking
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-08 12:49:40 +08:00
Innei b72aac9e56 feat(mobile): add account linking UI with provider icons
Signed-off-by: Innei <tukon479@gmail.com>
2025-03-08 12:39:53 +08:00