Amélioration de l'expérience utilisateur

This commit is contained in:
2024-09-09 20:27:54 +02:00
parent 76ddc9fe30
commit b087a7130c
13 changed files with 207 additions and 87 deletions

View File

@@ -19,25 +19,7 @@ class Module extends \Piko\Module
$view = $this->application->getComponent('Piko\View');
$view->params['user'] = $user;
$view->params['language'] = $this->application->language;
// $view->attachBehavior('vite', 'app\lib\Vite::vite');
$vite = new Vite($view);
$vite->loadEntry('main.js');
$userModule = $this->application->getModule('user');
assert ($userModule instanceof \app\modules\user\Module);
$userModule->on(CreateControllerEvent::class, function(CreateControllerEvent $event) {
$event->controller->on(BeforeActionEvent::class, function (BeforeActionEvent $event) {
$action = $event->actionId;
switch($action) {
case 'login':
$event->controller->layout = 'minimal';
break;
}
});
});
}
}

View File

@@ -2,7 +2,7 @@
/* @var $this \Piko\View */
/* @var $content string */
if (!$this->title) $this->title = 'Openai';
if (!$this->title) $this->title = 'IA Assistant';
?>
<!DOCTYPE html>
<html lang="<?= $this->params['language'] ?>">