From d9b313a977a8ff094d496f9624733d7f2fcc6f10 Mon Sep 17 00:00:00 2001 From: SirajunNasihin Date: Thu, 19 Sep 2024 18:06:52 +0800 Subject: [PATCH] get navigation icon from config --- src/Resources/EmailTemplateResource.php | 9 ++++++--- src/Resources/EmailTemplateThemeResource.php | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Resources/EmailTemplateResource.php b/src/Resources/EmailTemplateResource.php index 0020efe..71c2cd1 100644 --- a/src/Resources/EmailTemplateResource.php +++ b/src/Resources/EmailTemplateResource.php @@ -34,7 +34,10 @@ class EmailTemplateResource extends Resource { protected static ?string $model = EmailTemplate::class; - protected static ?string $navigationIcon = 'heroicon-o-envelope'; + public static function getNavigationIcon(): ?string + { + return config('filament-email-templates.navigation.templates.icon'); + } public static function getNavigationGroup(): ?string { @@ -48,12 +51,12 @@ public static function getNavigationSort(): ?int public static function getModelLabel(): string { - return __('vb-email-templates::email-templates.resource_name.singular'); + return config('filament-email-templates.navigation.themes.label'); } public static function getPluralModelLabel(): string { - return __('vb-email-templates::email-templates.resource_name.plural'); + return config('filament-email-templates.navigation.themes.label'); } public static function getCluster(): string diff --git a/src/Resources/EmailTemplateThemeResource.php b/src/Resources/EmailTemplateThemeResource.php index 68848f2..e311042 100644 --- a/src/Resources/EmailTemplateThemeResource.php +++ b/src/Resources/EmailTemplateThemeResource.php @@ -19,7 +19,10 @@ class EmailTemplateThemeResource extends Resource { protected static ?string $model = EmailTemplateTheme::class; - protected static ?string $navigationIcon = 'heroicon-o-paint-brush'; + public static function getNavigationIcon(): ?string + { + return config('filament-email-templates.navigation.themes.icon'); + } public static function getNavigationGroup(): ?string { @@ -33,12 +36,12 @@ public static function getNavigationSort(): ?int public static function getModelLabel(): string { - return __('vb-email-templates::email-templates.theme_resource_name.singular'); + return config('filament-email-templates.navigation.themes.label'); } public static function getPluralModelLabel(): string { - return __('vb-email-templates::email-templates.theme_resource_name.plural'); + return config('filament-email-templates.navigation.themes.label'); } public static function getCluster(): string