Commit Graph

170 Commits

Author SHA1 Message Date
884e1dfc9f feat: add navigation between weather arts
- Implement previous and next weather art navigation
- Update weather arts controller to fetch adjacent weather arts
- Modify show view to include navigation links

This update enhances the user experience by allowing users to
navigate through weather arts seamlessly. The previous and
next buttons improve accessibility, providing a smoother
browsing experience. The implementation also accounts for
situations where no adjacent weather arts exist, ensuring
clarity for users.
2025-02-03 11:09:31 +08:00
5d1846e0a0 refactor: update weather art display
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Docker / docker (push) Waiting to run
- Remove unnecessary image tag
- Add city name to weather art title
- Improve image scaling effect

These changes aim to enhance the user experience by providing a clearer and more visually appealing representation of the weather art, including the location it represents.
2025-02-02 14:23:06 +08:00
130a8983a1
Update application.html.erb 2025-02-02 10:46:06 +08:00
d69a193e6d refactor: consolidate Docker build process
Some checks failed
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Docker / docker (push) Has been cancelled
- Removed unused Dockerfile.base and Dockerfile.build.
- Combined build steps into the main Dockerfile for improved clarity and maintenance.
- Updated base image references accordingly.

This change streamlines the Docker build process by reducing the number of Dockerfiles and improving the clarity of dependency management.
2025-02-02 00:44:36 +08:00
2c72e96977 feat: switch to using official ruby slim image
Update the Dockerfile to use the official ruby slim image, rather than a custom image. This reduces the Docker image size and improves build times.

- Update the base build and development images to use the official ruby slim image
- Remove redundant arguments in the build and development stages

Using the official ruby slim image simplifies the build process and reduces the image size, resulting in faster build times and a more maintainable Dockerfile.
2025-02-02 00:40:59 +08:00
378530cc1b feat: automate base image build for GitHub Actions
- Added new GitHub Actions to docker-main.yml to build and push base images
- Created a new Dockerfile.base with the base packages installation
- Modified the existing Dockerfile to use the new base image
- Created a new Dockerfile.build with the build stage to reduce the size of the final image
2025-02-02 00:38:11 +08:00
536b97a7da feat: update latest weather art display
- Change latest weather art limit from 6 to 20
- Shuffle the collection and display the last 10 items
- Update the section title to reflect the shuffling

This commit enhances the visibility of the latest weather art by
increasing the limit of displayed items. It randomizes the selection
of the latest art pieces for a more dynamic user experience, while the
UI title is updated to clarify this feature. This change improves user
engagement with the content.
2025-02-02 00:21:51 +08:00
f2951e2741 feat: optimize batch weather art generation
- Introduce BATCH_SIZE constant to limit processed cities
- Shuffle and limit eligible cities processing to enhance worker efficiency

This update improves the performance of the BatchGenerateWeatherArtsWorker
by ensuring that only a set number of cities are processed within the
allotted time, reducing the risk of timeouts and making the overall
system more responsive.
2025-02-01 15:01:36 +08:00
9417358625 refactor: adjust image loading in weather art view
- Update image link to use original blob instead of a resized variant
- Remove the resizing option for the image tag for better fidelity
- Modify CSS class for a smoother hover effect without scaling issues

