listview component

This commit is contained in:
2023-05-17 07:43:53 +02:00
parent 22017f3e8b
commit d45045d63f
9 changed files with 65 additions and 6 deletions

View File

@@ -21,12 +21,14 @@ const sideBarCollapsed = ref(false)
:class="sideBarCollapsed ? 'ml-0' : 'ml-sidebar'"
>
<Note
v-if="activeNote"
v-if="activeViewMode.name === 'Note' && activeNote"
:key="activeNote.id"
:note="activeNote"
class=""
@update="(note) => updateNote(note.id, note)"
/>
<ListView v-else-if="activeViewMode.name === 'List'" />
<ListView v-else-if="activeViewMode.name === 'Mindmap'" />
</main>
</div>
</template>

View File

@@ -14,7 +14,7 @@ import AutoformatPlugin from '@ckeditor/ckeditor5-autoformat/src/autoformat'
import ContextedPlugin from '@/ckeditor/ContextedPlugin'
import { mdToHtml, htmlToMd } from '@/utils/markdown'
import { getNoteByTitle, setActiveNote, addNote } from '@/composables/useNotes'
import Autocomplete from '@/components/Autocomplete.vue'
import Autocomplete from '@/components/Note/Autocomplete.vue'
const props = defineProps<{ note: Note }>()

View File

@@ -0,0 +1,54 @@
<template>
<div class="overflow-x-auto">
<table class="table-compact table w-full">
<!-- head -->
<thead>
<tr>
<th>
<label>
<input type="checkbox" class="checkbox-primary checkbox checkbox-sm" />
</label>
</th>
<th>Note title</th>
<th>References</th>
<th>Modified</th>
</tr>
</thead>
<tbody>
<!-- row 1 -->
<tr class="hover">
<th>
<label>
<input type="checkbox" class="checkbox-primary checkbox checkbox-sm" />
</label>
</th>
<td>Cy Ganderton</td>
<td>Quality Control Specialist</td>
<td>Blue</td>
</tr>
<!-- row 2 -->
<tr class="hover">
<th>
<label>
<input type="checkbox" class="checkbox-primary checkbox checkbox-sm" />
</label>
</th>
<td>Hart Hagerty</td>
<td>Desktop Support Technician</td>
<td>Purple</td>
</tr>
<!-- row 3 -->
<tr class="hover">
<th>
<label>
<input type="checkbox" class="checkbox-primary checkbox checkbox-sm" />
</label>
</th>
<td>Brice Swyre</td>
<td>Tax Accountant</td>
<td>Red</td>
</tr>
</tbody>
</table>
</div>
</template>

View File