Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Resources/GalleryConfigs/RootConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct()
{
$is_logged_in = Auth::check();

$timeline_albums_enabled = request()->configs()->getValueAsBool('timeline_albums_enabled');
$timeline_albums_enabled = request()->configs()->getValueAsBool('timeline_albums_root_enabled');
$timeline_albums_public = request()->configs()->getValueAsBool('timeline_albums_public');
$this->is_album_timeline_enabled = $timeline_albums_enabled && ($is_logged_in || $timeline_albums_public);
$this->timeline_album_granularity = request()->configs()->getValueAsEnum('timeline_albums_granularity', TimelineAlbumGranularity::class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

/**
* SPDX-License-Identifier: MIT
* Copyright (c) 2017-2018 Tobias Reich
* Copyright (c) 2018-2026 LycheeOrg.
*/

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class() extends Migration {
public const CAT = 'Mod Timeline';
public const BOOL = '0|1';

public function up(): void
{
$val = DB::table('configs')->where('key', 'timeline_albums_enabled')->value('value');
$normalized_val = in_array($val, ['0', '1'], true) ? $val : '0';
DB::table('configs')->insert([
'key' => 'timeline_albums_root_enabled',
'value' => $normalized_val,
'cat' => self::CAT,
'type_range' => self::BOOL,
'description' => 'Enable timeline for albums at root',
'details' => '',
'is_secret' => false,
'is_expert' => false,
'level' => 0,
'order' => 11,
]);
DB::table('configs')->where('key', 'timeline_albums_enabled')->update(['details' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.']);
}

public function down(): void
{
DB::table('configs')->where('key', 'timeline_albums_root_enabled')->delete();
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.']);
}
};
2 changes: 1 addition & 1 deletion lang/ar/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/cz/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/el/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/en/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/es/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/fa/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/hu/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/it/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/ja/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/nl/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/no/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/pl/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/pt/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/ru/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/sk/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/sv/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/tr/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/vi/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/zh_CN/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
2 changes: 1 addition & 1 deletion lang/zh_TW/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
'timeline_photos_order' => 'This determines whether the captured date or the upload date will be used to order the photos.',
'timeline_photos_layout' => '',
'timeline_photos_pagination_limit' => '',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums (and root). This can also be disabled/enabled per album.',
'timeline_albums_enabled' => 'Globally enable albums timelines in each albums. This can also be disabled/enabled per album.',
'timeline_albums_public' => '',
'timeline_albums_granularity' => '',
'timeline_left_border_enabled' => '',
Expand Down
Loading