mirror of
https://github.com/pelican-dev/panel.git
synced 2026-07-15 21:48:08 +03:00
Replace hardcoded pelican with config value (#2362)
This commit is contained in:
@@ -25,7 +25,7 @@ class Dashboard extends BaseDashboard
|
|||||||
|
|
||||||
public function getHeading(): string
|
public function getHeading(): string
|
||||||
{
|
{
|
||||||
return trans('admin/dashboard.heading');
|
return trans('admin/dashboard.heading', ['app' => config('app.name')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSubheading(): string
|
public function getSubheading(): string
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ class ListEggs extends ListRecords
|
|||||||
*/
|
*/
|
||||||
public function table(Table $table): Table
|
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
|
return $table
|
||||||
->searchable(true)
|
->searchable(true)
|
||||||
|
|||||||
@@ -59,9 +59,15 @@ class FilamentServiceProvider extends ServiceProvider
|
|||||||
fn () => Blade::render('@livewire(\App\Livewire\AlertBannerContainer::class)'),
|
fn () => Blade::render('@livewire(\App\Livewire\AlertBannerContainer::class)'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$appName = config('app.name', 'Pelican');
|
||||||
|
|
||||||
|
if (strtolower($appName) !== 'pelican') {
|
||||||
|
$appName = "{$appName} - Powered by Pelican";
|
||||||
|
}
|
||||||
|
|
||||||
FilamentView::registerRenderHook(
|
FilamentView::registerRenderHook(
|
||||||
PanelsRenderHook::FOOTER,
|
PanelsRenderHook::FOOTER,
|
||||||
fn () => Blade::render('filament.layouts.footer'),
|
fn () => Blade::render('filament.layouts.footer', ['appName' => $appName]),
|
||||||
);
|
);
|
||||||
|
|
||||||
FilamentView::registerRenderHook(
|
FilamentView::registerRenderHook(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'heading' => 'Welcome to Pelican!',
|
'heading' => 'Welcome to :app!',
|
||||||
'version' => 'Version: :version',
|
'version' => 'Version: :version',
|
||||||
'advanced' => 'Advanced',
|
'advanced' => 'Advanced',
|
||||||
'server' => 'Server',
|
'server' => 'Server',
|
||||||
@@ -27,7 +27,7 @@ return [
|
|||||||
'heading' => 'No Nodes Detected',
|
'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!",
|
'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.',
|
'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' => [
|
'intro-support' => [
|
||||||
'heading' => 'Support Pelican',
|
'heading' => 'Support Pelican',
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
$userFont = (string) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleFont);
|
$userFont = (string) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleFont);
|
||||||
$userFontSize = (int) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleFontSize);
|
$userFontSize = (int) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleFontSize);
|
||||||
$userRows = (int) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleRows);
|
$userRows = (int) user()?->getCustomization(\App\Enums\CustomizationKey::ConsoleRows);
|
||||||
|
|
||||||
|
$terminalPrelude = str(config('app.name'))->slug()->lower()->toString();
|
||||||
@endphp
|
@endphp
|
||||||
@if($userFont !== "monospace")
|
@if($userFont !== "monospace")
|
||||||
<link rel="preload" href="{{ asset("storage/fonts/{$userFont}.ttf") }}" as="font" crossorigin>
|
<link rel="preload" href="{{ asset("storage/fonts/{$userFont}.ttf") }}" as="font" crossorigin>
|
||||||
@@ -116,7 +118,7 @@
|
|||||||
return true;
|
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) =>
|
const handleConsoleOutput = (line, prelude = false) =>
|
||||||
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');
|
terminal.writeln((prelude ? TERMINAL_PRELUDE : '') + line.replace(/(?:\r\n|\r|\n)$/im, '') + '\u001b[0m');
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{{ \Filament\Support\Facades\FilamentView::renderHook(\App\Enums\CustomRenderHooks::FooterStart->value) }}
|
{{ \Filament\Support\Facades\FilamentView::renderHook(\App\Enums\CustomRenderHooks::FooterStart->value) }}
|
||||||
|
|
||||||
<a class="font-semibold" href="https://pelican.dev/docs/#core-team" target="_blank">
|
<a class="font-semibold" href="https://pelican.dev/docs/#core-team" target="_blank">
|
||||||
© {{ date('Y') }} Pelican
|
© {{ date('Y') }} {{ $appName }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@if(config('app.debug'))
|
@if(config('app.debug'))
|
||||||
|
|||||||
Reference in New Issue
Block a user