UI обращений, WebSocket и исправление DnD
- Канбан: шире контейнер, колонки minmax(300px), больше высота списков и колонок, брейкпоинт 1100px. - WebSocket: настраиваемый префикс support_ws_base (occ) и data-support-ws-base; корректная сборка пути /ws/tickets/… - Устранён ReferenceError: clientChatDndBound до инициализации при открытии создания обращения.
This commit is contained in:
@@ -6,20 +6,22 @@ namespace OCA\F7Support\Controller;
|
||||
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUserSession;
|
||||
use OCP\Util;
|
||||
|
||||
class PageController extends Controller {
|
||||
public function __construct(
|
||||
string $AppName,
|
||||
IRequest $request,
|
||||
private IUserSession $userSession,
|
||||
private IURLGenerator $urlGenerator
|
||||
) {
|
||||
parent::__construct($AppName, $request);
|
||||
}
|
||||
public function __construct(
|
||||
string $AppName,
|
||||
IRequest $request,
|
||||
private IUserSession $userSession,
|
||||
private IURLGenerator $urlGenerator,
|
||||
private IConfig $config,
|
||||
) {
|
||||
parent::__construct($AppName, $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
@@ -30,19 +32,23 @@ class PageController extends Controller {
|
||||
$baseUrl = $this->urlGenerator->getBaseUrl();
|
||||
$serverHost = parse_url($baseUrl, PHP_URL_HOST) ?: 'localhost';
|
||||
|
||||
$supportApiBase = 'https://support.f7cloud.ru';
|
||||
$supportParts = parse_url($supportApiBase);
|
||||
$supportApiOrigin = ($supportParts['scheme'] ?? 'https') . '://' . ($supportParts['host'] ?? '');
|
||||
$supportApiBase = 'https://support.f7cloud.ru';
|
||||
$supportParts = parse_url($supportApiBase);
|
||||
$supportApiOrigin = ($supportParts['scheme'] ?? 'https') . '://' . ($supportParts['host'] ?? '');
|
||||
|
||||
Util::addStyle('f7support', 'f7support');
|
||||
Util::addScript('f7support', 'main');
|
||||
// Optional full WebSocket URL prefix, e.g. wss://support.f7cloud.ru/api/ws (path before /tickets/{id})
|
||||
$supportWsBase = $this->config->getAppValue('f7support', 'support_ws_base', '');
|
||||
|
||||
return new TemplateResponse('f7support', 'main', [
|
||||
'username' => $user ? $user->getUID() : '',
|
||||
'serverAddress' => $serverHost,
|
||||
'supportApiBase' => $supportApiBase,
|
||||
'supportApiOrigin' => $supportApiOrigin,
|
||||
]);
|
||||
Util::addStyle('f7support', 'f7support');
|
||||
Util::addScript('f7support', 'main');
|
||||
|
||||
return new TemplateResponse('f7support', 'main', [
|
||||
'username' => $user ? $user->getUID() : '',
|
||||
'serverAddress' => $serverHost,
|
||||
'supportApiBase' => $supportApiBase,
|
||||
'supportApiOrigin' => $supportApiOrigin,
|
||||
'supportWsBase' => $supportWsBase,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user