-
-
Notifications
You must be signed in to change notification settings - Fork 15
System Color Configurations #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -36,5 +36,14 @@ | |||||
| 'link' => 'Link', | ||||||
| ], | ||||||
| ], | ||||||
| 'color' => [ | ||||||
| 'title' => 'System Colors', | ||||||
| 'description' => 'Manage your colors', | ||||||
| 'form' => [ | ||||||
| 'primary_color' => 'Primary Color', | ||||||
| 'secondary_color' => 'Second Color', | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix translation typo: "Second Color" → "Secondary Color". The label should read "Secondary Color" to match the property name and maintain consistency with "Primary Color" and "Tertiary Color". Apply this diff: - 'secondary_color' => 'Second Color',
+ 'secondary_color' => 'Secondary Color',📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| 'tertiary_color' => 'Tertiary Color', | ||||||
| ], | ||||||
| ], | ||||||
| ], | ||||||
| ]; | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,69 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| <?php | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace TomatoPHP\FilamentSettingsHub\Pages; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| use BackedEnum; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use Filament\Actions\Action; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use Filament\Facades\Filament; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use Filament\Forms\Components\ColorPicker; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use Filament\Pages\SettingsPage; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use Filament\Schemas\Components\Section; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use Filament\Schemas\Schema; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use TomatoPHP\FilamentSettingsHub\Settings\SitesSettings; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use TomatoPHP\FilamentSettingsHub\Traits\UseShield; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| class ColorSettings extends SettingsPage | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| use UseShield; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-cog'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| protected static string $settings = SitesSettings::class; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| public function getTitle(): string | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return trans('filament-settings-hub::messages.settings.color.title'); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| protected function getActions(): array | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| $tenant = Filament::getTenant(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| if ($tenant) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return [ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Action::make('back')->action(fn () => redirect()->route('filament.' . filament()->getCurrentPanel()->getId() . '.pages.settings-hub', $tenant))->color('danger')->label(trans('filament-settings-hub::messages.back')), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| return [ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Action::make('back')->action(fn () => redirect()->route('filament.' . filament()->getCurrentPanel()->getId() . '.pages.settings-hub'))->color('danger')->label(trans('filament-settings-hub::messages.back')), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| public static function shouldRegisterNavigation(): bool | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| public function form(Schema $schema): Schema | ||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| return $schema | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->schema([ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| Section::make(trans('filament-settings-hub::messages.settings.color.title')) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->description(trans('filament-settings-hub::messages.settings.color.description')) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->schema([ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ColorPicker::make('site_primary_color') | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->label(trans('filament-settings-hub::messages.settings.color.form.primary_color')) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->hint(config('filament-settings-hub.show_hint') ? 'setting("primary_color")' : null) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->required(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ColorPicker::make('site_secondary_color') | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->label(trans('filament-settings-hub::messages.settings.color.form.secondary_color')) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->hint(config('filament-settings-hub.show_hint') ? 'setting("secondary_color")' : null) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->required(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ColorPicker::make('site_tertiary_color') | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->label(trans('filament-settings-hub::messages.settings.color.form.tertiary_color')) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->hint(config('filament-settings-hub.show_hint') ? 'setting("tertiary_color")' : null) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ->required(), | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+54
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: Hint property names don't match actual setting keys. The hints display incorrect property names without the Apply this diff to fix the hints: ColorPicker::make('site_primary_color')
->label(trans('filament-settings-hub::messages.settings.color.form.primary_color'))
- ->hint(config('filament-settings-hub.show_hint') ? 'setting("primary_color")' : null)
+ ->hint(config('filament-settings-hub.show_hint') ? 'setting("site_primary_color")' : null)
->required(),
ColorPicker::make('site_secondary_color')
->label(trans('filament-settings-hub::messages.settings.color.form.secondary_color'))
- ->hint(config('filament-settings-hub.show_hint') ? 'setting("secondary_color")' : null)
+ ->hint(config('filament-settings-hub.show_hint') ? 'setting("site_secondary_color")' : null)
->required(),
ColorPicker::make('site_tertiary_color')
->label(trans('filament-settings-hub::messages.settings.color.form.tertiary_color'))
- ->hint(config('filament-settings-hub.show_hint') ? 'setting("tertiary_color")' : null)
+ ->hint(config('filament-settings-hub.show_hint') ? 'setting("site_tertiary_color")' : null)
->required(),📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||
| ]), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ])->columns(1); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove fork-specific installation instructions.
The installation instructions reference a personal fork (
gkid-693/filament-settings-hub) rather than the official repository. This should not be merged into the main branch as it will direct users to install from the wrong source.For the official release, users should install directly via Composer from Packagist:
Replace lines 21-37 with standard installation instructions:
In README.md around lines 21 to 37, the installation instructions point to a
personal fork (gkid-693) and include a custom composer.json snippet and composer
update command; remove the fork-specific "repositories" block and the dev-master
requirement and replace them with a standard Packagist installation flow: delete
the fork URL and the custom require entry and update the instructions to tell
users to install via composer require tomatophp/filament-settings-hub (and
remove the composer update --with-all-dependencies line), ensuring the README
references the official package on Packagist rather than a VCS fork.