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