diff --git a/app/Http/Resources/Models/SmartAlbumResource.php b/app/Http/Resources/Models/SmartAlbumResource.php index 2496738434c..bf3e3e9c2f6 100644 --- a/app/Http/Resources/Models/SmartAlbumResource.php +++ b/app/Http/Resources/Models/SmartAlbumResource.php @@ -44,7 +44,7 @@ public function __construct(BaseSmartAlbum $smartAlbum) $this->prepPhotosCollection(); // setup timeline data - $photo_granularity = Configs::getValueAsEnum('timeline_photo_granularity', TimelinePhotoGranularity::class); + $photo_granularity = Configs::getValueAsEnum('timeline_photos_granularity', TimelinePhotoGranularity::class); $this->photos = TimelineData::setTimeLineDataForPhotos($this->photos, $photo_granularity); } diff --git a/app/Http/Resources/Traits/HasTimelineData.php b/app/Http/Resources/Traits/HasTimelineData.php index 2d8177105b7..474c263f000 100644 --- a/app/Http/Resources/Traits/HasTimelineData.php +++ b/app/Http/Resources/Traits/HasTimelineData.php @@ -21,12 +21,12 @@ private function getAlbumTimeline(?TimelineAlbumGranularity $candidate): Timelin private function getPhotoTimeline(?TimelinePhotoGranularity $candidate): TimelinePhotoGranularity { - $default_timeline_photo_granularity = Configs::getValueAsEnum('timeline_photos_granularity', TimelinePhotoGranularity::class); + $default_timeline_photos_granularity = Configs::getValueAsEnum('timeline_photos_granularity', TimelinePhotoGranularity::class); if ($candidate === TimelinePhotoGranularity::DEFAULT || $candidate === TimelinePhotoGranularity::DISABLED) { - return $default_timeline_photo_granularity; + return $default_timeline_photos_granularity; } - return $candidate ?? $default_timeline_photo_granularity; + return $candidate ?? $default_timeline_photos_granularity; } } \ No newline at end of file diff --git a/database/migrations/2024_11_26_125145_improve_info_timeline.php b/database/migrations/2024_11_26_125145_improve_info_timeline.php new file mode 100644 index 00000000000..0847ce751e8 --- /dev/null +++ b/database/migrations/2024_11_26_125145_improve_info_timeline.php @@ -0,0 +1,25 @@ +where('key', '=', 'timeline_photos_layout')->update(['details' => "Not available yet."]); + DB::table('configs')->where('key', '=', 'timeline_photos_pagination_limit')->update(['details' => "Not available yet."]); + DB::table('configs')->where('key', '=', 'timeline_photos_enabled')->update(['details' => 'Globally enable photo timelines in each albums. This can also be disabled/enabled per album.']); + DB::table('configs')->where('key', '=', 'timeline_albums_enabled')->update(['details' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.']); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + DB::table('configs')->whereIn('key', ['timeline_photos_layout', 'timeline_photos_pagination_limit', 'timeline_photos_enabled', 'timeline_albums_enabled'])->update(['details' => '']); + } +}; diff --git a/resources/js/components/forms/settings/SelectOptionsField.vue b/resources/js/components/forms/settings/SelectOptionsField.vue index 7f3c210d376..a8caf4218e5 100644 --- a/resources/js/components/forms/settings/SelectOptionsField.vue +++ b/resources/js/components/forms/settings/SelectOptionsField.vue @@ -22,6 +22,7 @@ +