From c9f539bf315ef0d73d80bffbd38ba1a7013e8c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 27 Jan 2023 12:24:40 +0100 Subject: [PATCH 1/3] feat(Description): Use text as editor if available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Controller/PageController.php | 4 ++ src/components/card/Description.vue | 64 +++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 46279df0d..88ef05ff9 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -27,6 +27,7 @@ use OCA\Deck\Service\ConfigService; use OCA\Deck\Service\PermissionService; use OCA\Files\Event\LoadSidebar; +use OCA\Text\Event\LoadEditor; use OCA\Viewer\Event\LoadViewer; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\Collaboration\Resources\LoadAdditionalScriptsEvent as CollaborationResourcesEvent; @@ -90,6 +91,9 @@ public function index() { $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()); } diff --git a/src/components/card/Description.vue b/src/components/card/Description.vue index 6e6046c18..71e28bb07 100644 --- a/src/components/card/Description.vue +++ b/src/components/card/Description.vue @@ -26,11 +26,12 @@ {{ t('deck', 'Description') }} {{ t('deck', '(Unsaved)') }} {{ t('deck', '(Saving…)') }} - - + {{ t('deck', 'Edit description') }} @@ -48,21 +49,26 @@ -
-

- {{ t('deck', 'Write a description …') }} -

- + +