Merge branch 'main' of github.com:jcalixte/lite-note
This commit is contained in:
@@ -3,10 +3,12 @@ import { data } from '@/data/data'
|
||||
import { DataType } from '@/data/DataType.enum'
|
||||
import { BacklinkNote } from '@/modules/note/models/BacklinkNote'
|
||||
import { useAsyncState } from '@vueuse/core'
|
||||
import { onUnmounted } from 'vue'
|
||||
import { ComputedRef, onUnmounted, toValue } from 'vue'
|
||||
|
||||
export const useBacklinks = (sha: string) => {
|
||||
const backlink = useAsyncState(
|
||||
export const useBacklinks = (sha: string | ComputedRef<string>) => {
|
||||
sha = toValue(sha)
|
||||
|
||||
const { state: backlink, execute } = useAsyncState(
|
||||
data.get<DataType.BacklinkNote, BacklinkNote>(
|
||||
data.generateId(DataType.BacklinkNote, sha)
|
||||
),
|
||||
@@ -21,7 +23,7 @@ export const useBacklinks = (sha: string) => {
|
||||
if (fileSha !== sha) {
|
||||
return
|
||||
}
|
||||
backlink.execute()
|
||||
execute()
|
||||
},
|
||||
{
|
||||
retro: true
|
||||
|
||||
@@ -12,7 +12,7 @@ export const useForm = () => {
|
||||
}
|
||||
|
||||
push({
|
||||
name: 'Home',
|
||||
name: 'FluxNoteView',
|
||||
params: {
|
||||
user: userInput.value,
|
||||
repo: repoInput.value
|
||||
|
||||
@@ -8,7 +8,6 @@ import markdownItCheckbox from 'markdown-it-checkbox'
|
||||
import markdownItFootnote from 'markdown-it-footnote'
|
||||
import markdownItIframe from 'markdown-it-iframe'
|
||||
import markdownItLatex from 'markdown-it-latex'
|
||||
import markdownItSvgCodeCopy from 'markdown-it-svg-code-copy'
|
||||
|
||||
const md = new MarkdownIt({
|
||||
typographer: true,
|
||||
@@ -31,14 +30,6 @@ const md = new MarkdownIt({
|
||||
})
|
||||
.use(twitterPlugin)
|
||||
.use(markdownItCheckbox)
|
||||
.use(markdownItSvgCodeCopy, {
|
||||
svg: `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="36" height="36" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3a47" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<rect x="8" y="8" width="10" height="10" rx="2" />
|
||||
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
|
||||
</svg>`,
|
||||
buttonClass: 'button is-light'
|
||||
})
|
||||
.use(markdownItFootnote)
|
||||
.use(markdownItLatex)
|
||||
.use(markdownItIframe, {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { NOTE_WIDTH } from '@/constants/note-width'
|
||||
import { useOverlay } from '@/hooks/useOverlay.hook'
|
||||
import { useUserRepoStore } from '@/modules/repo/store/userRepo.store'
|
||||
import { readonly, ref } from 'vue'
|
||||
import { useWindowSize } from '@vueuse/core'
|
||||
import { nextTick } from 'vue'
|
||||
|
||||
import { nextTick, readonly, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
const stackedNotes = ref<string[]>([])
|
||||
@@ -90,7 +88,7 @@ export const useQueryStackedNotes = () => {
|
||||
const newStackedNotes = getStackedNotes()
|
||||
|
||||
push({
|
||||
name: currentRoute.value.name ?? 'Home',
|
||||
name: currentRoute.value.name ?? 'FluxNoteView',
|
||||
params: {
|
||||
user: store.user,
|
||||
repo: store.repo
|
||||
|
||||
Reference in New Issue
Block a user