chore: lint and fmt
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { format } from "date-fns"
|
||||
import { computed, ref, watch } from "vue"
|
||||
|
||||
import FluxNote from "@/components/FluxNote.vue"
|
||||
import { useEditionMode } from "@/hooks/useEditionMode"
|
||||
import { useGitHubContent } from "@/hooks/useGitHubContent.hook"
|
||||
@@ -70,7 +71,7 @@ const handleYouTube = async () => {
|
||||
|
||||
const { createFile } = useGitHubContent({
|
||||
repo: repo.value,
|
||||
user: user.value,
|
||||
user: user.value
|
||||
})
|
||||
|
||||
const hasTodayNote = computed(() => content.value.includes(today))
|
||||
@@ -83,7 +84,7 @@ watch(mode, async (newMode) => {
|
||||
|
||||
const newSha = await createFile({
|
||||
content,
|
||||
path: newContentPath,
|
||||
path: newContentPath
|
||||
})
|
||||
|
||||
if (!newSha) {
|
||||
@@ -94,7 +95,7 @@ watch(mode, async (newMode) => {
|
||||
const { saveCacheNote } = prepareNoteCache(newSha, newContentPath)
|
||||
await saveCacheNote(encodeUTF8ToBase64(content), {
|
||||
editedSha: newSha,
|
||||
path: newContentPath,
|
||||
path: newContentPath
|
||||
})
|
||||
|
||||
addStackedNote("", newSha)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed } from "vue"
|
||||
|
||||
import FluxNote from '@/components/FluxNote.vue'
|
||||
import { useComputeBacklinks } from '@/hooks/useComputeBacklinks.hook'
|
||||
import FluxNote from "@/components/FluxNote.vue"
|
||||
import { useComputeBacklinks } from "@/hooks/useComputeBacklinks.hook"
|
||||
|
||||
useComputeBacklinks()
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { defineAsyncComponent, ref } from 'vue'
|
||||
import { defineAsyncComponent, ref } from "vue"
|
||||
|
||||
import { useNotes } from '@/modules/note/hooks/useNotes'
|
||||
import { useNotes } from "@/modules/note/hooks/useNotes"
|
||||
|
||||
const devMode = ref(import.meta.env.DEV)
|
||||
const FluxNote = defineAsyncComponent(() => import('@/components/FluxNote.vue'))
|
||||
const FluxNote = defineAsyncComponent(() => import("@/components/FluxNote.vue"))
|
||||
|
||||
defineProps<{ user: string; repo: string }>()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import AuthorizeUser from '@/components/AuthorizeUser.vue'
|
||||
import WelcomeWorld from '@/components/WelcomeWorld.vue'
|
||||
import AuthorizeUser from "@/components/AuthorizeUser.vue"
|
||||
import WelcomeWorld from "@/components/WelcomeWorld.vue"
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed } from "vue"
|
||||
|
||||
import FluxNote from '@/components/FluxNote.vue'
|
||||
import { DataType } from '@/data/DataType.enum'
|
||||
import { useNeedReviewCards } from '@/modules/card/hooks/useNeedReviewCards'
|
||||
import FluxNote from "@/components/FluxNote.vue"
|
||||
import { DataType } from "@/data/DataType.enum"
|
||||
import { useNeedReviewCards } from "@/modules/card/hooks/useNeedReviewCards"
|
||||
|
||||
defineProps<{
|
||||
user: string
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import { computedAsync } from "@vueuse/core"
|
||||
import { computed } from "vue"
|
||||
|
||||
import HomeButton from "@/components/HomeButton.vue"
|
||||
import PublicNoteList from "@/components/PublicNoteList.vue"
|
||||
import SkeletonLoader from "@/components/SkeletonLoader.vue"
|
||||
import { usePublicNoteList } from "@/hooks/usePublicNoteList.hook"
|
||||
import { getAuthor } from "@/modules/atproto/getAuthor"
|
||||
import { fromShortDid } from "@/modules/atproto/shortDid"
|
||||
import { computedAsync } from "@vueuse/core"
|
||||
import { computed } from "vue"
|
||||
|
||||
const props = defineProps<{ shortDid: string }>()
|
||||
const did = computed(() => fromShortDid(props.shortDid))
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
|
||||
import HomeButton from "@/components/HomeButton.vue"
|
||||
import PublicNoteList from "@/components/PublicNoteList.vue"
|
||||
import SignInAtproto from "@/components/SignInAtproto.vue"
|
||||
import { useATProtoLogin } from "@/hooks/useATProtoLogin.hook"
|
||||
import { useFollows } from "@/hooks/useFollows.hook"
|
||||
import { useFollowingNoteList } from "@/hooks/useFollowingNoteList.hook"
|
||||
import { useFollows } from "@/hooks/useFollows.hook"
|
||||
import { usePublicNoteList } from "@/hooks/usePublicNoteList.hook"
|
||||
import { toShortDid } from "@/modules/atproto/shortDid"
|
||||
import { computed } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
@@ -20,8 +21,8 @@ const tab = computed<"all" | "following">({
|
||||
get: () => (route.query.tab === "following" ? "following" : "all"),
|
||||
set: (value) =>
|
||||
router.replace({
|
||||
query: { ...route.query, tab: value === "all" ? undefined : value },
|
||||
}),
|
||||
query: { ...route.query, tab: value === "all" ? undefined : value }
|
||||
})
|
||||
})
|
||||
|
||||
const followingEnabled = computed(() => tab.value === "following")
|
||||
@@ -65,7 +66,7 @@ const following = useFollowingNoteList(follows, followingEnabled)
|
||||
v-if="all.getAuthor(note.did)"
|
||||
:to="{
|
||||
name: 'PublicNoteListByDidView',
|
||||
params: { shortDid: toShortDid(note.did) },
|
||||
params: { shortDid: toShortDid(note.did) }
|
||||
}"
|
||||
class="link link-hover"
|
||||
>
|
||||
@@ -90,7 +91,7 @@ const following = useFollowingNoteList(follows, followingEnabled)
|
||||
v-if="following.getAuthor(note.did)"
|
||||
:to="{
|
||||
name: 'PublicNoteListByDidView',
|
||||
params: { shortDid: toShortDid(note.did) },
|
||||
params: { shortDid: toShortDid(note.did) }
|
||||
}"
|
||||
class="link link-hover"
|
||||
>
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { useATProtoLinks } from "@/hooks/useATProtoLinks.hook"
|
||||
import { markdownBuilder } from "@/hooks/useMarkdown.hook"
|
||||
import BackButton from "@/components/BackButton.vue"
|
||||
import StackedPublicNote from "@/components/StackedPublicNote.vue"
|
||||
import { useRouteQueryStackedNotes } from "@/hooks/useRouteQueryStackedNotes.hook"
|
||||
import { getAuthor } from "@/modules/atproto/getAuthor"
|
||||
import type { PublicNoteRecord } from "@/modules/atproto/publicNote.types"
|
||||
import { withATProtoImages } from "@/modules/atproto/withATProtoImages"
|
||||
import { getUrl } from "@/modules/atproto/getUrl"
|
||||
import { fromShortDid } from "@/modules/atproto/shortDid"
|
||||
import { downloadFont } from "@/utils/downloadFont"
|
||||
import { slugify } from "@/utils/slugify"
|
||||
import { computedAsync } from "@vueuse/core"
|
||||
import { useTitle } from "@vueuse/core"
|
||||
import { computed, nextTick, ref, watch } from "vue"
|
||||
import { useRouter } from "vue-router"
|
||||
import { errorMessage } from "@/utils/notif"
|
||||
import { useResizeContainer } from "@/hooks/useResizeContainer.hook"
|
||||
import ThemeSwap from "@/components/ThemeSwap.vue"
|
||||
|
||||
import BackButton from "@/components/BackButton.vue"
|
||||
import SkeletonLoader from "@/components/SkeletonLoader.vue"
|
||||
import { useTitle } from "@vueuse/core"
|
||||
import StackedPublicNote from "@/components/StackedPublicNote.vue"
|
||||
import ThemeSwap from "@/components/ThemeSwap.vue"
|
||||
import { useATProtoLinks } from "@/hooks/useATProtoLinks.hook"
|
||||
import { markdownBuilder } from "@/hooks/useMarkdown.hook"
|
||||
import { useResizeContainer } from "@/hooks/useResizeContainer.hook"
|
||||
import { useRouteQueryStackedNotes } from "@/hooks/useRouteQueryStackedNotes.hook"
|
||||
import { getAuthor } from "@/modules/atproto/getAuthor"
|
||||
import { getUrl } from "@/modules/atproto/getUrl"
|
||||
import type { PublicNoteRecord } from "@/modules/atproto/publicNote.types"
|
||||
import { fromShortDid } from "@/modules/atproto/shortDid"
|
||||
import { withATProtoImages } from "@/modules/atproto/withATProtoImages"
|
||||
import { displayLanguage } from "@/utils/displayLanguage"
|
||||
import { downloadFont } from "@/utils/downloadFont"
|
||||
import { errorMessage } from "@/utils/notif"
|
||||
import { slugify } from "@/utils/slugify"
|
||||
|
||||
const props = defineProps<{ shortDid: string; rkey: string; slug?: string }>()
|
||||
const router = useRouter()
|
||||
@@ -29,7 +30,7 @@ const rkey = computed(() => props.rkey)
|
||||
const author = computedAsync(async () => getAuthor(did.value))
|
||||
const url = computedAsync(
|
||||
async () => getUrl({ did: did.value, rkey: rkey.value }),
|
||||
null,
|
||||
null
|
||||
)
|
||||
|
||||
const noteNotFound = ref(false)
|
||||
@@ -68,7 +69,7 @@ watch(noteRecord, () => {
|
||||
const root = document.documentElement
|
||||
root.style.setProperty(
|
||||
"--font-size",
|
||||
`${noteRecord.value.value.fontSize}pt`,
|
||||
`${noteRecord.value.value.fontSize}pt`
|
||||
)
|
||||
}
|
||||
})
|
||||
@@ -81,10 +82,10 @@ const content = computed(() =>
|
||||
? toHTML(
|
||||
withATProtoImages(noteRecord.value.value.content, {
|
||||
pds: author.value.pds,
|
||||
did: did.value,
|
||||
}),
|
||||
did: did.value
|
||||
})
|
||||
)
|
||||
: "",
|
||||
: ""
|
||||
)
|
||||
|
||||
const breadcrumb = computed(() =>
|
||||
@@ -92,7 +93,7 @@ const breadcrumb = computed(() =>
|
||||
? author.value?.handle
|
||||
? `${title.value} • ${author.value.handle}`
|
||||
: title.value
|
||||
: `Remanso`,
|
||||
: `Remanso`
|
||||
)
|
||||
|
||||
useTitle(breadcrumb)
|
||||
@@ -100,12 +101,12 @@ useTitle(breadcrumb)
|
||||
const publishedAt = computed(() =>
|
||||
noteRecord.value?.value.publishedAt
|
||||
? new Date(noteRecord.value?.value.publishedAt).toLocaleDateString()
|
||||
: null,
|
||||
: null
|
||||
)
|
||||
const language = computed(() =>
|
||||
noteRecord.value?.value.language
|
||||
? displayLanguage(noteRecord.value.value.language)
|
||||
: null,
|
||||
: null
|
||||
)
|
||||
|
||||
const mainNoteId = computed(() => `${props.shortDid}-${props.rkey}`)
|
||||
@@ -120,7 +121,7 @@ watch(
|
||||
await nextTick()
|
||||
listenToClick()
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import GoBack from '@/components/GoBack.vue'
|
||||
import { useGitHubLogin } from '@/hooks/useGitHubLogin.hook'
|
||||
import { useRepos } from '@/hooks/useRepos.hook'
|
||||
import { useRepoList } from '@/modules/repo/hooks/useRepoList.hook'
|
||||
import GoBack from "@/components/GoBack.vue"
|
||||
import { useGitHubLogin } from "@/hooks/useGitHubLogin.hook"
|
||||
import { useRepos } from "@/hooks/useRepos.hook"
|
||||
import { useRepoList } from "@/modules/repo/hooks/useRepoList.hook"
|
||||
|
||||
const { username } = useGitHubLogin()
|
||||
const { isReady } = useRepos()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
<script lang="ts" setup></script>
|
||||
|
||||
<template>
|
||||
<main class="space-cowboy content">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import FluxNote from '@/components/FluxNote.vue'
|
||||
import FlipCardList from '@/modules/card/components/FlipCardList.vue'
|
||||
import { useSpacedRepetitionCards } from '@/modules/card/hooks/useSpacedRepetitionCards'
|
||||
import FluxNote from "@/components/FluxNote.vue"
|
||||
import FlipCardList from "@/modules/card/components/FlipCardList.vue"
|
||||
import { useSpacedRepetitionCards } from "@/modules/card/hooks/useSpacedRepetitionCards"
|
||||
|
||||
defineProps<{
|
||||
user: string
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, defineAsyncComponent, nextTick, ref, watch } from "vue"
|
||||
import { useUserRepoStore } from "@/modules/repo/store/userRepo.store"
|
||||
|
||||
import { useCheckboxCommit } from "@/hooks/useCheckboxCommit.hook"
|
||||
import { markdownBuilder } from "@/hooks/useMarkdown.hook"
|
||||
import { queryFileContent } from "@/modules/repo/services/repo"
|
||||
import { useUserRepoStore } from "@/modules/repo/store/userRepo.store"
|
||||
import { decodeBase64ToUTF8 } from "@/utils/decodeBase64ToUTF8"
|
||||
|
||||
type Prop = {
|
||||
@@ -19,7 +20,7 @@ const repo = computed(() => props.repo)
|
||||
const store = useUserRepoStore()
|
||||
|
||||
const todoNote = computed(() =>
|
||||
store.files.find((file) => file.path?.endsWith("_todo/todo.md")),
|
||||
store.files.find((file) => file.path?.endsWith("_todo/todo.md"))
|
||||
)
|
||||
|
||||
const sha = computed(() => todoNote.value?.sha ?? "")
|
||||
@@ -36,7 +37,7 @@ const { pendingContent, syncContent, listenToCheckboxes, hasPendingChanges } =
|
||||
initialContent: "",
|
||||
initialSha: sha,
|
||||
containerSelector: ".todo-notes .note-display",
|
||||
debounceMs: 1000,
|
||||
debounceMs: 1000
|
||||
})
|
||||
|
||||
// Render pending content to HTML for display
|
||||
@@ -60,7 +61,7 @@ watch(
|
||||
syncContent(rawContent, newSha)
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
// Setup checkbox listeners when content renders
|
||||
@@ -70,7 +71,7 @@ watch(
|
||||
await nextTick()
|
||||
listenToCheckboxes()
|
||||
},
|
||||
{ immediate: true },
|
||||
{ immediate: true }
|
||||
)
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user