OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
46
app/Domain/Help/Hxcontrollers/HelperModal.php
Normal file
46
app/Domain/Help/Hxcontrollers/HelperModal.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Help\Hxcontrollers;
|
||||
|
||||
use Leantime\Core\Controller\HtmxController;
|
||||
use Leantime\Domain\Help\Services\Helper;
|
||||
use Leantime\Domain\Users\Services\Users as UserService;
|
||||
|
||||
class HelperModal extends HtmxController
|
||||
{
|
||||
protected static string $view = '';
|
||||
|
||||
protected Helper $helperService;
|
||||
|
||||
protected UserService $userService;
|
||||
|
||||
/**
|
||||
* Controller constructor
|
||||
*
|
||||
* @param Helper $helperService The help domain service.
|
||||
* @param UserService $userService The users domain service.
|
||||
* @return void
|
||||
*/
|
||||
public function init(
|
||||
Helper $helperService,
|
||||
UserService $userService
|
||||
) {
|
||||
$this->helperService = $helperService;
|
||||
$this->userService = $userService;
|
||||
}
|
||||
|
||||
public function get() {}
|
||||
|
||||
public function dontShowAgain($params)
|
||||
{
|
||||
|
||||
$modal = $params['modalId'] ?? '';
|
||||
$hidePermanently = ($params['hidePermanently'] ?? false) === 'on' ? true : false;
|
||||
|
||||
if ($modal !== '') {
|
||||
$this->userService->updateUserSettings('modals', $modal, $hidePermanently);
|
||||
}
|
||||
|
||||
return $this->tpl->emptyResponse();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user