Skip to content

Commit

Permalink
Change favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
jayushi-canyon committed Oct 20, 2024
1 parent 32613a1 commit a6511dd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ public function register(): void
{
parent::register();

Field::configureUsing(fn ($field) => $field->translateLabel());
Entry::configureUsing(fn ($entry) => $entry->translateLabel());
Column::configureUsing(fn ($column) => $column->translateLabel());
ExportAction::configureUsing(fn (ExportAction $action) => $action->maxRows(100000));
ImportAction::configureUsing(fn (ImportAction $action) => $action->maxRows(100000));
TiptapEditor::configureUsing(fn (TiptapEditor $editor) => $editor->gridLayouts([
Field::configureUsing(fn($field) => $field->translateLabel());
Entry::configureUsing(fn($entry) => $entry->translateLabel());
Column::configureUsing(fn($column) => $column->translateLabel());
ExportAction::configureUsing(fn(ExportAction $action) => $action->maxRows(100000));
ImportAction::configureUsing(fn(ImportAction $action) => $action->maxRows(100000));
TiptapEditor::configureUsing(fn(TiptapEditor $editor) => $editor->gridLayouts([
'two-columns',
'three-columns',
'four-columns',
Expand All @@ -97,13 +97,13 @@ public function panel(Panel $panel): Panel
->viteTheme('resources/css/filament/admin/theme.css')
->favicon(function () {
if (! Tenant::checkCurrent()) {
return asset('/images/default-favicon.png');
return asset('/images/default-favicon-211024.png');
}

$themeSettings = app(ThemeSettings::class);
$favicon = $themeSettings::getSettingsPropertyModel('theme.is_favicon_active')->getFirstMedia('favicon');

return $themeSettings->is_favicon_active && $favicon ? $favicon->getTemporaryUrl(now()->addMinutes(5)) : asset('/images/default-favicon.png');
return $themeSettings->is_favicon_active && $favicon ? $favicon->getTemporaryUrl(now()->addMinutes(5)) : asset('/images/default-favicon-211024.png');
})
->readOnlyRelationManagersOnResourceViewPagesByDefault(false)
->maxContentWidth('full')
Expand Down Expand Up @@ -171,17 +171,17 @@ public function panel(Panel $panel): Panel
->userMenuItems([
MenuItem::make()
->label('Profile Settings')
->url(fn () => EditProfile::getUrl())
->url(fn() => EditProfile::getUrl())
->icon('heroicon-s-cog-6-tooth'),
])
->colors(fn (ThemeSettings $themeSettings): array => array_merge(config('default-colors'), $themeSettings->color_overrides))
->colors(fn(ThemeSettings $themeSettings): array => array_merge(config('default-colors'), $themeSettings->color_overrides))
->renderHook(
'panels::scripts.before',
fn () => view('filament.scripts.scroll-sidebar-to-active-menu-item'),
fn() => view('filament.scripts.scroll-sidebar-to-active-menu-item'),
)
->renderHook(
'panels::head.end',
fn (ThemeSettings $themeSettings) => ($themeSettings->url) ? view('filament.layout.theme', ['url' => $themeSettings->url]) : null,
fn(ThemeSettings $themeSettings) => ($themeSettings->url) ? view('filament.layout.theme', ['url' => $themeSettings->url]) : null,
)
->bootUsing(function (Panel $panel) {
if (! Tenant::current()) {
Expand Down
Binary file added public/images/default-favicon-211024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/default-favicon.png
Binary file not shown.

0 comments on commit a6511dd

Please sign in to comment.