Make note and editor structure similar
In preparation for using the editor to edit the note
This commit is contained in:
parent
b70903ef6f
commit
6c1ee3a3fc
1 changed files with 6 additions and 8 deletions
|
|
@ -91,12 +91,12 @@ function onChildEditorFinish(text: string) {
|
||||||
<template>
|
<template>
|
||||||
<div class="relative flex flex-col">
|
<div class="relative flex flex-col">
|
||||||
<div
|
<div
|
||||||
class="flex min-h-6 flex-row gap-1 pl-1"
|
class="flex min-h-6 pl-1"
|
||||||
:class="focused ? ['bg-neutral-200'] : ['hover:bg-neutral-100']"
|
:class="focused ? ['bg-neutral-200'] : ['hover:bg-neutral-100']"
|
||||||
@click="onClick"
|
@click="onClick"
|
||||||
>
|
>
|
||||||
<!-- Fold/unfold symbol -->
|
<!-- Fold/unfold symbol -->
|
||||||
<div class="flex items-center">
|
<div class="flex h-6 items-center">
|
||||||
<div
|
<div
|
||||||
class="rounded"
|
class="rounded"
|
||||||
:class="focused ? ['hover:bg-neutral-300'] : ['hover:bg-neutral-200']"
|
:class="focused ? ['hover:bg-neutral-300'] : ['hover:bg-neutral-200']"
|
||||||
|
|
@ -110,11 +110,11 @@ function onChildEditorFinish(text: string) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Text -->
|
<!-- Text -->
|
||||||
<div v-if="note && note.text.trim().length > 0" class="whitespace-pre-wrap">
|
<div v-if="note && note.text.trim().length > 0" class="whitespace-pre-wrap px-1">
|
||||||
{{ note.text }}
|
{{ note.text }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="note" class="font-light italic">empty</div>
|
<div v-else-if="note" class="px-1 font-light italic">empty</div>
|
||||||
<div v-else class="font-light italic">note not found</div>
|
<div v-else class="px-1 font-light italic">note not found</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Children -->
|
<!-- Children -->
|
||||||
|
|
@ -131,10 +131,8 @@ function onChildEditorFinish(text: string) {
|
||||||
<div v-if="creating" class="flex items-start pl-3">
|
<div v-if="creating" class="flex items-start pl-3">
|
||||||
<!-- Fold/unfold symbol -->
|
<!-- Fold/unfold symbol -->
|
||||||
<div class="flex h-6 items-center">
|
<div class="flex h-6 items-center">
|
||||||
<div class="rounded">
|
|
||||||
<RiAddLine size="16px" />
|
<RiAddLine size="16px" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<CNoteEditor class="flex-1" @close="onChildEditorClose" @finish="onChildEditorFinish" />
|
<CNoteEditor class="flex-1" @close="onChildEditorClose" @finish="onChildEditorFinish" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue