From 780eaeb7f71408bf8c5eb746e2169347d6e31609 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Mon, 14 Aug 2023 18:57:17 +0200 Subject: [PATCH] reset stacked note on click --- src/components/FluxNote.vue | 8 ++++---- src/hooks/useQueryStackedNotes.hook.ts | 6 +++--- src/modules/repo/store/userRepo.store.ts | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/FluxNote.vue b/src/components/FluxNote.vue index d6a2847..1983d22 100644 --- a/src/components/FluxNote.vue +++ b/src/components/FluxNote.vue @@ -100,14 +100,14 @@ const focusREADME = () => scrollToTop()

- [ - {{ repo }} ] + {{ repo }} +

-

+

{{ user }} - { }) } - const initResetStackedNote = () => { + const resetStackedNotes = () => { stackedNotes.value = Array.isArray(query.stackedNotes) ? (query.stackedNotes as string[]) : ([query.stackedNotes] @@ -45,7 +45,7 @@ export const useQueryStackedNotes = () => { if (initial) { initial = false - initResetStackedNote() + resetStackedNotes() } const updateQueryStackedNotes = (newStackedNotes: string[]) => @@ -98,7 +98,7 @@ export const useQueryStackedNotes = () => { stackedNotes: readonly(stackedNotes), updateQueryStackedNotes, addStackedNote, - resetStackedNotes: () => initResetStackedNote(), + resetStackedNotes, scrollToFocusedNote, scrollToTop: () => scrollToNote(0) } diff --git a/src/modules/repo/store/userRepo.store.ts b/src/modules/repo/store/userRepo.store.ts index 79f106e..ecbad4e 100644 --- a/src/modules/repo/store/userRepo.store.ts +++ b/src/modules/repo/store/userRepo.store.ts @@ -52,8 +52,7 @@ export const useUserRepoStore = defineStore({ this.files = files // if the offline state is too quick, - // it gives more the impression of - // glitch. + // it gives more the impression of glitch. setTimeout(() => { this.isReadmeOffline = false }, 500)