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: 2 additions & 0 deletions app/Http/Resources/GalleryConfigs/InitConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class InitConfig extends Data

// Site title & dropbox key if logged in as admin.
public string $title;
public string $site_logo;
public string $dropbox_api_key;

// Lychee SE is available.
Expand Down Expand Up @@ -217,6 +218,7 @@ public function __construct()
// Site title & dropbox key if logged in as admin.
// dd(request()->config());
$this->title = request()->configs()->getValueAsString('site_title');
$this->site_logo = request()->configs()->getValueAsString('site_logo');
$this->dropbox_api_key = Auth::user()?->may_administrate === true ? request()->configs()->getValueAsString('dropbox_key') : 'disabled';

$this->is_basic_auth_enabled = AuthServiceProvider::isBasicAuthEnabled();
Expand Down
4 changes: 4 additions & 0 deletions app/Http/Resources/GalleryConfigs/LandingPageResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class LandingPageResource extends Data
public string $landing_title;
public string $site_owner;
public string $site_title;
public string $landing_logo;
public string $landing_header_logo;
public FooterConfig $footer;

private const FALLBACK_IMAGE = 'dist/cat.webp';
Expand All @@ -48,6 +50,8 @@ public function __construct()
$this->landing_title = request()->configs()->getValueAsString('landing_title');
$this->site_owner = request()->configs()->getValueAsString('site_owner');
$this->site_title = request()->configs()->getValueAsString('site_title');
$this->landing_logo = request()->configs()->getValueAsString('landing_logo');
$this->landing_header_logo = request()->configs()->getValueAsString('landing_header_logo');
}

