From 32193376bc40315a0c471f82769f3856f4eef532 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 7 Feb 2025 22:19:07 +0100 Subject: [PATCH] Show mouse controls on hover instead of focus Saves a click in most scenarios. --- gdn-app/src/components/CNote.vue | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/gdn-app/src/components/CNote.vue b/gdn-app/src/components/CNote.vue index 178ad4c..93efbd0 100644 --- a/gdn-app/src/components/CNote.vue +++ b/gdn-app/src/components/CNote.vue @@ -39,7 +39,10 @@ const children = computed(() => { const mayOpen = computed(() => children.value.length > 0); const open = computed(() => mayOpen.value && ui.openPaths.has(props.path)); + const focused = computed(() => ui.focusPath === props.path); +const hover = ref(false); + const creating = ref(false); // Ensure we're open if we need to be. @@ -77,6 +80,10 @@ function onClick() { toggleOpen(); } +function onCreateClick() { + creating.value = true; +} + function onChildEditorClose() { creating.value = false; } @@ -89,17 +96,19 @@ function onChildEditorFinish(text: string) {