showmore peut être configuré pour afficher
This commit is contained in:
parent
d65d5fa0b7
commit
bb4f202adc
@ -49,6 +49,13 @@ class showmorePlugin extends BasePlugin {
|
||||
|
||||
protected ?string $onShow;
|
||||
|
||||
protected bool $initialShow = false;
|
||||
|
||||
function show(bool $show=true): self {
|
||||
$this->initialShow = $show;
|
||||
return $this;
|
||||
}
|
||||
|
||||
function startc(): array {
|
||||
return v::sdiv(["class" => $this->containerClass]);
|
||||
}
|
||||
@ -56,7 +63,10 @@ class showmorePlugin extends BasePlugin {
|
||||
function invite($vs=null): array {
|
||||
$vs ??= $this->inviteContent;
|
||||
return v::a([
|
||||
"class" => $this->inviteClass,
|
||||
"class" => [
|
||||
$this->inviteClass,
|
||||
"hidden" => $this->initialShow,
|
||||
],
|
||||
"href" => "#",
|
||||
$vs,
|
||||
]);
|
||||
@ -64,7 +74,10 @@ class showmorePlugin extends BasePlugin {
|
||||
|
||||
function startp(): array {
|
||||
return v::sdiv([
|
||||
"class" => [$this->panelClass, "hidden"],
|
||||
"class" => [
|
||||
$this->panelClass,
|
||||
"hidden" => !$this->initialShow,
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user