Skip to content

Commit b2e1c36

Browse files
authored
More work on the new front-end (#4504)
1 parent 07230f1 commit b2e1c36

177 files changed

Lines changed: 2295 additions & 1829 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Http/Controllers/Admin/SettingsController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class SettingsController extends Controller
3535
'landing_logo',
3636
'landing_header_logo',
3737
'breadcrumb_enabled',
38+
'rounded_corners_enabled',
39+
'album_border_enabled',
3840
];
3941

4042
/**

app/Http/Resources/GalleryConfigs/InitConfig.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class InitConfig extends Data
7070
public int $number_albums_per_row_mobile;
7171
public PhotoThumbInfoType $photo_thumb_info;
7272
public bool $is_photo_thumb_tags_enabled;
73+
public bool $is_rounded_corners_enabled;
74+
public bool $is_album_border_enabled;
7375

7476
// Album view mode
7577
public AlbumLayoutType $album_layout;
@@ -201,6 +203,8 @@ public function __construct()
201203
$this->number_albums_per_row_mobile = request()->configs()->getValueAsInt('number_albums_per_row_mobile');
202204
$this->photo_thumb_info = request()->configs()->getValueAsEnum('photo_thumb_info', PhotoThumbInfoType::class);
203205
$this->is_photo_thumb_tags_enabled = request()->configs()->getValueAsBool('photo_thumb_tags_enabled');
206+
$this->is_rounded_corners_enabled = request()->configs()->getValueAsBool('rounded_corners_enabled');
207+
$this->is_album_border_enabled = request()->configs()->getValueAsBool('album_border_enabled');
204208
$this->album_layout = request()->configs()->getValueAsEnum('album_layout', AlbumLayoutType::class);
205209

206210
// Download configuration

database/migrations/2026_04_09_000002_add_is_upload_validated_to_photos.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,28 @@
1010
use Illuminate\Database\Schema\Blueprint;
1111
use Illuminate\Support\Facades\Schema;
1212

13+
require_once 'TemporaryModels/OptimizeTables.php';
14+
1315
return new class() extends Migration {
16+
private OptimizeTables $optimize;
17+
18+
public function __construct()
19+
{
20+
$this->optimize = new OptimizeTables();
21+
}
22+
1423
public function up(): void
1524
{
1625
Schema::table('photos', function (Blueprint $table): void {
1726
$table->boolean('is_validated')->default(true)->after('is_highlighted');
18-
$table->index('is_validated');
27+
$table->index('is_validated', 'photos_is_validated_index');
1928
});
2029
}
2130

2231
public function down(): void
2332
{
2433
Schema::table('photos', function (Blueprint $table): void {
25-
$table->dropIndex(['is_validated']);
34+
$this->optimize->dropIndexIfExists($table, 'photos_is_validated_index');
2635
$table->dropColumn('is_validated');
2736
});
2837
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
/**
4+
* SPDX-License-Identifier: MIT
5+
* Copyright (c) 2017-2018 Tobias Reich
6+
* Copyright (c) 2018-2026 LycheeOrg.
7+
*/
8+
9+
use App\Models\Extensions\BaseConfigMigration;
10+
11+
return new class() extends BaseConfigMigration {
12+
public const CAT = 'Gallery';
13+
14+
public function getConfigs(): array
15+
{
16+
return [
17+
[
18+
'key' => 'rounded_corners_enabled',
19+
'value' => '1',
20+
'cat' => self::CAT,
21+
'type_range' => self::BOOL,
22+
'is_secret' => false,
23+
'description' => 'Round the corners of photo and album thumbnails',
24+
'details' => 'When disabled, photo and album thumbnails are displayed with square corners instead.',
25+
'level' => 0,
26+
'order' => 36,
27+
'is_expert' => false,
28+
],
29+
[
30+
'key' => 'album_border_enabled',
31+
'value' => '0',
32+
'cat' => self::CAT,
33+
'type_range' => self::BOOL,
34+
'is_secret' => false,
35+
'description' => 'Show a border around photo and album thumbnails',
36+
'details' => 'Restores the border thumbnails used to have around them.',
37+
'level' => 0,
38+
'order' => 37,
39+
'is_expert' => false,
40+
],
41+
];
42+
}
43+
};

