Merge branch 'main' of github.com:lite-note/lite-note into main

This commit is contained in:
2021-05-13 16:27:06 +02:00
24 changed files with 338 additions and 340 deletions

View File

@@ -1,47 +1,45 @@
<template>
<div class="draft-notes">
<flux-note :user="user" :repo="repo" :content="content" key="draft-notes">
<h3 class="subtitle is-3">
Drafts
</h3>
</flux-note>
</div>
</template>
<script lang="ts">
import { useFolderNotes } from '@/modules/note/hooks/useFolderNotes'
import { defineAsyncComponent, defineComponent } from 'vue'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
const DRAFT_FOLDER = ['drafts', '_drafts']
export default defineComponent({
name: 'DraftNotes',
components: {
FluxNote
},
props: {
user: { type: String, required: true },
repo: { type: String, required: true }
},
setup() {
const { content } = useFolderNotes(DRAFT_FOLDER)
return {
content
}
}
})
</script>
<style scoped lang="scss">
.draft-notes {
display: flex;
flex: 1;
.subtitle {
text-align: center;
}
}
</style>
<template>
<div class="draft-notes">
<flux-note key="draft-notes" :user="user" :repo="repo" :content="content">
<h3 class="subtitle is-3">Drafts</h3>
</flux-note>
</div>
</template>
<script lang="ts">
import { useFolderNotes } from '@/modules/note/hooks/useFolderNotes'
import { defineAsyncComponent, defineComponent } from 'vue'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
const DRAFT_FOLDER = ['drafts', '_drafts']
export default defineComponent({
name: 'DraftNotes',
components: {
FluxNote
},
props: {
user: { type: String, required: true },
repo: { type: String, required: true }
},
setup() {
const { content } = useFolderNotes(DRAFT_FOLDER)
return {
content
}
}
})
</script>
<style scoped lang="scss">
.draft-notes {
display: flex;
flex: 1;
.subtitle {
text-align: center;
}
}
</style>

View File

@@ -1,52 +1,50 @@
<template>
<div class="fleeting-notes">
<flux-note
:user="user"
:repo="repo"
:content="content"
key="fleeting-notes"
>
<h3 class="subtitle is-3">
Inbox
</h3>
</flux-note>
</div>
</template>
<script lang="ts">
import { useFolderNotes } from '@/modules/note/hooks/useFolderNotes'
import { defineAsyncComponent, defineComponent } from 'vue'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
const FLEETING_NOTES_FOLDER = ['inbox', '_inbox']
export default defineComponent({
name: 'FleetingNotes',
components: {
FluxNote
},
props: {
user: { type: String, required: true },
repo: { type: String, required: true }
},
setup() {
const { content } = useFolderNotes(FLEETING_NOTES_FOLDER)
return {
content
}
}
})
</script>
<style scoped lang="scss">
.fleeting-notes {
display: flex;
flex: 1;
.subtitle {
text-align: center;
}
}
</style>
<template>
<div class="fleeting-notes">
<flux-note
key="fleeting-notes"
:user="user"
:repo="repo"
:content="content"
>
<h3 class="subtitle is-3">Inbox</h3>
</flux-note>
</div>
</template>
<script lang="ts">
import { useFolderNotes } from '@/modules/note/hooks/useFolderNotes'
import { defineAsyncComponent, defineComponent } from 'vue'
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
const FLEETING_NOTES_FOLDER = ['inbox', '_inbox']
export default defineComponent({
name: 'FleetingNotes',
components: {
FluxNote
},
props: {
user: { type: String, required: true },
repo: { type: String, required: true }
},
setup() {
const { content } = useFolderNotes(FLEETING_NOTES_FOLDER)
return {
content
}
}
})
</script>
<style scoped lang="scss">
.fleeting-notes {
display: flex;
flex: 1;
.subtitle {
text-align: center;
}
}
</style>

View File

@@ -34,6 +34,9 @@ export default defineComponent({
},
setup(props) {
const { resetStackedNotes } = useQueryStackedNotes()
onMounted(() => {
refreshToken()
})
onMounted(() => {
refreshToken()

View File

@@ -13,10 +13,10 @@
<div class="field-body">
<div class="control">
<input
v-model="user"
class="input"
type="text"
placeholder="GitHub username"
v-model="user"
/>
</div>
</div>
@@ -28,10 +28,10 @@
<div class="field-body">
<div class="control">
<input
v-model="token"
class="input"
type="password"
placeholder="Personal Access Token"
v-model="token"
/>
</div>
</div>

View File

@@ -6,8 +6,8 @@
<div v-else class="columns is-centered">
<div class="column is-one-third">
<table
class="table is-striped is-hoverable"
v-if="favoriteRepos.length > 0"
class="table is-striped is-hoverable"
>
<thead>
<tr>

View File

@@ -6,10 +6,10 @@
</div>
</article>
<flux-note
key="share-notes"
:user="user"
:repo="repo"
:content="content"
key="share-notes"
:with-header="false"
/>
</div>