Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature called "Flow," which provides a way to query, display, and interact with albums in a dynamic and configurable manner. The changes include the creation of new classes, enums, and resources, as well as modifications to existing models and configurations to support the Flow feature.
New Feature: Flow
Core Functionality
Added the
Flow
class inapp/Actions/Albums/Flow.php
to handle querying albums based on various configurations, such as NSFW filtering, sub-album inclusion, and ordering by publication or creation date. This class also defines the logic for building album queries.Introduced the
FlowController
inapp/Http/Controllers/Gallery/FlowController.php
to handle HTTP requests related to Flow, including initialization and paginated album results.Created the
FlowRequest
class inapp/Http/Requests/Flow/FlowRequest.php
to handle request authorization based on Flow settings and user authentication.Supporting Resources
Added
FlowItemResource
,FlowResource
, andInitResource
inapp/Http/Resources/Flow/
to structure the data returned by Flow-related endpoints, including album details, pagination, and initialization settings. [1] [2] [3]Updated
ModulesRightsResource
to include a flag indicating if the Flow module is enabled. [1] [2]Enum and Exception Additions
Introduced
FlowStrategy
andCoverFitType
enums to define Flow-specific strategies (e.g.,AUTO
,OPT_IN
) and cover image fitting options (COVER
,FIT
). [1] [2]Added
InvalidAlbumException
to handle cases where an invalid album type is provided in Flow operations.Model Updates
Album
andBaseAlbumImpl
models to include new attributes (is_recursive_nsfw
,published_at
) and support Flow-related queries. [1] [2] [3] [4]Configuration and Middleware
Extended
ConfigIntegrity
to include new Flow-specific configuration keys, such asflow_strategy
,flow_include_sub_albums
, andflow_min_max_enabled
.Updated
RouteCacheManager
to exclude Flow-related routes from caching or apply specific caching configurations.These changes collectively provide a robust framework for implementing the Flow feature, enabling dynamic and configurable album browsing and interaction.