/**
Expand Down
55 changes: 55 additions & 0 deletions database/migrations/2026_06_13_000002_add_logo_configs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

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

use App\Models\Extensions\BaseConfigMigration;

return new class() extends BaseConfigMigration {
public const MOD_WELCOME = 'Mod Welcome';

public function getConfigs(): array
{
return [
[
'key' => 'site_logo',
'value' => '',
'cat' => self::MOD_WELCOME,
'type_range' => self::STRING,
'description' => 'URL of logo image in the header bar',
'details' => 'When set, replaces the website title text in the gallery header bar.',
'is_secret' => false,
'is_expert' => false,
'level' => 0,
'order' => 10,
],
[
'key' => 'landing_logo',
'value' => '',
'cat' => self::MOD_WELCOME,
'type_range' => self::STRING,
'description' => 'URL of logo image in the landing view',
'details' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'is_secret' => false,
'is_expert' => false,
'level' => 0,
'order' => 11,
],
[
'key' => 'landing_header_logo',
'value' => '',
'cat' => self::MOD_WELCOME,
'type_range' => self::STRING,
'description' => 'URL of logo image in the landing page header',
'details' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'is_secret' => false,
'is_expert' => false,
'level' => 0,
'order' => 12,
],
];
}
};
6 changes: 6 additions & 0 deletions lang/ar/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
'gallery_header' => 'URL of header image in the gallery view',
'gallery_header_bar_transparent' => 'Make the header bar transparent.',
'gallery_header_bar_gradient' => 'Add a gradient background to the header bar.',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
'import_via_url_forbidden_localhost' => 'Import via URL must not use localhost',
'import_via_url_forbidden_local_ip' => 'Import via URL must not use local IPs',
'import_via_url_require_https' => 'Import via URL must use https',
Expand Down Expand Up @@ -607,6 +610,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'If enabled, the header bar will be transparent and the header image will be visible behind it.',
'gallery_header_bar_gradient' => 'If enabled the header bar will have a gradient background aiming to improve the readability of the text, otherwise it will be transparent.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your localhost to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your internal network to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this will lower the security of the Import via URL functionality.',
Expand Down
6 changes: 6 additions & 0 deletions lang/bg/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@
'gallery_header' => 'URL на заглавното изображение в изгледа на галерията',
'gallery_header_bar_transparent' => 'Направи заглавната лента прозрачна.',
'gallery_header_bar_gradient' => 'Добавяне на градиентен фон към заглавната лента.',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
Comment thread
coderabbitai[bot] marked this conversation as resolved.
'import_via_url_forbidden_localhost' => 'Импортирането чрез URL не трябва да използва localhost',
'import_via_url_forbidden_local_ip' => 'Импортирането чрез URL не трябва да използва локални IP адреси',
'import_via_url_require_https' => 'Импортирането чрез URL трябва да използва HTTPS',
Expand Down Expand Up @@ -605,6 +608,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'Ако е активирано, лентата на заглавието ще бъде прозрачна и заглавното изображение ще се вижда зад нея.',
'gallery_header_bar_gradient' => 'Ако е активирано, лентата на заглавието ще има градиентен фон за по-добра четимост на текста, в противен случай ще бъде прозрачна.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Деактивирането на това излага вашия localhost на функционалността за импортиране чрез URL и може да доведе до Server-Side Request Forgery (SSRF).',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Деактивирането на това излага вашата вътрешна мрежа на функционалността за импортиране чрез URL и може да доведе до Server-Side Request Forgery (SSRF).',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Деактивирането на това ще намали сигурността на функционалността за импортиране чрез URL.',
Expand Down
6 changes: 6 additions & 0 deletions lang/cz/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
'gallery_header' => 'URL of header image in the gallery view',
'gallery_header_bar_transparent' => 'Make the header bar transparent.',
'gallery_header_bar_gradient' => 'Add a gradient background to the header bar.',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
'import_via_url_forbidden_localhost' => 'Import via URL must not use localhost',
'import_via_url_forbidden_local_ip' => 'Import via URL must not use local IPs',
'import_via_url_require_https' => 'Import via URL must use https',
Expand Down Expand Up @@ -607,6 +610,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'If enabled, the header bar will be transparent and the header image will be visible behind it.',
'gallery_header_bar_gradient' => 'If enabled the header bar will have a gradient background aiming to improve the readability of the text, otherwise it will be transparent.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your localhost to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your internal network to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this will lower the security of the Import via URL functionality.',
Expand Down
6 changes: 6 additions & 0 deletions lang/de/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@
'gallery_header' => 'URL des Header-Bildes in der Galerieansicht',
'gallery_header_bar_transparent' => 'Header-Leiste transparent darstellen',
'gallery_header_bar_gradient' => 'Verlaufshintergrund zur Header-Leiste hinzufügen',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
'import_via_url_forbidden_localhost' => 'Import via URL darf nicht „localhost“ verwenden',
'import_via_url_forbidden_local_ip' => 'Import via URL darf keine lokalen IP-Adressen verwenden',
'import_via_url_require_https' => 'Import via URL muss HTTPS verwenden',
Expand Down Expand Up @@ -605,6 +608,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'Wenn aktiviert, wird die Header-Leiste transparent dargestellt und das Header-Bild ist dahinter sichtbar.',
'gallery_header_bar_gradient' => 'Wenn aktiviert, erhält die Header-Leiste einen Verlaufshintergrund zur besseren Lesbarkeit des Textes; andernfalls wird sie transparent dargestellt.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Das Deaktivieren dieser Option setzt Ihren Localhost der Import-Funktion aus und kann zu Server-Side Request Forgery (SSRF) führen.',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Das Deaktivieren dieser Option setzt Ihr internes Netzwerk der Import-Funktion aus und kann zu Server-Side Request Forgery (SSRF) führen.',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Das Deaktivieren dieser Option verringert die Sicherheit der Import-via-URL-Funktion.',
Expand Down
6 changes: 6 additions & 0 deletions lang/el/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
'gallery_header' => 'URL of header image in the gallery view',
'gallery_header_bar_transparent' => 'Make the header bar transparent.',
'gallery_header_bar_gradient' => 'Add a gradient background to the header bar.',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
'import_via_url_forbidden_localhost' => 'Import via URL must not use localhost',
'import_via_url_forbidden_local_ip' => 'Import via URL must not use local IPs',
'import_via_url_require_https' => 'Import via URL must use https',
Expand Down Expand Up @@ -607,6 +610,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'If enabled, the header bar will be transparent and the header image will be visible behind it.',
'gallery_header_bar_gradient' => 'If enabled the header bar will have a gradient background aiming to improve the readability of the text, otherwise it will be transparent.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your localhost to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your internal network to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this will lower the security of the Import via URL functionality.',
Expand Down
6 changes: 6 additions & 0 deletions lang/en/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
'gallery_header' => 'URL of header image in the gallery view',
'gallery_header_bar_transparent' => 'Make the header bar transparent.',
'gallery_header_bar_gradient' => 'Add a gradient background to the header bar.',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
'import_via_url_forbidden_localhost' => 'Import via URL must not use localhost',
'import_via_url_forbidden_local_ip' => 'Import via URL must not use local IPs',
'import_via_url_require_https' => 'Import via URL must use https',
Expand Down Expand Up @@ -607,6 +610,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'If enabled, the header bar will be transparent and the header image will be visible behind it.',
'gallery_header_bar_gradient' => 'If enabled the header bar will have a gradient background aiming to improve the readability of the text, otherwise it will be transparent.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your localhost to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your internal network to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this will lower the security of the Import via URL functionality.',
Expand Down
6 changes: 6 additions & 0 deletions lang/es/all_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@
'gallery_header' => 'URL of header image in the gallery view',
'gallery_header_bar_transparent' => 'Make the header bar transparent.',
'gallery_header_bar_gradient' => 'Add a gradient background to the header bar.',
'site_logo' => 'URL of logo image in the header bar',
'landing_logo' => 'URL of logo image in the landing view',
'landing_header_logo' => 'URL of logo image in the landing page header',
'import_via_url_forbidden_localhost' => 'Import via URL must not use localhost',
'import_via_url_forbidden_local_ip' => 'Import via URL must not use local IPs',
'import_via_url_require_https' => 'Import via URL must use https',
Expand Down Expand Up @@ -605,6 +608,9 @@
'gallery_header' => '',
'gallery_header_bar_transparent' => 'If enabled, the header bar will be transparent and the header image will be visible behind it.',
'gallery_header_bar_gradient' => 'If enabled the header bar will have a gradient background aiming to improve the readability of the text, otherwise it will be transparent.',
'site_logo' => 'When set, replaces the website title text in the gallery header bar.',
'landing_logo' => 'When set, replaces the landing title and subtitle text in the landing page intro.',
'landing_header_logo' => 'When set, replaces the landing title and subtitle text in the top-left corner of the landing page.',
'import_via_url_forbidden_localhost' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your localhost to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_forbidden_local_ip' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this expose your internal network to the Import via URL functionality and lead to Server-Side Request Forgery (SSRF).',
'import_via_url_require_https' => '<span class="pi pi-exclamation-triangle text-orange-500"></span> Disabling this will lower the security of the Import via URL functionality.',
Expand Down
Loading
Loading