Skip to content

Commit 06e00cf

Browse files
authored
Remove "unjustified" photo layout option from code (#3374)
1 parent fa5f8d3 commit 06e00cf

4 files changed

Lines changed: 31 additions & 3 deletions

File tree

app/Enum/PhotoLayoutType.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ enum PhotoLayoutType: string
1717
{
1818
case SQUARE = 'square';
1919
case JUSTIFIED = 'justified';
20-
case UNJUSTIFIED = 'unjustified'; // ! Legcay
2120
case MASONRY = 'masonry';
2221
case GRID = 'grid';
2322
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
/**
4+
* SPDX-License-Identifier: MIT
5+
* Copyright (c) 2017-2018 Tobias Reich
6+
* Copyright (c) 2018-2025 LycheeOrg.
7+
*/
8+
9+
use Illuminate\Database\Migrations\Migration;
10+
11+
return new class() extends Migration {
12+
public const UNJUSTIFIED = 'unjustified'; // ! Legacy
13+
public const JUSTIFIED = 'justified';
14+
15+
/**
16+
* Run the migrations.
17+
*/
18+
public function up(): void
19+
{
20+
DB::table('configs')->where('key', '=', 'layout')->where('value', '=', self::UNJUSTIFIED)->update(['value' => self::JUSTIFIED]);
21+
}
22+
23+
/**
24+
* Reverse the migrations.
25+
*/
26+
public function down(): void
27+
{
28+
// Nothing to do.
29+
}
30+
};

resources/js/layouts/PhotoLayout.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function useLayouts(
2929
case "square":
3030
return useSquare(photoListing, configRef.value.photo_layout_square_column_width, configRef.value.photo_layout_gap, timelineData);
3131
case "justified":
32-
case "unjustified":
3332
return useJustify(photoListing, configRef.value.photo_layout_justified_row_height, timelineData);
3433
case "masonry":
3534
return useMasonry(photoListing, configRef.value.photo_layout_masonry_column_width, configRef.value.photo_layout_gap);

resources/js/lychee.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ declare namespace App.Enum {
9191
| "nextcloud"
9292
| "keycloak";
9393
export type OrderSortingType = "ASC" | "DESC";
94-
export type PhotoLayoutType = "square" | "justified" | "unjustified" | "masonry" | "grid";
94+
export type PhotoLayoutType = "square" | "justified" | "masonry" | "grid";
9595
export type PhotoThumbInfoType = "title" | "description";
9696
export type SeverityType = "emergency" | "alert" | "critical" | "error" | "warning" | "notice" | "info" | "debug";
9797
export type SizeVariantType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;

0 commit comments

Comments
 (0)