From ccd1c4337f914db7c93b2dac2aac40ef0b0fb194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Buget?= Date: Mon, 11 Sep 2023 07:54:39 +0200 Subject: [PATCH] feat: add \'New thread\' button in sidebar --- app.vue | 29 +++++++++++++++++++++++++++-- components/ThreadSummaryList.vue | 22 +++++++++++++++------- plugins/primevue.js | 2 ++ 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/app.vue b/app.vue index b13ecf7..c23a854 100644 --- a/app.vue +++ b/app.vue @@ -6,13 +6,15 @@ const threadSummaryListKey = ref(generateUniqueKey('thread-summary-list')) async function loadThread(selectedTreadId: number) { threadId.value = selectedTreadId - console.log('Selected thread with ID ', threadId.value) } async function refreshThreadList() { threadSummaryListKey.value = generateUniqueKey('thread-summary-list') } +function newThread() { + threadId.value = null +}