Commit Graph

89 Commits

Author SHA1 Message Date
Innei bbf7acfd3d
fix: firefix icon, fix #2370
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-30 13:18:35 +08:00
Stephen Zhou 4b6a0fca2e
feat: mobile app architecture and initial screens (#2144)
* feat: initialize mobile app with Expo setup and configuration

* chore: update deps

* feat: update layout and integrate WebView for follow

* chore: update lock

* chore: lint

* chore: lock file

* feat: login with deeplink

* feat: auth

* feat: add Expo development script and refactor mobile app configuration

- Added a new development script for Expo in package.json.
- Refactored the app.config.ts to configure expo-router with a specified root.
- Removed unused files: _layout.tsx, auth.tsx, and index.tsx from the mobile app directory, streamlining the codebase.

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

* feat: update dependencies and enhance mobile app configuration

- Added new dependencies: nativewind, swiftui-react-native, and tailwindcss to improve styling capabilities.
- Updated react-native-reanimated version to 3.16.5 for better performance.
- Refactored tailwind configuration to use baseTwConfig for consistency across applications.
- Enhanced mobile layout with color scheme toggle functionality and improved button styling.
- Included type definitions for nativewind in shim-env.d.ts.

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

* refactor: streamline color configuration and enhance authentication UI

- Updated tailwind configuration to simplify color definitions, removing unnecessary color mappings and using CSS variables for palette colors.
- Refactored authentication screen to utilize new color scheme and improved styling for better user experience.
- Introduced a function to retrieve current colors based on the system theme, enhancing dynamic styling capabilities.

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

* feat: add tab

- Refactored app.config.ts to use resolved paths for icon assets, improving path management.
- Enhanced RootLayout component by adding additional Stack.Screen elements for better navigation structure.
- Removed unused authentication and index screens to streamline the codebase and improve maintainability.

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

* feat: add new icons and update mobile app configuration

- Introduced multiple new icon components for enhanced UI representation in the mobile app.
- Updated package.json and pnpm-lock.yaml to include new dependencies and ensure proper package management.
- Refactored mobile screens (_layout.tsx, home.tsx, auth.tsx) for improved structure and navigation.

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

* chore: init debug screen

- Added a new Link component in RootLayout for debugging purposes, improving navigation capabilities.
- Adjusted the position of the existing button in RootLayout to enhance UI layout.
- Refactored HeadlessLayout to ensure proper closing of Stack component.
- Updated home screen to include Link and removed unused components for cleaner code.

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

* feat: app route layer

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

* feat: enhance mobile app layout and navigation

- Updated RootLayout to include a new Stack.Screen for "Add Subscription" with customized header styles.
- Refactored TabLayout to improve tab bar styling and adjusted icon sizes for better visual consistency.
- Replaced List component with ScrollView in FeedList, adding header actions for editing and navigation to the add screen.
- Introduced accentColor in the theme for consistent color usage across components.

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

* fix: navigation theme

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

* refactor: update layout components and streamline navigation

- Removed unused headerTintColor from AppRootLayout for cleaner code.
- Simplified TabLayout by removing unnecessary screenOptions, enhancing readability.
- Updated RootLayout to import navigation themes from local theme file, improving theme management.

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

* feat: update dependencies and refactor mobile app components

- Added new dependencies: @follow/constants, jotai, and zustand to enhance state management and component functionality.
- Updated package.json and pnpm-lock.yaml to reflect new dependencies and their versions.
- Removed the Logo component to streamline the codebase.
- Refactored FeedList and TabLayout components to improve layout and navigation, including the addition of themed blur views for better UI consistency.

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

* feat: integrate React Native Bottom Tabs

* refactor: use native bottom tab

* chore: jsx preserve for ts config

* Revert "refactor: use native bottom tab"

This reverts commit e9370470c9116bb7e0bf6675f1ddeba286189237.

* feat: enhance tab bar icons in TabLayout

- Updated TabLayout to use different icons based on tab focus state, improving user experience.
- Introduced SafariCuteFi and Setting7CuteFi icons for the "Discover" and "Settings" tabs, respectively.
- Adjusted icon sizes for better visual consistency across the tab bar.

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

* feat: add withFollowAssets plugin for managing asset resources

* feat: add FollowWebView component

* chore: set base path to current directory in vite config

* refactor: rename withFollowAssets.js to with-follow-assets.js and add error handling for missing assets directory

* feat: debug for webview

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

* chore(lint): correct tailwind config for mobile

* fix: share cookie with webview

* fix: redirect to home for webview

* fix: bring cookie inject back

* feat: init db

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

* fix: inject js

* fix: add shared env

* feat: useAuthCookie

* fix: save token

* chore: update icon

* chore: add note

* feat: init auth client

* feat: simple auth flow

* refactor: use cookie-es

* chore: remove unstable_enablePackageExports

* chore: remove auth page

* chore: update dependencies and refactor storage management

- Added '@follow/shared' package to pnpm-lock and package.json.
- Updated 'hono' and 'ofetch' dependencies in package.json.
- Removed 'react-native-mmkv' and its related storage implementation.
- Refactored layout to use 'RootProviders' for better context management.
- Updated API fetch headers to include application name.
- Changed '@electron/node-gyp' resolution method to use git URL.

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

* chore: update dependencies and add subscriptions schema

- Added 'immer' dependency to package.json and pnpm-lock.yaml.
- Updated '@electron/node-gyp' resolution method to use tarball URL.
- Introduced 'subscriptionsTable' schema in the database for managing user subscriptions.

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

* chore: remove unused config

* chore: remove unused code

* chore: signout for debug

* refactor: use kv as auth storage

* chore: remove expo-secure-store, see https://github.com/better-auth/better-auth/issues/928

* fix: logout from native

* feat: react-hook-form

* feat: simple ui

* chore: auto-fix linting and formatting issues

* feat: sn pro font

* chore: auto-fix linting and formatting issues

* feat: enhance database schema and API error handling; improve feed list functionality

* feat: update ThemedBlurView and enhance feed list with new subscription handling

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

* chore: remove login url env

* feat: implement navigation handling in FollowWebView

* feat: make social login work

* chore: update

* feat: update environment variables, add dayjs dependency, enhance database schema integration, and improve subscription handling with transaction support

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

* feat: enhance tab layout and feed list with improved ThemedBlurView integration and dynamic tab height adjustment

- Updated tab bar background and style in TabLayout for better visual consistency.
- Integrated useBottomTabBarHeight in FeedList to dynamically adjust layout based on tab height.
- Enhanced SubscriptionList header background with ThemedBlurView for improved aesthetics.
- Added styles for tab container to maintain consistent appearance across screens.

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

* refactor: move video URL handling to utils

* feat: integrate utility functions for URL handling in FollowWebView

* chore: update lock

* fix: workaround potential null value in remoteSettings.updated

* feat: enhance FeedList layout with dynamic header and tab height adjustments

- Integrated useHeaderHeight to dynamically adjust the ScrollView's content inset based on the header height.
- Updated scrollIndicatorInsets to improve scrolling experience by accounting for safe area insets.
- Ensured consistent layout adjustments for better visual alignment with the tab bar.

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

* chore: update dependencies and configure babel-plugin-module-resolver

- Added babel-plugin-module-resolver version 5.0.2 to package.json for improved module resolution.
- Configured babel.config.js to use module-resolver with custom alias for es-toolkit.
- Updated pnpm-lock.yaml to reflect new dependencies and their resolutions.
- Refactored import statement in utils.ts to use the updated es-toolkit import path.

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

* feat: enhance database integration and add SQL support

- Added support for SQL file imports in the mobile app by configuring babel-plugin-inline-import and updating metro.config.js to recognize .sql file extensions.
- Introduced new database migrations for improved data management, including the addition of a new migration file.
- Updated the drizzle migration logic to include the new migration.
- Enhanced the database initialization process to support the new subscription service.
- Refactored the hydrate function to streamline database hydration and improve performance.

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

* feat: enhance database functionality

- Added expo-clipboard and expo-file-system dependencies to the mobile app for improved file handling and clipboard functionality.
- Implemented a new function to retrieve the SQLite database path using expo-file-system.
- Enhanced the DebugPanel to include options for clearing SQLite data and copying the database file location to the clipboard.
- Updated pnpm-lock.yaml and package.json to reflect the new dependencies and their versions.

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

* feat: implement session token management and enhance DebugPanel

- Removed unused session token handling from apiFetch.
- Updated cookie management functions to include synchronous storage with kv for session tokens.
- Added functionality to get and set session tokens in the DebugPanel, allowing users to view and save session tokens.
- Improved user interface in DebugPanel for better session token management.

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

* fix: handle keyboard

* feat: enhance layout and subscription service functionality

- Added BugCuteReIcon to the RootLayout for improved user interface.
- Updated the upsertMany method in SubscriptionService to handle conflicts during database insertions, ensuring data integrity by using SQL's onConflictDoUpdate.

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

* refactor: update FeedList component with improved pressable interactions and remove unused code

- Deleted unused .gitkeep file in mobile modules directory.
- Enhanced SubscriptionItem to use Pressable for better user interaction feedback.
- Removed redundant text displays for subscription IDs and current view in SubscriptionList.
- Added state management for press interactions to visually indicate button presses.

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

* chore: reduce bundle size

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

* fix: cookie

* fix: cookie name

* fix: update iOS URI for FollowWebView

* chore: eas link

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

* chore: update @better-auth/expo

* chore: format

* chore: fix can not click debug button

* chore: add expo-drizzle-studio-plugin

* chore: turn off typechecked rules in eslint

* chore: pan debug button

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

* fix: dark mode in rn webview

* chore: update

* fix: detect safari in webview

* fix: try fix db init

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

* refactor: adjust layout and improve tab view in FeedList component

- Reduced bottom view tab height from 45 to 35.
- Updated ScrollView content insets for better layout.
- Replaced static tab view with a horizontally scrollable tab view.
- Enhanced tab item styling for better visual feedback on selection.

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

* refactor: simplify FeedList component by removing unused code and optimizing imports

- Removed unused imports and components to streamline the FeedList.
- Consolidated the tab view logic and improved the overall structure.
- Enhanced readability by eliminating redundant code and simplifying the component's layout.

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

* refactor: enhance subscription sorting in useSubscriptionByView hook

- Updated useSubscriptionByView to accept a sorting parameter, defaulting to "alphabet".
- Implemented sorting logic for subscription IDs based on alphabetical order.
- Introduced a new helper function, sortByAlphabet, to compare subscriptions by title.
- Improved the overall functionality of the subscription list in the FeedList component.

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

* refactor: data schemas and improve feed and subscription handling

- Renamed FeedModel to FeedSchema and SubscriptionModel to SubscriptionSchema for consistency.
- Introduced new InboxSchema and ListSchema to enhance data structure.
- Updated FeedService and SubscriptionService to utilize the new schemas.
- Refactored the FeedList component to support grouped and ungrouped subscriptions.
- Removed unused Morph class and related types to clean up the codebase.
- Enhanced sorting logic for subscriptions in the useSubscriptionByView hook.

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

* chore: auto-fix linting and formatting issues

* fix: enhance FeedIcon styling for dark mode compatibility

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

* chore: auto-fix linting and formatting issues

* feat: enhance FeedList component with animated accordion for grouped subscriptions

- Introduced animated accordion functionality in the CategoryGrouped component to improve user experience when viewing grouped subscriptions.
- Replaced static toggle with AnimatedTouchableOpacity for better visual feedback.
- Updated the layout and styling of the CategoryGrouped component for improved aesthetics.
- Adjusted ScrollView in FeedList to include right scroll indicator insets for better layout.

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

* chore: auto-fix linting and formatting issues

* refactor: update database schema and migration files

- Removed obsolete SQL migration files for `bitter_bloodstrike` and `ancient_dexter_bennett`.
- Updated migration scripts to reflect new table structures and relationships.
- Enhanced `migrations.js` to import new migration files.
- Adjusted `_journal.json` and snapshot files to align with the new schema.
- Added error handling and logging in migration processes.
- Improved database initialization with logging capabilities.
- Refactored subscription handling in the store to accommodate new schema changes.

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

* chore: auto-fix linting and formatting issues

* feat: enhance FeedList component with ItemPressable for improved interaction

- Replaced static Pressable components with ItemPressable in CategoryGrouped and SubscriptionItem for better touch handling.
- Updated the layout of CategoryGrouped to include a pressable area for category navigation.
- Added a new utility function, composeEventHandlers, to facilitate event handling in the utils package.

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

* chore: auto-fix linting and formatting issues

* refactor: restructure FeedIcon and enhance list handling in FeedList component

- Removed the FeedIcon component to streamline icon handling.
- Updated FeedList component to include a new ListList section for displaying lists.
- Introduced ListSubscriptionItem for rendering individual list items with fallback support for missing images.
- Enhanced state management in the list store to utilize a record structure for lists and list IDs.
- Improved subscription handling by adding list subscriptions to the subscription store.

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

* chore: auto-fix linting and formatting issues

* feat: enhance FeedList and ViewTab components with new features and styling improvements

- Added a new StarItem component to the FeedList for collections navigation.
- Updated ListList and SubscriptionItem components for improved layout and spacing.
- Enhanced ViewTab with increased horizontal padding and a bottom border for better visual separation.
- Adjusted icon sizes in ViewTab for consistency.

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

* chore: auto-fix linting and formatting issues

* feat: apple sign in, not work yet

* chore: bring type check lint back

* feat: enhance mobile app components and linting configuration

- Added a new ESLint rule for preventing leaked conditional rendering in React.
- Updated the initialization process in main.ts to ensure proper loading of the expo-router.
- Enhanced the FeedList component by integrating the HeaderBlur for improved header styling and added routing functionality in SubscriptionItem for better navigation.
- Modified the Add screen to include a Stack.Screen for improved navigation handling.

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

* chore: enable no-inline-styles

* chore: update

* chore: auto-fix linting and formatting issues

* feat: enhance feed-list functionality with new components and dependencies

- Added react-native-pager-view for improved navigation between feed views.
- Introduced ViewPageCurrentViewContext for managing the current view state in the feed list.
- Updated SubscriptionList to utilize PagerView for dynamic content rendering.
- Enhanced ListList to use the new context for better state management.
- Refactored imports for consistency and clarity.

This update improves the user experience by allowing seamless transitions between different feed types.

* feat: improve ViewTab component with animated tab indicator and dynamic scrolling

- Added animated indicator for the currently selected tab, enhancing visual feedback.
- Implemented dynamic scrolling to the selected tab using ScrollView reference.
- Introduced state management for tab widths and positions to support the animation.
- Updated tab rendering to capture layout dimensions for improved responsiveness.

This update enhances the user experience by providing a smoother and more interactive tab navigation.

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

* fix: lockfile

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

* refactor: video URL transformation

* fix: web dev

* chore: add URL linking functionality to Add screen

* chore: expo update config

* feat: enhance feed-list and configuration with new features and optimizations

- Updated app configuration to support dark mode for splash screen background.
- Refactored feed-list components to utilize Jotai for state management, improving performance and readability.
- Introduced new hooks for managing current view state, enhancing the user experience.
- Implemented animated tab indicators and dynamic scrolling in ViewTab for better navigation feedback.
- Cleaned up imports and improved overall code structure for maintainability.

These changes collectively enhance the functionality and user experience of the feed-list feature in the mobile app.

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

* chore: auto-fix linting and formatting issues

* feat: integrate gesture handling and state management for feed view

- Added Jotai state management for current feed view, allowing dynamic updates.
- Implemented double-tap gesture to switch to the Articles view, enhancing user interaction.
- Wrapped the main provider in GestureHandlerRootView to support gesture handling.
- Updated tab layout to utilize gesture detection for improved navigation experience.

These changes collectively enhance the functionality and interactivity of the feed-list feature in the mobile app.

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

* chore: update prepare script

* chore: prepare for rn web build

* feat: add inbox management and improve list handling in feed view

- Introduced InboxList and InboxItem components to display inboxes within the Articles view.
- Enhanced state management by implementing useInboxSubscription for fetching inbox data.
- Updated ListService and SubscriptionService to use upsertManyInSession for improved session handling.
- Refactored inbox store to utilize createZustandStore for better state management.
- Added inboxIdByView to SubscriptionState for managing inbox subscriptions by view type.

These changes collectively enhance the feed-list feature by integrating inbox management, improving data handling, and optimizing state management in the mobile app.

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

* chore: auto-fix linting and formatting issues

* feat: enhance mobile app with new context menu and unread management

- Added `react-native-context-menu-view` version 1.16.0 to support context menus in the mobile app.
- Implemented new `unread` table schema to track unread counts for subscriptions.
- Updated `FeedList` and `ViewTab` components to display unread counts dynamically.
- Refactored inbox management to improve session handling with `upsertManyInSession`.
- Enhanced state management by integrating unread counts into subscription hooks.

These changes collectively improve user experience by providing context menus and better unread message tracking in the mobile application.

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

* feat: integrate context menu and enhance unread management in feed list

- Added ContextMenu component to ViewTab for marking all items as read.
- Updated FeedList and ViewTab components to utilize context menus for improved user interaction.
- Enhanced unread management by implementing markViewAsRead functionality in UnreadSyncService.
- Refactored subscription getters and hooks to streamline data retrieval by view type.

These changes collectively improve user experience by providing context menus for actions and better management of unread items in the mobile application.

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

* feat: enhance feed list with swipeable actions and performance improvements

- Integrated swipeable functionality in SubscriptionItem for better user interaction, allowing users to unsubscribe or read items directly.
- Refactored styles for accordion icons to improve layout consistency.
- Optimized animated styles in ViewTab for smoother transitions and reduced performance issues.
- Consolidated spring configuration for animation to enhance maintainability.

These changes collectively improve the user experience by providing intuitive swipe actions and enhancing the performance of the feed list in the mobile application.

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

* refactor: proxy creation to use evalCode for improved reusability

* refactor: update Add screen to use router for navigation and handle deep linking

* feat: implement deep linking support and refactor navigation handling in FollowWebView

* fix: use hash router for rn web

* chore: fill submit info

* chore: autoIncrement version

* fix: remove unnecessary width class to prevent unexpected scrolling

* feat: improve login page ui

* fix: disable state

* refactor: enhance ViewTab layout and header background in FeedList

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

* feat: integrate react-native-reanimated and enhance feed list functionality

- Added react-native-reanimated plugin to Babel configuration for improved animation support.
- Updated metro configuration to wrap with reanimated settings.
- Refactored AccordionItem to use withTiming for smoother animations.
- Introduced JotaiPersistSyncStorage for persistent state management in feed list atoms.
- Enhanced SubscriptionList to utilize FlashList for better performance and rendering.
- Implemented sorting functionality in feed list with atom hooks for sort method and order.
- Improved ViewTab component to handle tab scrolling more effectively.

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

* feat: enhance feed list and debug panel functionality

- Added color scheme support in InboxItem for dynamic icon coloring based on theme.
- Updated FlashList padding to improve layout consistency.
- Introduced a new "Reload App" button in the DebugPanel for easier app reloading.

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

* feat: sort

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

* feat: enhance ItemPressable and refactor feed list interaction

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

* fix: padding safe for webview

* chore: update FollowWebView background style

* fix: enable hoverOnlyWhenSupported for rn web build

* feat: subscription management ctx menu

- Added '@follow/hooks' and 'usehooks-ts' as workspace dependencies in pnpm-lock.yaml and package.json.
- Refactored AccordionItem to use withSpring for improved animation performance.
- Introduced SubscriptionItemContextMenu for better context menu handling in feed list.
- Updated subscription model to handle 'isPrivate' as a boolean.
- Enhanced subscription store with new utility functions for managing subscription IDs and added patch functionality.
- Improved reset functionality in subscription store to clear state by view.

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

* refactor: update API URL handling and enhance subscription management

- Replaced direct usage of process.env.EXPO_PUBLIC_API_URL with a new getApiUrl() function across multiple files for improved maintainability.
- Updated SubscriptionItemContextMenu to SubscriptionFeedItemContextMenu for better clarity in context menu handling.
- Implemented a delete method in SubscriptionService to handle subscription removals and associated cleanup for feeds, lists, and inboxes.
- Enhanced the unsubscribe functionality in SubscriptionSyncService to ensure proper state management during subscription deletions.

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

* feat: user management features and list and category ctx menu

- Added a new migration script (m0004) for "majestic_thunderbolt_ross" to the SQLite migrations.
- Updated the journal JSON to include the new migration entry.
- Introduced a new users table schema to manage user data, including fields for id, email, handle, name, image, and isMe.
- Refactored context menu actions in feeds to improve clarity and functionality.
- Removed deprecated feed list components and consolidated related logic for better maintainability.
- Updated RootProviders to ensure proper context management across the application.

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

* feat: enhance Add screen and layout for better user experience

- Updated the AppRootLayout to include modal presentation for the "Add Subscription" screen.
- Refactored the Add screen to improve navigation and user interaction, including a new header with close and search icons.
- Introduced a state for managing the feed URL input, enhancing the user interface with appropriate styles and functionality.
- Added new color handling in the theme to support disabled states and improve accessibility.

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

* style: update input field styling in Add screen for improved dark mode support

- Modified the className of the URL input field in the Add screen to enhance its appearance in dark mode, ensuring better visibility and user experience.

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

* feat: update mobile app configuration and enhance subscription list interaction

- Added application category type to the iOS infoPlist for better app classification.
- Increased hitSlop on the AnimatedTouchableOpacity in the subscription list for improved touch responsiveness.
- Un-commented the DebugButton in the layout to ensure it is always visible for debugging purposes.

These changes aim to enhance the user experience and improve app visibility in app stores.

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

---------

Signed-off-by: Innei <tukon479@gmail.com>
Signed-off-by: Innei <i@innei.in>
Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com>
Co-authored-by: Innei <tukon479@gmail.com>
Co-authored-by: Innei <i@innei.in>
Co-authored-by: hyoban <hyoban@users.noreply.github.com>
Co-authored-by: Innei <Innei@users.noreply.github.com>
2024-12-26 00:06:03 +08:00
DIYgod fedf2af984
fix: login page redirection 2024-12-24 13:39:46 +08:00
Innei d9a26387c5
feat(auth): add credential provider icon and update email translation in login flow
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-23 21:11:24 +08:00
Stephen Zhou 3f91883f5e
fix: secure session token 2024-12-19 15:08:26 +08:00
Innei 0e86a24b58
Merge remote-tracking branch 'origin/main' into dev
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-17 14:43:55 +08:00
Whitewater faebe6c819
fix: update linkedom to version 0.18.6 (#2185) 2024-12-17 09:54:51 +08:00
Innei de8d337671
fix(auth): handle optional icon class names for providers in login components
- Updated the LoginModalContent and Login components to safely access provider icon class names using optional chaining.
- Excluded the "credential" provider from the list of displayed auth providers to streamline the login options.

Signed-off-by: Innei <tukon479@gmail.com>
2024-12-17 01:04:12 +08:00
Innei e0661ff2b9
perf(external): hydrate auth providers
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-17 01:03:14 +08:00
Stephen Zhou ae0dc2c30d
feat: register or login with email and password (#2075)
* feat: login with password

* chore: auto-fix linting and formatting issues

* feat: show email

* refactor: login form

* chore: update

* fix: show login error

* chore: update

* credential provider

* feat: confirm password

* chore: update

* revokeOtherSessions when update password

* changelog

* typecheck

* chore: update

* chore: update hono

* feat: forget password

* chore: update

* feat: reset password page

* feat: register form

* chore: update

* chore: update

* chore: update

* chore: update

* fix: email login handler

* fix: navigate to login after register

* chore: remove forget password button for now

* chore: update

* feat: forget password page

* chore: update hono

* fix: forget-password link

* feat: login email text

* refactor: enhance login and forget password functionality

- Updated the forget password page to include a back navigation button using MotionButtonBase.
- Refactored the login component to utilize the new Login module, simplifying the structure.
- Adjusted translations for consistency in the login text across English and German locales.
- Improved the useAuthProviders hook to return a more structured AuthProvider interface.

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

* feat: add form validation and UI enhancements for login-related pages

- Introduced form validation state management in forget-password, register, and reset-password components.
- Updated button states to be disabled when forms are invalid, improving user experience.
- Enhanced UI elements with consistent styling and layout adjustments, including the addition of MotionButtonBase for navigation.
- Improved accessibility and responsiveness of card components.

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

* feat: enhance login component with dynamic provider buttons

- Added MotionButtonBase for improved button animations and interactions.
- Refactored the rendering logic to conditionally display login options based on the presence of credential providers.
- Introduced a new icon mapping for providers to enhance visual representation.
- Improved layout and styling for better user experience during login.

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

* feat: add GitHub provider icon and adjust button margin in login component

- Introduced a GitHub icon to the provider icon map for enhanced visual representation.
- Adjusted the margin of the submit button to improve layout consistency.

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

* chore: update

---------

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: hyoban <hyoban@users.noreply.github.com>
Co-authored-by: DIYgod <i@diygod.me>
Co-authored-by: Innei <tukon479@gmail.com>
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-17 01:02:17 +08:00
Eric Zhu 0dcfde5ea4
fix: update zh-CN translations and remove unused setting (#2132)
* chore(translations): update zh-CN locale files for accuracy

* chore: auto-fix linting and formatting issues

* update

* update

* chore: auto-fix linting and formatting issues

* update

* update

---------

Co-authored-by: ericyzhu <ericyzhu@users.noreply.github.com>
2024-12-17 00:51:34 +08:00
Innei 8ad40c004e
feat(settings): clean web app service worker cache
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-16 20:15:13 +08:00
Innei efcbecbd94
perf(external): hydrate auth providers
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-16 19:53:12 +08:00
Stephen Zhou 7a6edb4575
feat: register or login with email and password (#2075)
* feat: login with password

* chore: auto-fix linting and formatting issues

* feat: show email

* refactor: login form

* chore: update

* fix: show login error

* chore: update

* credential provider

* feat: confirm password

* chore: update

* revokeOtherSessions when update password

* changelog

* typecheck

* chore: update

* chore: update hono

* feat: forget password

* chore: update

* feat: reset password page

* feat: register form

* chore: update

* chore: update

* chore: update

* chore: update

* fix: email login handler

* fix: navigate to login after register

* chore: remove forget password button for now

* chore: update

* feat: forget password page

* chore: update hono

* fix: forget-password link

* feat: login email text

* refactor: enhance login and forget password functionality

- Updated the forget password page to include a back navigation button using MotionButtonBase.
- Refactored the login component to utilize the new Login module, simplifying the structure.
- Adjusted translations for consistency in the login text across English and German locales.
- Improved the useAuthProviders hook to return a more structured AuthProvider interface.

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

* feat: add form validation and UI enhancements for login-related pages

- Introduced form validation state management in forget-password, register, and reset-password components.
- Updated button states to be disabled when forms are invalid, improving user experience.
- Enhanced UI elements with consistent styling and layout adjustments, including the addition of MotionButtonBase for navigation.
- Improved accessibility and responsiveness of card components.

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

* feat: enhance login component with dynamic provider buttons

- Added MotionButtonBase for improved button animations and interactions.
- Refactored the rendering logic to conditionally display login options based on the presence of credential providers.
- Introduced a new icon mapping for providers to enhance visual representation.
- Improved layout and styling for better user experience during login.

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

* feat: add GitHub provider icon and adjust button margin in login component

- Introduced a GitHub icon to the provider icon map for enhanced visual representation.
- Adjusted the margin of the submit button to improve layout consistency.

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

* chore: update

---------

Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: hyoban <hyoban@users.noreply.github.com>
Co-authored-by: DIYgod <i@diygod.me>
Co-authored-by: Innei <tukon479@gmail.com>
2024-12-16 19:13:46 +08:00
Stephen Zhou dbcd56f468
chore: eslint to check package & only run type-aware rules in CI 2024-12-13 10:51:33 +08:00
DIYgod ae390f7afa
feat: list preview 2024-12-11 00:08:48 +08:00
DIYgod 03858b18b8
feat: add list madeby 2024-12-10 12:43:55 +08:00
DIYgod 4a4ecee7f1
feat: move replaceImgUrlIfNeed 2024-12-10 12:36:24 +08:00
DIYgod 8e248ad733
feat: feed description in list page 2024-12-10 12:24:27 +08:00
Innei d5bf07fd75
chore: update deps 2024-12-09 17:37:01 +08:00
Innei 32d19c8ad7
chore: fix claimed feed type typo
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-05 17:16:29 +08:00
Stephen Zhou 5412e8e68f
chore: remove catalog 2024-12-03 20:45:47 +08:00
Stephen Zhou 37164a3674
Revert "build: use pnpm catalogs"
This reverts commit 4477f83a29.
2024-12-03 20:32:19 +08:00
Stephen Zhou 4477f83a29
build: use pnpm catalogs 2024-12-03 20:22:02 +08:00
Innei 7ad1e305c3
fix: window titlebar maximize state sync, fixed #1982 (#1989)
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-03 15:39:16 +08:00
DIYgod 9102203956
feat: migrate to better auth (#1951)
* feat: add better-auth

* feat: remove hono/auth-js

* fix: authention check

* fix: signout refetch

* feat: init server auth plugins

* feat: remove types/authjs

* feat: server auth create session plugin

* feat: web login returning

* fix: types

* fix: test env
2024-12-03 12:59:41 +08:00
Innei 22e2c0d649
chore: update deps
Signed-off-by: Innei <tukon479@gmail.com>
2024-12-02 14:59:16 +08:00
DIYgod ff6b0f780d
fix: server styles 2024-11-28 00:36:19 +08:00
DIYgod 51d671983b
chore: trigger ci 2024-11-28 00:36:19 +08:00
DIYgod b031ce57b8
feat: dynamic auth providers 2024-11-28 00:36:19 +08:00
Innei c404e50ecf
refactor: remove external and proxy server pages
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-27 17:01:41 +08:00
Innei 936166c0bc
chore: update vite 6
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-27 13:49:13 +08:00
Innei 6595f8502f
refactor: lazy create atom selector and shallow eq
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-27 13:36:35 +08:00
Innei f21f3ee33b
fix(ssr-server): try to hydrate date charset
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-26 22:47:28 +08:00
Innei 185bbe1dd9
fix(ssr-server): fix hydrate data
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-26 22:36:20 +08:00
Innei 1c5cd04846
fix(ssr-server): minify code result should await
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-26 22:15:41 +08:00
Innei a9569cc2ec
fix(external): continue in browser should reload page
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-26 22:01:54 +08:00
Innei ca4751acd2
feat(infra): electron app can hot update renderer layer (#1209)
* ci

Signed-off-by: Innei <i@innei.in>

* feat: hotupdate renderer impl

* fix: skip dev

Signed-off-by: Innei <i@innei.in>

* update logci

Signed-off-by: Innei <i@innei.in>

* update logci

Signed-off-by: Innei <i@innei.in>

* feat: tracker

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

* log

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

* fix: hash

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

* fix: build

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

* fix: deps

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

* Update nightly.yml

* update

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

* update

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

* update

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

* update minimunm

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

* calc main hash

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

* add main Hash logic

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

* remove

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

* fix

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

* log

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

* update

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

* update

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

* test

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

* update

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

* update

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

* fix: update

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

* debug

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

* update

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

* fix

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

* update

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

* fix: only one

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

* try fix cookie

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

* update

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

* fix cookie

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

* fix: domain

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

* fix

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

* fix: remove test code

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

* fix

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

---------

Signed-off-by: Innei <i@innei.in>
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-25 21:49:20 +08:00
Innei f418efcd9c
chore: upgrade to router v7
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-24 17:27:29 +08:00
Innei 78c7107d2d
chore: update deps
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-24 17:24:10 +08:00
Innei edd4f9e5a6
feat: mobile design (#1568)
* init

Signed-off-by: Innei <i@innei.in>

* feat: feed column

Signed-off-by: Innei <i@innei.in>

* feat: float bar

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

* feat: profile button

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

* chore: comment

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

* feat: layout

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

* feat: split mobile entry content

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

* feat: add history stack

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

* feat: return back

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

* fix: return back position

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

* feat: entry list header

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

* feat: sync selector

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

* feat: modal stack mobile

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

* fix: modal selector

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

* cleanup

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

* fix: sheet and optimize entry readers

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

* fix: scroller

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

* feat: entry contents

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

* feat: entry content

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

* update

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

* feat: user profile sheet

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

* fix: entry content header

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

* fix: entry header

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

* chore: auto-fix linting and formatting issues

* fix: return back

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

* feat: image view

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

* feat: audio

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

* feat: inline player

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

* feat: pull to refresh

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

* cleanup

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

* update

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

* chore: auto-fix linting and formatting issues

* chore: fix import, remove no support display

* chore: auto-fix linting and formatting issues

* feat: achievement modal in mobile

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

* fix: subview mobile

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

* feat: power

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

* feat: wallet mobile design

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

* feat: pwa support (#1575)

Co-authored-by: hyoban <hyoban@users.noreply.github.com>

* chore: auto-fix linting and formatting issues

* fix import

* discover

* fix: border color

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

* fix: modal async

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

* feat: mobile setting

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

* fix: entry header width

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

* fix: remove unused hide filter

* feat: settings

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

* feat: setting done

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

* action card

* fix discover feed form

* popular filter

* inbox table

* fix: picture masonry pull to refresh

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

* fix: scroll element

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

* fix: radio in mobile

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

* feat: to scientific notation

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

* fix: login

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

* ResponsiveSelect for action card

* chore: remove theme color

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

* type check

* type check

* fix: setting import circular

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

* refactor: remove hijack pushState

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

* fix: float bar

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

* fix: scroll end trigger

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

* fix: dark theme color

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

* fix: overscroll-behavior only in destop

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

* fix: ux

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

* fix: color

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

* fix: list scroll area

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

* update

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

* merge

* update

* update favicon link

* fix: reload prompt on mobile

* test

Signed-off-by: Innei <i@innei.in>

* test

Signed-off-by: Innei <i@innei.in>

* fix: ios

Signed-off-by: Innei <i@innei.in>

* try patch precaching

* try

* try

* build

* try

* try

* feat: ctx menu on safari

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

* try

* clear timeout

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

* try

* fix

* deny og

* fix patch

* pre cache exclude

* feat: add all

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

* i18n

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

* feat: slide

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

* feat: ico

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

* fix: build

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

* test network first

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

* test

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

* fix: icon padding

* test

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

* use react-ios-pwa-prompt

* fix: icon path

* update

* fix: prompt

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

* feat: redesign toc

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

* ctx

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

* ready to prod

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

* feat: startup screen

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

* feat: floatbar

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

* fix: switch view

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

* fix: keep scroll map

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

* enable hoverOnlyWhenSupported

* fix: count

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

* fix: hoverOnlyWhenSupported only in web

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

* fix

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

* chore: auto-fix linting and formatting issues

---------

Signed-off-by: Innei <i@innei.in>
Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Innei <Innei@users.noreply.github.com>
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com>
Co-authored-by: hyoban <hyoban@users.noreply.github.com>
Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com>
Co-authored-by: lawvs <lawvs@users.noreply.github.com>
2024-11-22 19:32:39 +08:00
Stephen Zhou 7b61df0c52
refactor: replace `lodash-es` with `es-toolkit` (#1650) 2024-11-18 20:59:56 +08:00
Innei 3b9b61dd29
chore: replace html-minifier
Signed-off-by: Innei <i@innei.in>
2024-11-11 00:53:03 +08:00
Innei a4796ce4c9
feat: add old browser check
Signed-off-by: Innei <i@innei.in>
2024-11-11 00:35:20 +08:00
Innei 072dec02b7
fix: follow external server fetch ua
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-10 00:11:53 +08:00
DIYgod 2fa16b75d3
feat: merge redirect page into login page 2024-11-09 20:00:21 +08:00
Innei 6fc9d09c58
fix: reduce timeline refresh, fixed #1474
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-07 22:10:44 +08:00
Innei d0d4f05647
fix: `defineSettingPageData` remove func wrapper
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-07 16:00:13 +08:00
Kevin Deng 三咲智子 05da9ca7d3
feat: replace twMacro with unplugin-ast (#1462)
* feat: replace twMacro with unplugin-ast

* fix
2024-11-07 15:53:24 +08:00
Innei e0d3e17da4
feat: entry image gallery modal
Signed-off-by: Innei <tukon479@gmail.com>
2024-11-06 22:05:47 +08:00