From ef521480d5b652066709940ac59dc225c24651ce Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 21 Mar 2021 20:16:17 +0100 Subject: [PATCH] =?UTF-8?q?:sparkles:=20(flux=20note)=20display=20no=20con?= =?UTF-8?q?tent=20if=20there=20is=20no=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FluxNote.vue | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/FluxNote.vue b/src/components/FluxNote.vue index 6f395af..b5fa5b4 100644 --- a/src/components/FluxNote.vue +++ b/src/components/FluxNote.vue @@ -15,7 +15,10 @@ -

+
+ No content here 📝 +
+

- props.content !== null ? renderString(props.content) : null + const { readme, ...noteProps } = useNote( + 'note-container', + refProps.user, + refProps.repo ) + const renderedContent = computed(() => + props.content !== null ? renderString(props.content) : readme.value + ) + + const hasContent = computed(() => !!renderedContent.value) + watch(renderedContent, () => nextTick(() => listenToClick())) return { + hasContent, renderedContent, stackedNotes, resetStackedNotes, - ...useNote('note-container', refProps.user, refProps.repo) + ...noteProps } } })