Skip to content

Add logo support in header and landing#4418

Open
ildyria wants to merge 1 commit into
masterfrom
add-logo
Open

Add logo support in header and landing#4418
ildyria wants to merge 1 commit into
masterfrom
add-logo

Conversation

@ildyria

@ildyria ildyria commented Jun 13, 2026

Copy link
Copy Markdown
Member

Fixes #544

Summary by CodeRabbit

  • New Features
    • Added configurable logo settings: Gallery header, landing page header, and landing intro section now support custom logo images that can be set via the admin settings panel, allowing administrators to personalize gallery branding and replace default text elements.

@ildyria ildyria requested a review from a team as a code owner June 13, 2026 18:47
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds three new configurable logo fields for branding: site_logo (gallery header), landing_logo (landing intro), and landing_header_logo (landing page header). Backend resources expose these configs to the frontend, a migration registers them in the database, 24 language files provide localized documentation, and Vue components conditionally render logos or fall back to text titles based on configuration availability.

Changes

Logo branding configuration and UI integration

Layer / File(s) Summary
Backend resource config declarations
app/Http/Resources/GalleryConfigs/InitConfig.php, app/Http/Resources/GalleryConfigs/LandingPageResource.php
InitConfig adds public site_logo property and constructor assignment. LandingPageResource adds public landing_logo and landing_header_logo properties with corresponding constructor assignments from request config.
Configuration migration registration
database/migrations/2026_06_13_000002_add_logo_configs.php
New migration extends BaseConfigMigration and registers three string config entries (site_logo, landing_logo, landing_header_logo) under Mod Welcome category with default empty values, UI descriptions, and sequential ordering.
Localization strings for logo settings
lang/ar/all_settings.php, lang/bg/all_settings.php, lang/cz/all_settings.php, lang/de/all_settings.php, lang/el/all_settings.php, lang/en/all_settings.php, lang/es/all_settings.php, lang/fa/all_settings.php, lang/fr/all_settings.php, lang/hu/all_settings.php, lang/it/all_settings.php, lang/ja/all_settings.php, lang/nl/all_settings.php, lang/no/all_settings.php, lang/pl/all_settings.php, lang/pt/all_settings.php, lang/ru/all_settings.php, lang/sk/all_settings.php, lang/sv/all_settings.php, lang/tr/all_settings.php, lang/vi/all_settings.php, lang/zh_CN/all_settings.php, lang/zh_TW/all_settings.php
Twenty-four language files add documentation and details descriptions for the three logo config keys, explaining where each logo replaces gallery/landing header text in the UI.
Frontend TypeScript types and state management
resources/js/lychee.d.ts, resources/js/stores/LycheeState.ts
TypeScript declarations extend InitConfig with site_logo: string and LandingPageResource with landing_logo and landing_header_logo string fields. LycheeState adds site_logo property initialization and assignment from init payload during load().
Gallery header and timeline logo rendering
resources/js/components/headers/AlbumsHeader.vue, resources/js/components/headers/TimelineHeader.vue
AlbumsHeader conditionally renders lycheeStore.site_logo as image overlay in toolbar and hero sections; otherwise shows title text. Hero height fixed to 50vh. TimelineHeader conditionally renders site logo or title text with same metrics toggle behavior.
Landing and login page logo rendering
resources/js/views/Landing.vue, resources/js/views/LoginPage.vue
Landing.vue conditionally renders initdata.landing_header_logo and initdata.landing_logo as images in header and intro sections; otherwise shows title/subtitle text. LoginPage.vue renders initdata.landing_logo when present, falls back to lycheeStore.site_logo, then text headings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Three logos hop into the scene so fine,
Gallery, landing, header—all align!
From database to Vue with fallback grace,
When logos hide, the text still holds its place.
Localized in twenty-four tongues we speak,
Branding magic, elegant and sleek! ✨

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29370b1c-c5d2-4589-9ab0-58882a054b32

📥 Commits

Reviewing files that changed from the base of the PR and between 0ef93cc and e3e117b.

📒 Files selected for processing (32)
  • app/Http/Resources/GalleryConfigs/InitConfig.php
  • app/Http/Resources/GalleryConfigs/LandingPageResource.php
  • database/migrations/2026_06_13_000002_add_logo_configs.php
  • lang/ar/all_settings.php
  • lang/bg/all_settings.php
  • lang/cz/all_settings.php
  • lang/de/all_settings.php
  • lang/el/all_settings.php
  • lang/en/all_settings.php
  • lang/es/all_settings.php
  • lang/fa/all_settings.php
  • lang/fr/all_settings.php
  • lang/hu/all_settings.php
  • lang/it/all_settings.php
  • lang/ja/all_settings.php
  • lang/nl/all_settings.php
  • lang/no/all_settings.php
  • lang/pl/all_settings.php
  • lang/pt/all_settings.php
  • lang/ru/all_settings.php
  • lang/sk/all_settings.php
  • lang/sv/all_settings.php
  • lang/tr/all_settings.php
  • lang/vi/all_settings.php
  • lang/zh_CN/all_settings.php
  • lang/zh_TW/all_settings.php
  • resources/js/components/headers/AlbumsHeader.vue
  • resources/js/components/headers/TimelineHeader.vue
  • resources/js/lychee.d.ts
  • resources/js/stores/LycheeState.ts
  • resources/js/views/Landing.vue
  • resources/js/views/LoginPage.vue

Comment thread lang/bg/all_settings.php
Comment thread lang/fr/all_settings.php
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (0ef93cc) to head (e3e117b).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add logo to welcome page / albums headers

1 participant