🐛 (flux note) update query strings on fleeting notes
This commit is contained in:
@@ -41,7 +41,8 @@ import {
|
||||
toRefs,
|
||||
computed,
|
||||
watch,
|
||||
nextTick
|
||||
nextTick,
|
||||
onUnmounted
|
||||
} from 'vue'
|
||||
import HeaderNote from '@/components/HeaderNote.vue'
|
||||
import { useNote } from '@/hooks/useNote.hook'
|
||||
@@ -83,6 +84,10 @@ export default defineComponent({
|
||||
|
||||
watch(renderedContent, () => nextTick(() => listenToClick()))
|
||||
|
||||
onUnmounted(() => {
|
||||
readme.value = ''
|
||||
})
|
||||
|
||||
return {
|
||||
hasContent,
|
||||
renderedContent,
|
||||
|
||||
@@ -10,20 +10,16 @@ export const useQueryStackedNotes = () => {
|
||||
const { query } = useRoute()
|
||||
|
||||
const initResetStackedNote = () =>
|
||||
(Array.isArray(query.stackedNotes)
|
||||
(stackedNotes.value = (Array.isArray(query.stackedNotes)
|
||||
? query.stackedNotes
|
||||
: [query.stackedNotes]
|
||||
)
|
||||
.map((n) => n?.toString())
|
||||
.filter((n) => !!n) as string[]
|
||||
|
||||
const setStackedNotes = () => {
|
||||
stackedNotes.value = initResetStackedNote()
|
||||
}
|
||||
.filter((n) => !!n) as string[])
|
||||
|
||||
if (initial) {
|
||||
initial = false
|
||||
setStackedNotes()
|
||||
initResetStackedNote()
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="draft-notes">
|
||||
<flux-note :user="user" :repo="repo" :content="content">
|
||||
<flux-note :user="user" :repo="repo" :content="content" key="draft-notes">
|
||||
<h3 class="subtitle is-3">
|
||||
Drafts
|
||||
</h3>
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div class="fleeting-notes">
|
||||
<flux-note :user="user" :repo="repo" :content="content">
|
||||
<flux-note
|
||||
:user="user"
|
||||
:repo="repo"
|
||||
:content="content"
|
||||
key="fleeting-notes"
|
||||
>
|
||||
<h3 class="subtitle is-3">
|
||||
Fleeting notes
|
||||
</h3>
|
||||
|
||||
Reference in New Issue
Block a user