initialState->provideInitialState('maxUploadSize', (int)\OCP\Util::uploadLimit()); $this->initialState->provideInitialState('canCreate', $this->permissionService->canCreate()); $this->initialState->provideInitialState('config', $this->configService->getAll()); $this->initialState->provideInitialState('initialBoards', $this->boardService->findAll()); $this->eventDispatcher->dispatchTyped(new LoadSidebar()); $this->eventDispatcher->dispatchTyped(new CollaborationResourcesEvent()); if (class_exists(LoadEditor::class)) { $this->eventDispatcher->dispatchTyped(new LoadEditor()); } if (class_exists(LoadViewer::class)) { $this->eventDispatcher->dispatchTyped(new LoadViewer()); } $response = new TemplateResponse('deck', 'main', [ 'id-app-content' => '#app-content-vue', 'id-app-navigation' => '#app-navigation-vue', ]); if ($this->config->getSystemValueBool('debug', false)) { $csp = new ContentSecurityPolicy(); $csp->addAllowedConnectDomain('*'); $csp->addAllowedScriptDomain('*'); $response->setContentSecurityPolicy($csp); } return $response; } #[NoAdminRequired] #[NoCSRFRequired] public function indexList(): TemplateResponse { return $this->index(); } #[NoAdminRequired] #[NoCSRFRequired] public function indexBoard(int $boardId): TemplateResponse { return $this->index(); } #[NoAdminRequired] #[NoCSRFRequired] public function indexBoardDetails(int $boardId): TemplateResponse { return $this->index(); } #[NoAdminRequired] #[NoCSRFRequired] public function indexCard(int $cardId): TemplateResponse { return $this->index(); } #[NoAdminRequired] #[NoCSRFRequired] public function redirectToCard($cardId): RedirectResponse { try { $this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_READ); return new RedirectResponse($this->cardService->getCardUrl($cardId)); } catch (\Exception $e) { return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('deck.page.index')); } } }