Commit Graph

374 Commits

Author SHA1 Message Date
Innei
708f300433 feat: add blurhash generation and component correspondence documentation
- Introduced new markdown files explaining the generation of blurhash strings and the necessity for xComponent and yComponent to match during usage.
- Updated the blurhash generation logic to improve clarity and logging, ensuring accurate component calculations based on image dimensions.
- Removed unnecessary logging parameters and streamlined the thumbnail generation process for better performance.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 23:08:21 +08:00
Innei
02d633c3fe refactor: enhance ActionGroup component for responsive design and drawer support
- Refactored the ActionGroup component to improve responsiveness by introducing separate button components for mobile and desktop.
- Implemented a Drawer for mobile interactions, replacing DropdownMenu for a better user experience on mobile devices.
- Consolidated button styles and logic into reusable components, enhancing code maintainability and reducing duplication.
- Ensured that all action buttons (tag filter, column adjustment, sorting) now utilize the new responsive design, providing a consistent experience across devices.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 22:28:24 +08:00
Innei
2c36c52f4d feat: add Git user identity configuration for CI environments
- Implemented a check for Git user identity in the `pushManifestToRemoteRepo` function to handle cases where the identity is not configured in CI environments.
- Added logic to set a default CI user identity if none is found, ensuring smooth operation during automated deployments.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 20:43:50 +08:00
Innei
9e0f21591a chore: update configuration files and README for storage integration
- Replaced the repository configuration in `builder.config.example.json` with S3 storage settings, including bucket and endpoint details.
- Removed the social and feed sections from `config.example.json` to simplify the configuration structure.
- Updated the README to reflect changes in the author section and added optional comments for clarity.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 19:05:40 +08:00
Innei
aaa4c2b4f5 chore: update README and build workflow for manifest handling
- Removed the repository configuration section from the README to streamline documentation.
- Updated the build workflow to create a photos manifest JSON file before running the Vite build, enhancing the build process.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 18:53:49 +08:00
Innei
1337069c74 refactor: simplify precheck script and remove pull-remote functionality
- Streamlined the precheck script by removing checks for existing directories and the builder configuration.
- Eliminated the pull-remote script, consolidating its functionality directly into the precheck process.
- The updated precheck now directly runs the builder command, enhancing efficiency and reducing complexity.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 14:39:00 +08:00
Innei
1a546bd357 feat: add GIT_TOKEN and PG_CONNECTION_STRING to environment configuration
- Updated the .env.template to include GIT_TOKEN for remote repository authentication.
- Modified the Dockerfile to accept GIT_TOKEN and PG_CONNECTION_STRING as build arguments, enhancing the configuration for deployment.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 14:19:42 +08:00
Innei
a4eb754243 fix: clear long press timer in ProgressiveImage component
- Added logic to clear the long press timer when it is already set, preventing unintended video playback triggers.
- This change enhances the user experience by ensuring that the long press action behaves as expected.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 14:15:08 +08:00
Innei
4b87e19ff3 refactor: update splash screen design and animations
- Revised the splash screen's visual design, changing the theme to a more minimalist style.
- Updated font families and adjusted layout properties for improved aesthetics and consistency.
- Replaced the logo and loading animations with new designs, enhancing user experience during app startup.
- Simplified CSS animations and removed unused styles to streamline the code.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 14:09:40 +08:00
Innei
8000a085d0 feat: integrate react-error-boundary for improved error handling, fixed #27
- Added `react-error-boundary` dependency to enhance error management in the application.
- Wrapped `Blurhash` components in `ErrorBoundary` to gracefully handle rendering errors in the gallery and debug pages.
- Updated `pnpm-lock.yaml` and `package.json` to include the new dependency version.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 14:05:27 +08:00
Innei
5b512d60a7 feat: enhance Live Photo functionality and improve user experience
- Added support for long press to play Live Photos on mobile devices.
- Implemented a ref for LivePhoto component to control play and stop actions.
- Updated localization files to include new strings for Live Photo playback status.
- Enhanced CSS styles to prevent text selection and improve layout consistency.
- Refactored ExifPanel and ProgressiveImage components for better integration with Live Photo features.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 14:00:12 +08:00
Innei
6d430faa9a feat: implement remote repository support for manifest updates
- Added functionality to push updated manifests to a remote Git repository after building.
- Introduced a Git token configuration in the builder settings to authenticate pushes.
- Enhanced the CLI to handle remote repository synchronization, including cloning and pulling updates.
- Updated the builder to return detailed results on whether updates occurred during the build process.
- Revised documentation to reflect new configuration options and usage instructions.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-28 13:34:35 +08:00
Innei
6668425fba feat: add Vite plugins for enhanced functionality and localization support
- Introduced multiple Vite plugins including `ogImagePlugin`, `feedSitemapPlugin`, `localesJsonPlugin`, and `manifestInjectPlugin` to enhance the build process and support dynamic content generation.
- Implemented a custom hot module replacement (HMR) for JSON localization files to improve development experience.
- Added a new `createDependencyChunksPlugin` for better chunk management in the build process.
- Established a structure for handling localization files and generating corresponding assets, improving internationalization support.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 16:58:12 +08:00
Innei
854ee1df8d fix: update FloatingActionButton styles and remove unused animation
- Changed the icon color in the FloatingActionButton component from 'text-accent' to 'text-white' for better visibility.
- Removed the unused animation for the button's background when it is open, simplifying the component's rendering logic.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 16:07:07 +08:00
Innei
1aae171033 fix: update default fallback language to English in i18n configuration
- Changed the default fallback language from Chinese (zh-CN) to English (en) in the i18n configuration.
- This adjustment ensures a more accessible experience for English-speaking users.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 02:02:59 +08:00
Innei
31e7723bc3 feat: add success message for photo reactions in Chinese localization
- Introduced a new localization entry for successful photo reactions, enhancing user feedback in the Chinese version of the app.
- This addition improves the overall user experience by providing clear confirmation of actions taken on photos.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 02:02:26 +08:00
Innei
a550bf77ca fix: remove edge runtime export from SSR route files
- Eliminated the 'edge' runtime export from multiple SSR route files to streamline the codebase.
- This change simplifies the routing logic and prepares for future enhancements in server-side rendering.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 01:56:34 +08:00
Innei
c8fa65e9c2 feat: implement analysis API and enhance reaction handling
- Added a new analysis API endpoint to aggregate view and reaction data based on a reference key.
- Introduced DTOs for type safety in the analysis API.
- Integrated SWR for data fetching in the PhotoViewer component, improving reaction handling and user feedback.
- Replaced the previous reaction handling logic with a more efficient approach using the new analysis API.
- Updated the package.json to include the @lobehub/fluent-emoji dependency for enhanced emoji support.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 01:51:43 +08:00
Innei
5bd5947ec2 feat: update database connection logic and enhance upsert functionality
- Refactored the database connection logic to utilize `neondatabase`, ensuring correct imports and type safety.
- Implemented atomic upsert operations in the views API, allowing for efficient insertion and updating of records using PostgreSQL's `ON CONFLICT` clause.
- Added new dependencies `ast-kit` and `unplugin-ast` for improved AST manipulation in the project.
- Enhanced the UI components with toast notifications for user feedback on reactions and improved styling with Tailwind CSS.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 01:19:08 +08:00
Innei
49ac494998 feat: init api
Signed-off-by: Innei <tukon479@gmail.com>
2025-06-27 00:43:04 +08:00
Innei
91897b6032 feat: enhance SSR and web applications with manifest injection and configuration updates
- Introduced a Vite plugin to inject the photos manifest into the HTML, enabling dynamic updates and hot reloading.
- Updated ESLint configuration to ignore build errors during SSR.
- Modified package.json scripts for concurrent development of SSR and web applications.
- Adjusted paths and imports for better module resolution and consistency across the codebase.
- Added type definitions for the global __MANIFEST__ variable to ensure type safety.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 22:03:04 +08:00
Innei
19f4202656 docs: update README and README.zh.md for multi-language support and feature descriptions
- Added a link to the Chinese version of the README in the English version.
- Updated feature descriptions in both English and Chinese, changing "Smart Tags" to "File System Tags" for clarity.
- Included a new image in the Chinese README for better visual appeal.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 21:29:58 +08:00
Innei
9e0b584ca3 fix: hide EXIF grid for short photo items fixed #21
- Implemented a height check to hide the EXIF information grid when the photo item height is less than 300px.
- Ensured that other information such as title, description, and tags remain visible regardless of the photo height.
- Updated the PhotoMasonryItem component to conditionally render the EXIF grid based on the calculated height.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 21:17:53 +08:00
Innei
ebd6b391e9 refactor: update EXIF information display in PhotoMasonryItem component
- Removed opacity transition from the EXIF information grid to ensure it is always visible.
- Simplified the layout for better accessibility of EXIF data.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 21:10:15 +08:00
Innei
c8315c29b0 refactor: update WebGL image viewer and improve loading state handling
- Enhanced the ProgressiveImage component to utilize the new LoadingState enum for better loading state management.
- Updated the WebGLImageViewerEngine to notify loading states using the LoadingState enum, improving clarity in loading messages.
- Refactored spring animations to use the Transition type for better type safety.
- Updated localization files to include new loading messages for WebGL operations in both English and Chinese.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 21:08:16 +08:00
MaxtuneLee
3c45df6e13 Update README.md 2025-06-26 14:10:21 +08:00
Innei
ec0d0b577a Update README.md 2025-06-26 13:31:04 +08:00
Innei
b6c6fbeb33 refactor: simplify ManifestStats component by removing views calculation
- Removed the totalViews calculation from the ManifestStats component to streamline data handling.
- Adjusted the layout to accommodate the removal of the views stat, changing the grid columns from 5 to 4.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 00:48:56 +08:00
Innei
ae4f15e3ea refactor: update photo data handling and types
- Changed the PhotoManifest type to PhotoManifestItem across various components and services for consistency.
- Removed the views property from the PhotoInfo interface to streamline photo data.
- Updated rules in color.mdc and project.mdc to adjust glob patterns and application behavior.
- Enhanced the feed-sitemap plugin to utilize the new PhotoManifestItem type for better data management.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-26 00:48:04 +08:00
MaxtuneLee
e99f5b8ae5 Refactor/image preprocess (#25)
Switch to strategy pattern to handle image convert process.
2025-06-25 22:57:01 +08:00
MaxtuneLee
b215871056 fix: image file type detect (#24) 2025-06-25 18:49:35 +08:00
Innei
3302b2d0f6 fix: improve layout and styling in RawExifViewer component
- Adjusted the styling of the ExifDataRow component to use 'self-start' for better alignment of labels.
- Modified the container div in RawExifViewer to ensure a minimum width, enhancing layout consistency.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-25 17:48:19 +08:00
Innei
00e05dda1a refactor: improve HistogramChart rendering and interaction
- Updated the HistogramChart component to calculate drawing width based on the canvas's bounding rectangle, enhancing accuracy in rendering.
- Added anti-aliasing settings for smoother lines and improved visual quality.
- Adjusted hover interaction logic to ensure accurate positioning of the hover indicator, improving user experience.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-25 01:56:25 +08:00
Innei
2fb584e8e1 feat: add ExifTool integration and enhance EXIF data handling
- Introduced ExifTool support by adding the '@uswriting/exiftool' package to manage EXIF metadata extraction.
- Updated ExifPanel component to conditionally render raw EXIF data based on ExifTool availability.
- Enhanced localization files to include new EXIF metadata categories and descriptions for better user experience across multiple languages.
- Added a new atom to manage the loading state of ExifTool, improving state management in the application.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-25 01:45:26 +08:00
Innei
b18bb76451 chore: update favicon images and enhance favicon generation script
- Replaced existing favicon images with updated versions for better visual quality.
- Modified the favicon generation script to add rounded corners to the generated images, improving aesthetics.
- Ensured the script checks for the presence of the logo file before generating favicons.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-24 12:41:46 +08:00
Innei
8c1365f00f refactor: enhance Open Graph and Twitter meta tags in production handler
- Updated the title in the document head to include the site configuration title for better SEO.
- Modified Open Graph and Twitter meta tags to append the site configuration title to the photo ID, improving clarity and branding in social media shares.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-24 01:26:41 +08:00
Innei
d9f0918ee1 refactor: enhance ExifPanel and HistogramChart components
- Updated ExifPanel to use translation for tone analysis title.
- Improved HistogramChart by enhancing canvas resolution and rendering quality, including anti-aliasing and smoother histogram drawing.
- Added device pixel ratio handling for better display on high-DPI screens.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-24 01:16:42 +08:00
MaxtuneLee
3554f6fac6 Refactor/live photo viewer (#20)
Signed-off-by: Innei <tukon479@gmail.com>
Co-authored-by: Innei <tukon479@gmail.com>
2025-06-23 19:10:55 +08:00
Innei
0a17c01d5e refactor: streamline logging in image processing and EXIF extraction
- Removed optional logger parameters in several functions, replacing them with global loggers for consistency.
- Updated logging statements to ensure they are always executed, enhancing the visibility of processing steps and errors.
- Cleaned up unused imports and commented-out code to improve code clarity and maintainability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 12:43:15 +08:00
Innei
90e712373b refactor: remove deprecated storage functions and streamline storage management
- Deleted the builder-storage.mdc file, which contained outdated documentation for the storage abstraction layer.
- Removed deprecated functions related to S3 operations from the storage adapters, encouraging the use of the new StorageManager API.
- Updated various components to utilize the StorageManager for file retrieval and URL generation, enhancing consistency and maintainability across the codebase.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 12:04:19 +08:00
Innei
3b0c52ed82 fix: format histogram channel values to two decimal places
- Updated the HistogramChart component to display channel values (red, green, blue, and luminance) formatted to two decimal places for improved readability and precision in the user interface.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 11:50:36 +08:00
Innei
cc04d99a0e feat: add maxFileLimit configuration for S3 storage
- Introduced maxFileLimit property in builder.config.ts and S3Config interface to allow dynamic control of the maximum number of files retrieved from S3.
- Updated S3StorageProvider to utilize maxFileLimit for fetching objects, enhancing flexibility in file management.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 11:45:49 +08:00
Innei
5910ac3320 refactor: enhance S3 client configuration and error handling
- Updated the S3 client creation logic to utilize builderConfig for improved configuration management.
- Added error handling to ensure that the storage provider is set to 's3' and that required credentials are provided.
- Streamlined the S3 client configuration by directly using values from builderConfig, enhancing maintainability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 11:39:32 +08:00
Innei
eb8616bfb1 fix: update FloatingActions visibility in MasonryRoot component
- Changed the initial state of showFloatingActions from true to false to improve user experience by hiding floating actions by default.
- This adjustment aims to streamline the interface and reduce visual clutter upon initial render.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 11:33:00 +08:00
Innei
c58835e35b feat: enhance SSR routing and development experience
- Updated the SSR routing to conditionally load development and production handlers based on the NODE_ENV variable.
- Introduced a new dev.ts file to handle requests in development mode, including asset proxying and HTML response generation.
- Removed the not-found.tsx file and streamlined the photoId route logic for better maintainability.
- Added support for Open Graph and Twitter meta tags in the production handler for improved SEO.
- Updated README with new S3 endpoint configuration.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 11:31:28 +08:00
Innei
66860e3eb6 chore: update .env.template and Dockerfile for S3 configuration
- Removed unused S3 configuration variables from .env.template to streamline environment setup.
- Added ARG directives for S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY in Dockerfile to facilitate secure access to S3 resources during build.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 02:21:47 +08:00
Innei
5fa83219e6 chore: update dotenv configuration and dependencies
- Replaced 'dotenv/config' with 'dotenv-expand/config' in env.ts and cli.ts for enhanced environment variable handling.
- Added 'dotenv-expand' as a dependency in package.json and updated pnpm-lock.yaml accordingly.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 02:02:24 +08:00
Innei
8224302373 feat: enhance column width configuration in MasonryRoot component
- Introduced a new COLUMN_WIDTH_CONFIG object to manage responsive column widths for mobile and desktop views.
- Updated the column width calculation logic to dynamically adjust based on available width and maximum column constraints.
- Improved handling of auto and custom column modes to ensure optimal layout across different screen sizes.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 01:21:13 +08:00
Innei
31727e542c feat: implement FloatingActionButton component for enhanced user interactions
- Added a new FloatingActionButton component to provide quick access to various actions in the gallery.
- Integrated animation effects for button visibility and action selection.
- Updated MasonryRoot to include the FloatingActionButton, allowing for dynamic action handling based on user interactions.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-23 01:14:56 +08:00
Innei
3e30b70212 fix: streamline photo processor exports in index.ts
- Removed unnecessary type export for WorkerLoggers from the photo processor module.
- Simplified the export statement for PhotoProcessorOptions and processPhoto for better clarity and maintainability.

Signed-off-by: Innei <tukon479@gmail.com>
2025-06-22 23:50:18 +08:00