1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-16 13:59:59 +00:00

fix: upgrade & downupgrade deps

This commit is contained in:
三咲智子 Kevin Deng 2023-01-25 02:52:48 +08:00
parent d7bba4dbc9
commit 7545921385
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
11 changed files with 991 additions and 798 deletions

View file

@ -1,11 +1,13 @@
<script setup lang="ts">
import type { CommonRouteTabOption } from '../common/CommonRouteTabs.vue'
const { t } = useI18n()
const route = useRoute()
const server = $(computedEager(() => route.params.server as string))
const account = $(computedEager(() => route.params.account as string))
const tabs = $computed(() => [
const tabs = $computed<CommonRouteTabOption[]>(() => [
{
name: 'account-index',
to: {
@ -33,7 +35,7 @@ const tabs = $computed(() => [
display: t('tab.media'),
icon: 'i-ri:camera-2-line',
},
] as const)
])
</script>
<template>

View file

@ -1,14 +1,15 @@
<script setup lang="ts">
import type { RouteLocationRaw } from 'vue-router'
const { options, command, replace, preventScrollTop = false } = $defineProps<{
options: {
export interface CommonRouteTabOption {
to: RouteLocationRaw
display: string
disabled?: boolean
name?: string
icon?: string
}[]
}
const { options, command, replace, preventScrollTop = false } = $defineProps<{
options: CommonRouteTabOption[]
command?: boolean
replace?: boolean
preventScrollTop?: boolean

View file

@ -19,9 +19,9 @@ const totalTrend = $computed(() =>
<span>
{{ hashtag.name }}
</span>
<CommonTrending :history="hashtag.history" text-xs text-secondary truncate />
<CommonTrending v-if="hashtag.history" :history="hashtag.history" text-xs text-secondary truncate />
</div>
<div v-if="totalTrend" absolute left-15 right-0 top-0 bottom-4 op35 flex place-items-center place-content-center ml-auto>
<div v-if="totalTrend && hashtag.history" absolute left-15 right-0 top-0 bottom-4 op35 flex place-items-center place-content-center ml-auto>
<CommonTrendingCharts
:history="hashtag.history" :width="150" :height="20"
text-xs text-secondary h-full w-full

View file

@ -42,9 +42,9 @@ function go(evt: MouseEvent | KeyboardEvent) {
<span>#</span>
<span hover:underline>{{ tag.name }}</span>
</h4>
<CommonTrending :history="tag.history" text-sm text-secondary line-clamp-1 ws-pre-wrap break-all />
<CommonTrending v-if="tag.history" :history="tag.history" text-sm text-secondary line-clamp-1 ws-pre-wrap break-all />
</div>
<div flex items-center>
<div v-if="tag.history" flex items-center>
<CommonTrendingCharts :history="tag.history" />
</div>
</div>

View file

@ -9,7 +9,7 @@
"preview": "nuxi preview"
},
"devDependencies": {
"@nuxt-themes/docus": "^1.4.4",
"@nuxt-themes/docus": "^1.4.7",
"nuxt": "^3.1.0"
}
}

View file

@ -56,7 +56,6 @@ export default defineNuxtModule<VitePWANuxtOptions>({
Object.keys(webmanifests!).map(wm => [wm, `manifest-${wm}.webmanifest`]).forEach(([wm, fileName]) => {
bundle[fileName] = {
isAsset: true,
type: 'asset',
name: undefined,
source: generateManifest(wm),

View file

@ -4,6 +4,7 @@ import {
defineLazyEventHandler,
toNodeListener,
} from 'h3'
import type { FetchResponse } from 'ofetch'
import { createFetch } from 'ofetch'
import {
createCall,
@ -64,7 +65,7 @@ export default defineNuxtPlugin(async () => {
const route = useRoute()
if (route.path.startsWith('/api')) {
const result = await $fetch.raw(route.fullPath)
const result = (await ($fetch.raw as any)(route.fullPath)) as FetchResponse<unknown>
if (result.headers.get('location'))
location.href = result.headers.get('location')!
}

View file

@ -28,7 +28,7 @@
"dependencies": {
"@fnando/sparkline": "^0.3.10",
"@iconify-emoji/twemoji": "^1.0.2",
"@iconify/utils": "^2.0.11",
"@iconify/utils": "^2.0.12",
"@tiptap/extension-character-count": "2.0.0-beta.204",
"@tiptap/extension-code-block": "2.0.0-beta.204",
"@tiptap/extension-history": "2.0.0-beta.204",
@ -65,21 +65,21 @@
"tippy.js": "^6.3.7",
"ufo": "^1.0.1",
"ultrahtml": "^1.2.0",
"vue-advanced-cropper": "^2.8.6",
"vue-advanced-cropper": "^2.8.8",
"vue-virtual-scroller": "2.0.0-beta.7"
},
"devDependencies": {
"@antfu/eslint-config": "^0.34.1",
"@antfu/ni": "^0.19.0",
"@emoji-mart/data": "^1.1.1",
"@iconify-json/carbon": "^1.1.13",
"@emoji-mart/data": "^1.1.2",
"@iconify-json/carbon": "^1.1.14",
"@iconify-json/logos": "^1.1.22",
"@iconify-json/material-symbols": "^1.1.26",
"@iconify-json/ph": "^1.1.3",
"@iconify-json/ri": "^1.1.4",
"@iconify-json/twemoji": "^1.1.10",
"@nuxtjs/color-mode": "^3.2.0",
"@nuxtjs/i18n": "^8.0.0-beta.8",
"@nuxtjs/i18n": "8.0.0-beta.8",
"@pinia/nuxt": "^0.4.6",
"@types/chroma-js": "^2.1.4",
"@types/file-saver": "^2.0.5",
@ -89,24 +89,24 @@
"@types/prettier": "^2.7.2",
"@types/wicg-file-system-access": "^2020.9.5",
"@unocss/nuxt": "^0.48.5",
"@vue-macros/nuxt": "^0.3.2",
"@vue-macros/nuxt": "^0.2.16",
"@vueuse/math": "^9.11.1",
"@vueuse/nuxt": "^9.11.1",
"bumpp": "^8.2.1",
"chroma-js": "^2.4.2",
"emoji-mart": "^5.4.0",
"emoji-mart": "^5.5.2",
"eslint": "^8.32.0",
"esno": "^0.16.3",
"file-saver": "^2.0.5",
"fs-extra": "^11.1.0",
"jsdom": "^21.1.0",
"lint-staged": "^13.1.0",
"nuxt": "^3.1.0",
"nuxt-security": "^0.10.0",
"nuxt": "3.0.0",
"nuxt-security": "^0.10.1",
"postcss-nested": "^6.0.0",
"prettier": "^2.8.3",
"rollup-plugin-node-polyfills": "^0.2.1",
"simple-git": "^3.15.1",
"simple-git": "^3.16.0",
"simple-git-hooks": "^2.8.1",
"stale-dep": "^0.3.1",
"std-env": "^3.3.1",

View file

@ -1,7 +1,9 @@
<script setup lang="ts">
import type { CommonRouteTabOption } from '~/components/common/CommonRouteTabs.vue'
const { t } = useI18n()
const tabs = $computed(() => [
const tabs = $computed<CommonRouteTabOption[]>(() => [
{
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
display: isHydrated.value ? t('tab.posts') : '',
@ -20,7 +22,7 @@ const tabs = $computed(() => [
display: isHydrated.value ? t('tab.for_you') : '',
disabled: !isHydrated.value || !currentUser.value,
},
] as const)
])
</script>
<template>

View file

@ -1,4 +1,6 @@
<script setup lang="ts">
import type { CommonRouteTabOption } from '~/components/common/CommonRouteTabs.vue'
definePageMeta({
middleware: 'auth',
})
@ -6,7 +8,7 @@ definePageMeta({
const { t } = useI18n()
const pwaEnabled = useRuntimeConfig().public.pwaEnabled
const tabs = $computed(() => [
const tabs = $computed<CommonRouteTabOption[]>(() => [
{
name: 'all',
to: '/notifications',
@ -17,7 +19,7 @@ const tabs = $computed(() => [
to: '/notifications/mention',
display: isHydrated.value ? t('tab.notifications_mention') : '',
},
] as const)
])
</script>
<template>

File diff suppressed because it is too large Load diff