fix: font family is the same for notyf
This commit is contained in:
@@ -52,7 +52,7 @@ useUserSettings()
|
|||||||
const { visitRepo } = useVisitRepo({ user: user, repo: repo })
|
const { visitRepo } = useVisitRepo({ user: user, repo: repo })
|
||||||
const { toHTML } = useMarkdown(repo)
|
const { toHTML } = useMarkdown(repo)
|
||||||
const { listenToClick } = useLinks("note-display")
|
const { listenToClick } = useLinks("note-display")
|
||||||
const { stackedNotes, scrollToTop } = useRouteQueryStackedNotes()
|
const { stackedNotes } = useRouteQueryStackedNotes()
|
||||||
|
|
||||||
const { titles } = useNoteView("note-container")
|
const { titles } = useNoteView("note-container")
|
||||||
|
|
||||||
@@ -89,8 +89,6 @@ onMounted(() => visitRepo())
|
|||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
store.resetFiles()
|
store.resetFiles()
|
||||||
})
|
})
|
||||||
|
|
||||||
const focusREADME = () => scrollToTop()
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -98,7 +96,7 @@ const focusREADME = () => scrollToTop()
|
|||||||
<div class="note readme">
|
<div class="note readme">
|
||||||
<header-note v-if="withHeader" class="header" :user="user" :repo="repo" />
|
<header-note v-if="withHeader" class="header" :user="user" :repo="repo" />
|
||||||
<div class="repo-title-breadcrumb">
|
<div class="repo-title-breadcrumb">
|
||||||
<a @click.prevent="focusREADME">{{ repo }}</a>
|
<a :href="route.path">{{ repo }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="repo-title">
|
<div class="repo-title">
|
||||||
<div class="repo-header">
|
<div class="repo-header">
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import { useWindowSize } from '@vueuse/core'
|
import { useWindowSize } from "@vueuse/core"
|
||||||
import { useRouteQuery } from '@vueuse/router'
|
import { useRouteQuery } from "@vueuse/router"
|
||||||
import { nextTick, readonly } from 'vue'
|
import { nextTick, readonly } from "vue"
|
||||||
|
|
||||||
import { NOTE_WIDTH } from '@/constants/note-width'
|
import { NOTE_WIDTH } from "@/constants/note-width"
|
||||||
import { useOverlay } from '@/hooks/useOverlay.hook'
|
import { useOverlay } from "@/hooks/useOverlay.hook"
|
||||||
|
|
||||||
export const useRouteQueryStackedNotes = () => {
|
export const useRouteQueryStackedNotes = () => {
|
||||||
const stackedNotes = useRouteQuery('stackedNotes', undefined, {
|
const stackedNotes = useRouteQuery("stackedNotes", undefined, {
|
||||||
transform: (value: string | string[] | undefined) => {
|
transform: (value: string | string[] | undefined) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array.isArray(value) ? value : [value]
|
return Array.isArray(value) ? value : [value]
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
const { height } = useWindowSize()
|
const { height } = useWindowSize()
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ export const useRouteQueryStackedNotes = () => {
|
|||||||
|
|
||||||
const scrollToFocusedNote = (
|
const scrollToFocusedNote = (
|
||||||
sha: string,
|
sha: string,
|
||||||
notes: string[] = stackedNotes.value
|
notes: string[] = stackedNotes.value,
|
||||||
) => {
|
) => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const index = notes.findIndex((noteSHA) => noteSHA === sha)
|
const index = notes.findIndex((noteSHA) => noteSHA === sha)
|
||||||
@@ -48,13 +48,13 @@ export const useRouteQueryStackedNotes = () => {
|
|||||||
stackedNotes.value = [sha]
|
stackedNotes.value = [sha]
|
||||||
} else {
|
} else {
|
||||||
const [splittedStackedNotes] = stackedNotes.value
|
const [splittedStackedNotes] = stackedNotes.value
|
||||||
.join(';')
|
.join(";")
|
||||||
.split(currentSha)
|
.split(currentSha)
|
||||||
|
|
||||||
const newStackedNotes = [
|
const newStackedNotes = [
|
||||||
...splittedStackedNotes.replaceAll(';;', ';').split(';'),
|
...splittedStackedNotes.replaceAll(";;", ";").split(";"),
|
||||||
currentSha,
|
currentSha,
|
||||||
sha
|
sha,
|
||||||
].filter((sha) => !!sha)
|
].filter((sha) => !!sha)
|
||||||
|
|
||||||
stackedNotes.value = newStackedNotes
|
stackedNotes.value = newStackedNotes
|
||||||
@@ -67,6 +67,5 @@ export const useRouteQueryStackedNotes = () => {
|
|||||||
stackedNotes: readonly(stackedNotes),
|
stackedNotes: readonly(stackedNotes),
|
||||||
addStackedNote,
|
addStackedNote,
|
||||||
scrollToFocusedNote,
|
scrollToFocusedNote,
|
||||||
scrollToTop: () => scrollToNote(0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ a {
|
|||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.repo-note {
|
.repo-note,
|
||||||
|
.notyf {
|
||||||
font-family: var(--font-family);
|
font-family: var(--font-family);
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user