This refactor improves the image loading behavior by allowing
full-resolution images to be loaded directly. The previous resizing
was limiting image quality, and this change enhances user experience
when viewing weather art.
2025-02-01 14:58:51 +08:00
dependabot[bot]
31bd6fd74e build(deps): bump solid_cable from 3.0.5 to 3.0.7
Bumps [solid_cable](https://github.com/rails/solid_cable) from 3.0.5 to 3.0.7.
- [Release notes](https://github.com/rails/solid_cable/releases)
- [Commits](https://github.com/rails/solid_cable/compare/v3.0.5...v3.0.7)

---
updated-dependencies:
- dependency-name: solid_cable
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 14:47:06 +08:00
dependabot[bot]
e36448e6d7 chore(deps): bump solid_queue from 1.1.2 to 1.1.3
Bumps [solid_queue](https://github.com/rails/solid_queue) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/rails/solid_queue/releases)
- [Commits](https://github.com/rails/solid_queue/compare/v1.1.2...v1.1.3)

---
updated-dependencies:
- dependency-name: solid_queue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 14:46:56 +08:00
dependabot[bot]
11df3a31d1 chore(deps): bump puma from 6.5.0 to 6.6.0
Bumps [puma](https://github.com/puma/puma) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v6.5.0...v6.6.0)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 14:46:42 +08:00
dependabot[bot]
2c3f8e1b8e chore(deps): bump aws-sdk-s3 from 1.177.0 to 1.179.0
Bumps [aws-sdk-s3](https://github.com/aws/aws-sdk-ruby) from 1.177.0 to 1.179.0.
- [Release notes](https://github.com/aws/aws-sdk-ruby/releases)
- [Changelog](https://github.com/aws/aws-sdk-ruby/blob/version-3/gems/aws-sdk-s3/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-ruby/commits)

---
updated-dependencies:
- dependency-name: aws-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 14:46:33 +08:00
9a745dcee0 Merge branch 'dev' 2025-02-01 14:45:27 +08:00
09b3f06ad4 style: adjust pagination button sizes
- Change button classes from `btn` to `btn btn-xs` for all pagination buttons
- Ensure consistent styling across all pagination elements

These changes standardize the button sizes in the pagination component, improving the visual uniformity. The adjustment enhances user experience by making the pagination buttons more appropriately sized within the interface, without affecting functionality.
2025-02-01 14:45:17 +08:00
05449d1e7f chore: update PhotoSwipe import paths
- Change import for PhotoSwipeLightbox to 'photoswipe/lightbox'
- Change import for PhotoSwipe to 'photoswipe'

These updates reflect the new module structure of the PhotoSwipe library, ensuring that the controller utilizes the correct paths for improved functionality and maintainability.
2025-02-01 14:31:53 +08:00
905ec35fd8 feat: add photo swipe lightbox functionality
- Integrate PhotoSwipe library for enhanced image viewing
- Create PhotoSwipeLightBoxController to manage images
- Register lightbox controller in Stimulus framework
- Update views to include lightbox functionality
- Modify styles to accommodate new design elements

This commit introduces a new way for users to view images with
PhotoSwipe, improving the interactivity of the photo gallery. It
also includes adjustments to the layout and styles for better
presentation and user experience.
2025-02-01 14:19:19 +08:00
0352923c5b feat: update weather data report format
Some checks are pending
Docker / docker (push) Waiting to run
- Include actual update time in weather report
- Rename watermark worker file for clarity

This commit enhances the weather data report by
updating the format to include the actual update time
retrieved from the weather service API. Additionally,
the watermark worker file has been renamed to improve
readability and consistency in the naming convention.
2025-01-31 10:46:32 +08:00
bbf8dfc2e6 feat: add watermarking functionality to weather art
Some checks failed
Docker / docker (push) Has been cancelled
- Include the image_processing gem to handle image manipulation
- Create a background worker for adding watermarks to weather art images
- Update WeatherArt model to attach watermark images
- Add a new watermark image asset

This commit enhances the WeatherArt feature by allowing images to
have watermarks added asynchronously, improving the visual
presentation of the art. It ensures sufficient image dimensions
before processing and includes error handling for the worker.
2025-01-29 01:53:50 +08:00
15d64b94b0 Merge branch 'dev'
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Docker / docker (push) Has been cancelled
2025-01-28 02:12:35 +08:00
62bfe8888e feat: add toggle city status action
Some checks are pending
Docker / docker (push) Waiting to run
- Implement city status toggle functionality in the Ahoy Dashboard
- Add buttons for activating and deactivating cities
- Update the UI to show the current status of cities

This commit enhances the admin dashboard by allowing
administrators to toggle the activation status of cities.
The buttons provide confirmation prompts before executing
state changes, improving user experience and preventing
accidental actions.
2025-01-28 02:12:09 +08:00
42efca67c7 Merge branch 'dev' 2025-01-28 02:01:20 +08:00
138d610c3a chore: remove unused job classes
- Delete BatchGenerateWeatherArtsJob which queued jobs for generating
  weather art for eligible cities.
- Remove CleanAhoyDataJob responsible for cleaning up old Ahoy events
  and visits.
- Eliminate GenerateWeatherArtJob that managed the generation
  and attachment of weather art images.
- Drop RefreshSitemapJob which created and uploaded XML sitemaps.

These removals suggest a shift in how these functionalities will be
handled, possibly indicating a move towards a different architecture
or integration with another service.
2025-01-28 01:50:49 +08:00
c332230709 feat: enhance city localization and timezone handling
- Update localized_name method to provide a default value for
  missing translations
- Modify timezone display in city show view to show a message
  when the timezone is undefined

These changes improve user experience by ensuring that the city
localization falls back to the city name itself if a translation
is not found, and they handle potentially missing timezone data
more gracefully.
2025-01-28 01:49:13 +08:00
f0f94de528 feat: refactor code organization and query complexity
- Simplify query for most popular inactive cities in City model
    - Minor layout changes in Admin Dashboards for Ahoy and Sidekiq tasks

    This refactoring improves code organization, reducing complexity in the City model and making it easier to read. Additionally, the Admin dashboard layouts have been simplified for a better user experience.
2025-01-28 01:44:07 +08:00
069b6d4a4f feat: add ahoy dashboard and city statistics
- Introduce a new admin dashboard for viewing Ahoy statistics.
- Display total visits, event counts, and unique visitors.
- List most popular and least popular active cities with their visit counts.
- Add a panel for recent events.
- Modify existing dashboard to include a section for inactive cities.

This commit introduces a comprehensive dashboard that helps
admin users monitor the traffic and engagement statistics of
various cities. The changes include functionality to show
active and inactive cities based on their popularity,
allowing for better insights into user engagement across
the application.
2025-01-28 01:43:59 +08:00
2a0226eb68 feat: update sidekiq tasks manager for clarity
- Rename task label from 'Batch Generate Weather Arts' to 'Generate Weather Arts' for better understanding.
- Add a new button for manual task execution of 'BatchGenerateWeatherArts'.
- Update task value in form submissions to be more descriptive, enhancing maintainability.

These changes improve the usability of the Sidekiq tasks management interface, making it more intuitive for users to identify and execute tasks. The renamed button and the clear distinction between tasks aim to reduce confusion and assist in better workflow management.
2025-01-28 01:32:56 +08:00
8cd4c50024 fix: update log level for user agent logging
- Change logging to use Rails.logger.debug instead of
  Rails.logger.debugger for better compatibility.
- Remove unnecessary extra lines in the Sidekiq jobs file.

This commit ensures that log messages are recorded efficiently and
with the correct log level, improving logging practices in the
application.
2025-01-28 01:28:07 +08:00
4020f89271 style: change logging level for user agent
- Replace logger.info with logger.debugger for user agent logging.
- Commented out redundant info logging for blocked browsers.

This change improves the logging detail level for the user agent by
utilizing the debugger log method instead of info, which provides more
context during debugging sessions.
2025-01-28 01:26:31 +08:00
29de36f5fb chore: comment out deprecated allow_browser code
- Commented out the `allow_browser` lines to prevent
  disabling access for unsupported browsers.
- This change maintains previous behavior without removing
  the code permanently, allowing for future reference.
- The previous implementation was causing issues with
  newer browser versions, prompting the need for a review
  of browser support policies.
2025-01-28 01:25:40 +08:00
2e438166ee feat: implement sidekiq task management
- Add manual task execution buttons for BatchGenerateWeatherArtsWorker, RefreshSitemapWorker, and CleanAhoyDataWorker
- Improve browser blocking functionality in ApplicationController
- Refactor Sidekiq jobs management to include statistics and task execution
- Update various jobs to conform to new standards

This feature allows for more fine-grained control over Sidekiq tasks and improves the overall user experience.
2025-01-28 01:24:49 +08:00
bf2ff282bb refactor: rename workers to jobs
- Change class names from Worker to Job for better alignment
  with Rails convention.
- Includes changes in BatchGenerateWeatherArtsJob,
  CleanAhoyDataJob, GenerateWeatherArtJob, and
  RefreshSitemapJob classes.

This refactoring improves the clarity and consistency of the
codebase by adhering to established naming conventions,
making it easier for new developers to understand the
role of these classes within the application.
2025-01-28 01:16:17 +08:00
ce5d09b621 feat: add admin management for various entities
- Add menu labels and parents for AdminUser, City, Country, Region, WeatherArt, Ahoy::Event, and Ahoy::Visit.
- Introduce a new page for managing Sidekiq jobs, providing functionality to execute or delete scheduled jobs.
- Adjust batch job for generating weather art by using Sidekiq for improved performance.
- Implement clean-up worker for old Ahoy data and functionalities for refreshing the sitemap.

These changes enhance the administration interface by providing better organization and management tools for backend entities. The addition of Sidekiq jobs management further improves system maintenance capabilities.
2025-01-28 01:15:29 +08:00
c68fecf3fa
Update application_controller.rb 2025-01-27 09:50:39 +08:00
16ee512b0c
Update application_controller.rb 2025-01-27 09:42:08 +08:00
111fd85ebb
Update application_controller.rb 2025-01-27 09:30:01 +08:00
59a3f792c6
Update application_controller.rb 2025-01-27 09:20:14 +08:00
9e666310cf
Update application_controller.rb 2025-01-27 09:14:19 +08:00
cc74145033
Update application_controller.rb 2025-01-27 09:00:54 +08:00
3e713a9b26
Update application_controller.rb 2025-01-27 08:43:50 +08:00
263c85486c
Update application_controller.rb 2025-01-27 08:23:44 +08:00
a895216bda
Update application_controller.rb
Some checks are pending
Docker / docker (push) Waiting to run
2025-01-27 07:49:08 +08:00
75cdd69b9b
Update application_controller.rb 2025-01-27 07:40:13 +08:00
70f977cae1 更新 application.html.erb 2025-01-27 07:01:20 +08:00
444c3e67bc 更新 application.html.erb 2025-01-27 07:01:20 +08:00
ffbd201d62 更新 application_controller.rb 2025-01-27 07:01:20 +08:00
eb06398308 更新 application.html.erb
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
Docker / docker (push) Waiting to run
2025-01-27 07:00:18 +08:00
93543c6db3 更新 application.html.erb 2025-01-27 07:00:18 +08:00
5bfa94bc82
更新 application.html.erb 2025-01-27 06:54:24 +08:00
a16b14c7ca
更新 application_controller.rb 2025-01-27 06:53:01 +08:00