@@ -18,7 +18,14 @@
-
+
+

+
+
No content here 📝
@@ -201,6 +208,17 @@ $header-height: 40px;
max-width: 620px;
}
}
+
+ .loading {
+ display: flex;
+ flex: 1;
+ justify-content: center;
+ align-items: center;
+
+ .is-loading {
+ animation: spinAround 0.8s infinite linear;
+ }
+ }
}
@media screen and (max-width: 768px) {
diff --git a/src/components/HeaderNote.vue b/src/components/HeaderNote.vue
index 3530fd0..87c8ef8 100644
--- a/src/components/HeaderNote.vue
+++ b/src/components/HeaderNote.vue
@@ -10,13 +10,13 @@
class="special-folder"
:to="{ name: 'DraftNotes', params: { user, repo } }"
>
- Draft
+ draft
- Fleeting notes
+ inbox
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',