lang/ar/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
'album_decoration' => 'عرض الزخارف على غلاف الألبوم (الألبوم الفرعي و/أو عدد الصور)',
5757
'album_decoration_direction' => 'محاذاة زخارف الألبوم أفقيًا أو عموديًا',
5858
'photo_overlay' => 'معلومات التراكب الافتراضية للصورة',
59+
'rounded_corners_enabled' => 'تدوير زوايا الصور المصغرة للصور والألبومات',
60+
'album_border_enabled' => 'إظهار حد حول الصور المصغرة للصور والألبومات',
5961
'license_default' => 'الترخيص الافتراضي المستخدم للألبومات',
6062
'license_help' => 'تحتاج مساعدة في الاختيار؟',
6163
],

lang/bg/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
'album_decoration' => 'Покажи декорации на корицата на албума (брой подалбуми и/или снимки)',
6363
'album_decoration_direction' => 'Подравни декорациите на албума хоризонтално или вертикално',
6464
'photo_overlay' => 'Информация по подразбиране за изображението',
65+
'rounded_corners_enabled' => 'Заоблете ъглите на миниатюрите на снимки и албуми',
66+
'album_border_enabled' => 'Показване на рамка около миниатюрите на снимки и албуми',
6567
'license_default' => 'Лиценз по подразбиране за албуми',
6668
'license_help' => 'Нужна помощ при избора?',
6769
],

lang/cz/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
'album_decoration' => 'Zobrazit dekorace na obálce alba (počet podalb a/nebo fotografií)',
5757
'album_decoration_direction' => 'Zarovnat dekorace alba vodorovně nebo svisle',
5858
'photo_overlay' => 'Výchozí informace o překrytí obrázků',
59+
'rounded_corners_enabled' => 'Zaoblit rohy miniatur fotografií a alb',
60+
'album_border_enabled' => 'Zobrazit okraj kolem miniatur fotografií a alb',
5961
'license_default' => 'Výchozí licence používaná pro alba',
6062
'license_help' => 'Potřebujete pomoc s výběrem?',
6163
],

lang/de/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
'album_decoration' => 'Hinweise auf dem Albumcover anzeigen (Anzahl der Unteralben und/oder Fotos)',
5656
'album_decoration_direction' => 'Album-Hinweise horizontal oder vertikal ausrichten',
5757
'photo_overlay' => 'Standard-Bildüberlagerungsinformationen',
58+
'rounded_corners_enabled' => 'Ecken der Foto- und Albumvorschaubilder abrunden',
59+
'album_border_enabled' => 'Rahmen um Foto- und Albumvorschaubilder anzeigen',
5860
'license_default' => 'Standardlizenz für Alben',
5961
'license_help' => 'Brauchen Sie Hilfe bei der Auswahl?',
6062
],

lang/el/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
'album_decoration' => 'Show decorations on album cover (sub-album and/or photo count)',
5757
'album_decoration_direction' => 'Align album decorations horizontally or vertically',
5858
'photo_overlay' => 'Default image overlay information',
59+
'rounded_corners_enabled' => 'Round the corners of photo and album thumbnails',
60+
'album_border_enabled' => 'Show a border around photo and album thumbnails',
5961
'license_default' => 'Default license used for albums',
6062
'license_help' => 'Need help choosing?',
6163
],

lang/en/settings.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
'album_decoration' => 'Show decorations on album cover (sub-album and/or photo count)',
5757
'album_decoration_direction' => 'Align album decorations horizontally or vertically',
5858
'photo_overlay' => 'Default image overlay information',
59+
'rounded_corners_enabled' => 'Round the corners of photo and album thumbnails',
60+
'album_border_enabled' => 'Show a border around photo and album thumbnails',
5961
'license_default' => 'Default license used for albums',
6062
'license_help' => 'Need help choosing?',
6163
],

0 commit comments

Comments
 (0)