From 0062fad070cffd7d38024118939fe5c9d9be79d6 Mon Sep 17 00:00:00 2001 From: Thomas Hackl Date: Thu, 19 Feb 2026 10:25:46 +0100 Subject: use sidebar for wizard info --- lib/classes/WizardPart.php | 33 ++++++++++++++++++++++++++++++--- resources/vue/apps/StudipWizard.vue | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/lib/classes/WizardPart.php b/lib/classes/WizardPart.php index 0127e2c..53d39e3 100644 --- a/lib/classes/WizardPart.php +++ b/lib/classes/WizardPart.php @@ -25,20 +25,35 @@ final class WizardPart implements Stringable, JsonSerializable private string $title; private string $iconShape; + private string $description; + /** * Creates a vue app with the given relative path to the app component. */ - public static function create(string $id, Form|VueApp $content, string $title = '', string $iconShape = ''): WizardPart + public static function create( + string $id, + Form|VueApp $content, + string $title = '', + string $description = '', + string $iconShape = '' + ): WizardPart { - return new static($id, $content, $title, $iconShape); + return new static($id, $content, $title, $description, $iconShape); } - public function __construct(string $id, Form|VueApp $content, string $title = '', string $iconShape = '') + public function __construct( + string $id, + Form|VueApp $content, + string $title = '', + string $description = '', + string $iconShape = '' + ) { $this->id = $id; $this->type = get_class($content); $this->content = $content; $this->title = $title; + $this->description = $description; $this->iconShape = $iconShape; } @@ -57,6 +72,11 @@ final class WizardPart implements Stringable, JsonSerializable return $this->title; } + public function getDescription(): string + { + return $this->description; + } + public function getContent() { return $this->content; } @@ -73,6 +93,12 @@ final class WizardPart implements Stringable, JsonSerializable return $this; } + public function setDescription(string $description): WizardPart + { + $this->description = $description; + return $this; + } + public function getIconShape(): string { return $this->iconShape; @@ -90,6 +116,7 @@ final class WizardPart implements Stringable, JsonSerializable 'id' => $this->id, 'type' => $this->type, 'title' => $this->title, + 'description' => $this->description, 'icon' => $this->iconShape, 'content' => $this->render() ]; diff --git a/resources/vue/apps/StudipWizard.vue b/resources/vue/apps/StudipWizard.vue index f08bb74..941f1a8 100644 --- a/resources/vue/apps/StudipWizard.vue +++ b/resources/vue/apps/StudipWizard.vue @@ -55,6 +55,37 @@ + + + + +