OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
42
app/Domain/Help/Controllers/ShowOnboardingDialog.php
Normal file
42
app/Domain/Help/Controllers/ShowOnboardingDialog.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Help\Controllers;
|
||||
|
||||
use Leantime\Core\Controller\Controller;
|
||||
use Leantime\Domain\Help\Services\Helper;
|
||||
|
||||
class ShowOnboardingDialog extends Controller
|
||||
{
|
||||
protected Helper $helpService;
|
||||
|
||||
/**
|
||||
* Injects the Helper service.
|
||||
*/
|
||||
public function init(Helper $helpService): void
|
||||
{
|
||||
$this->helpService = $helpService;
|
||||
}
|
||||
|
||||
/**
|
||||
* get - handle get requests
|
||||
*
|
||||
* Renders the onboarding modal partial for the requested module or route.
|
||||
* The "show once per session" bookkeeping and sanitization live in the service.
|
||||
*
|
||||
* @param array $params Request parameters.
|
||||
*/
|
||||
public function get($params)
|
||||
{
|
||||
if (isset($params['module']) && $params['module'] != '') {
|
||||
$template = $this->helpService->markModalSeenForModule($params['module']);
|
||||
|
||||
return $this->tpl->displayPartial('help.'.$template);
|
||||
}
|
||||
|
||||
if (isset($params['route']) && $params['route'] != '') {
|
||||
$template = $this->helpService->markModalSeenForRoute($params['route']);
|
||||
|
||||
return $this->tpl->displayPartial('help.'.$template);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user