Replace hardcoded pelican with config value (#2362)

This commit is contained in:
Boy132
2026-05-28 09:18:20 +02:00
committed by GitHub
parent f676b6c794
commit 02e4527b84
6 changed files with 17 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ class Dashboard extends BaseDashboard
public function getHeading(): string
{
return trans('admin/dashboard.heading');
return trans('admin/dashboard.heading', ['app' => config('app.name')]);
}
public function getSubheading(): string

View File

@@ -38,7 +38,9 @@ class ListEggs extends ListRecords
*/
public function table(Table $table): Table
{
$defaultEggIcon = 'data:image/svg+xml;base64,' . base64_encode(file_get_contents(public_path('pelican.svg')));
$defaultEggIcon = config('app.logo');
$defaultEggIcon = empty($defaultEggIcon) || !is_file(public_path($defaultEggIcon)) ? 'pelican.svg' : $defaultEggIcon;
$defaultEggIcon = 'data:image/svg+xml;base64,' . base64_encode(file_get_contents(public_path($defaultEggIcon)));
return $table
->searchable(true)

View File

@@ -59,9 +59,15 @@ class FilamentServiceProvider extends ServiceProvider
fn () => Blade::render('@livewire(\App\Livewire\AlertBannerContainer::class)'),
);
$appName = config('app.name', 'Pelican');
if (strtolower($appName) !== 'pelican') {
$appName = "{$appName} - Powered by Pelican";
}
FilamentView::registerRenderHook(
PanelsRenderHook::FOOTER,
fn () => Blade::render('filament.layouts.footer'),
fn () => Blade::render('filament.layouts.footer', ['appName' => $appName]),
);
FilamentView::registerRenderHook(

View File

@@ -1,7 +1,7 @@
<?php
return [
'heading' => 'Welcome to Pelican!',
'heading' => 'Welcome to :app!',
'version' => 'Version: :version',
'advanced' => 'Advanced',
'server' => 'Server',
@@ -27,7 +27,7 @@ return [
'heading' => 'No Nodes Detected',
'content' => "It looks like you don't have any Nodes set up yet, but don't worry because you click the action button to create your first one!",
'extra_note' => 'If you run into any issues, please report them on GitHub.',
'button_label' => 'Create first Node in Pelican',
'button_label' => 'Create first Node',
],
'intro-support' => [
'heading' => 'Support Pelican',

View File

@@ -4,6 +4,8 @@
$userFont = (string) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleFont);
$userFontSize = (int) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleFontSize);
$userRows = (int) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleRows);
$terminalPrelude = str(config('app.name'))->slug()->lower()->toString();
@endphp
@if($userFont !== "monospace")
<link rel="preload" href="{{ asset("storage/fonts/{$userFont}.ttf") }}" as="font" crossorigin>
@@ -116,7 +118,7 @@
return true;
});
const TERMINAL_PRELUDE = '\u001b[1m\u001b[33mpelican@' + '{{ \Filament\Facades\Filament::getTenant()->name }}' + ' ~ \u001b[0m';
const TERMINAL_PRELUDE = '\u001b[1m\u001b[33m{{ $terminalPrelude }}@' + '{{ \Filament\Facades\Filament::getTenant()->name }}' + ' ~ \u001b[0m';
const handleConsoleOutput = (line, prelude = false) =>
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');

View File

@@ -2,7 +2,7 @@
{{ \Filament\Support\Facades\FilamentView::renderHook(\App\Enums\CustomRenderHooks::FooterStart->value) }}
<a class="font-semibold" href="https://pelican.dev/docs/#core-team" target="_blank">
&copy; {{ date('Y') }} Pelican
&copy; {{ date('Y') }} {{ $appName }}
</a>
@if(config('app.debug'))