diff --git a/src/assets/icons/loading.svg b/src/assets/icons/loading.svg new file mode 100644 index 0000000..4407a4b --- /dev/null +++ b/src/assets/icons/loading.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/components/FluxNote.vue b/src/components/FluxNote.vue index 2c2b268..d7f2462 100644 --- a/src/components/FluxNote.vue +++ b/src/components/FluxNote.vue @@ -1,5 +1,5 @@ diff --git a/src/hooks/useFocus.hook.ts b/src/hooks/useFocus.hook.ts index f31df64..fccea04 100644 --- a/src/hooks/useFocus.hook.ts +++ b/src/hooks/useFocus.hook.ts @@ -10,12 +10,12 @@ export const useFocus = () => { const { stackedNotes } = useQueryStackedNotes() const scrollToFocusedNote = (sha?: string, backToTop?: boolean) => { - if (!sha) { + if (backToTop) { + scrollToNote(0) return } - if (backToTop) { - scrollToNote(0) + if (!sha) { return } diff --git a/src/modules/note/hooks/useFolderNotes.ts b/src/modules/note/hooks/useFolderNotes.ts index 457ddf2..8d4e574 100644 --- a/src/modules/note/hooks/useFolderNotes.ts +++ b/src/modules/note/hooks/useFolderNotes.ts @@ -11,11 +11,11 @@ export const useFolderNotes = (folder: string) => { ) const content = computed(() => - fleetingNotes.value?.length + fleetingNotes.value?.length > 0 ? fleetingNotes.value .map((note) => `- [${note.path}](${note.path})`) .join('\n') - : '' + : null ) return { diff --git a/src/router/router.ts b/src/router/router.ts index c989d8b..529fe78 100644 --- a/src/router/router.ts +++ b/src/router/router.ts @@ -27,13 +27,11 @@ const routes: Array = [ component: Home }, { - path: '/:user/:repo/fleeting-notes', + path: '/:user/:repo/inbox', name: 'FleetingNotes', props: true, component: () => - import( - /* webpackChunkName: "fleeting-notes" */ '@/views/FleetingNotes.vue' - ) + import(/* webpackChunkName: "inbox" */ '@/views/FleetingNotes.vue') }, { path: '/:user/:repo/draft', diff --git a/src/views/FleetingNotes.vue b/src/views/FleetingNotes.vue index a491949..5cc2abc 100644 --- a/src/views/FleetingNotes.vue +++ b/src/views/FleetingNotes.vue @@ -7,7 +7,7 @@ key="fleeting-notes" >

- Fleeting notes + Inbox

@@ -19,7 +19,7 @@ import { defineAsyncComponent, defineComponent } from 'vue' const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue')) -const FLEETING_NOTES_FOLDER = 'fleeting-notes' +const FLEETING_NOTES_FOLDER = 'inbox' export default defineComponent({ name: 'FleetingNotes',