nighty
nighty
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
simple problem -> many hours 😆
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
i ended up using not an ImageEntry - beacause Image Entry will not Execute Javascript - so i created a CustomEntry and inserted the image via Iframe
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
it looks in LocalStorage ... for the value light, dark or system in this case system is set to light also
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
its not 100% ... but it is working so far
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
all items, that should switch the background should have a matching class like "<rect class='backgroundColor'"....
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
this is in our SVGCreation class
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
public function renderThemeMode(){ $script = new SVGScript(" var theme = localStorage.getItem('theme'); var items = document.getElementsByClassName('backgroundColor');
console.log(theme); if(theme == 'dark'){ for(i = 0; i < items.length; i++) { items[i].style.fill = '".self::$backgroundColorDark."'; }
} else { for(i = 0; i < items.length; i++) { items[i].style.fill = '".self::$backgroundColorLight."'; } }"); $this->doc->addChild($script); }
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
incomplete Snippet - but in the SVG itself, it could be determinded at least if it´s dark or light - the problem is still, we dont know if system == light or dark
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
we use https://github.com/meyfa/php-svg for SVG Creation
15 replies
FFilament
Created by nighty on 12/10/2024 in #❓┊help
is it possible to get the current theme-mode: [light/dark] variable in a controller?
Hi Leandro, the problem is, we would like to embed it in infolist - how to decide which one to use? - i got a solution
15 replies
FFilament
Created by TK on 5/16/2024 in #❓┊help
Setting navigation group as collapsed by default
maybe one more thing to mention .... i calll the obove code in $panel->navigation(function (NavigationBuilder $builder): NavigationBuilder {}
13 replies
FFilament
Created by TK on 5/16/2024 in #❓┊help
Setting navigation group as collapsed by default
i dont understand what you have done .... could you please explain a bit more? thanks
13 replies
FFilament
Created by TK on 5/16/2024 in #❓┊help
Setting navigation group as collapsed by default
thanks for any hint guys
13 replies
FFilament
Created by TK on 5/16/2024 in #❓┊help
Setting navigation group as collapsed by default
any hint on this?
13 replies
FFilament
Created by TK on 5/16/2024 in #❓┊help
Setting navigation group as collapsed by default
foreach($arrNavGroup as $group){ $group->collapsible(true)->collapsed(true); #dd($group); //collapsible is applied $builder->group($group); } return $builder; //collapsible flag gone after return
13 replies
FFilament
Created by TK on 5/16/2024 in #❓┊help
Setting navigation group as collapsed by default
Hello, i have to ask again ... i have a similar problem and want to collapse some NavigationGroups on loading ... in my case if i add ->collapsed() nothing changed, i am also using only a AdminPanelProvider for Navigation generation. i checked the NavigationItems with dd() and they get the corret settings - for me, it seems if the are feed back into the builder instance, this setting get completely lost.
13 replies
FFilament
Created by nighty on 6/6/2024 in #❓┊help
Repeater - Array to String Conversion when save - logImplodeAssoc
i share this project with other developers.... i wasn´t aware, that it´s not from laravel... thanks for the hint
11 replies
FFilament
Created by nighty on 6/6/2024 in #❓┊help
Repeater - Array to String Conversion when save - logImplodeAssoc
when converting the array for logging ... it converts only one level - if multidimensional array comes to this function it breaks - i think it has to be fixed in filament source
11 replies
FFilament
Created by nighty on 6/6/2024 in #❓┊help
Repeater - Array to String Conversion when save - logImplodeAssoc
if i change the function this way, the error is gone: /** * Format an assoc array as a key/value string for logging * @return string */ public static function logImplodeAssoc(array $attrs): string { $l = ''; foreach( $attrs as $k => $v ) { /* changes Start */ if(is_array($v)){ continue; } /* change End */ $l .= "{ $k => $v } "; } return $l; }
11 replies
FFilament
Created by nighty on 6/6/2024 in #❓┊help
Repeater - Array to String Conversion when save - logImplodeAssoc
i figured out something..... the error occurs in observable.php
11 replies