chore: update nuxt to 3.10.3 (#2610)
This commit is contained in:
parent
1fefb6e5b6
commit
55037f04cd
53 changed files with 3584 additions and 3766 deletions
|
@ -99,7 +99,7 @@ export function useStreaming(
|
|||
stream.value = cb(streamingClient.value)
|
||||
})
|
||||
|
||||
if (process.client && !process.test)
|
||||
if (import.meta.client && !process.test)
|
||||
useNuxtApp().$pageLifecycle.addFrozenListener(cleanup)
|
||||
|
||||
tryOnBeforeUnmount(() => isActive.value = false)
|
||||
|
|
|
@ -94,7 +94,7 @@ export function usePublish(options: {
|
|||
...(isGlitchEdition.value ? { 'content-type': 'text/markdown' } : {}),
|
||||
} as mastodon.rest.v1.CreateStatusParams
|
||||
|
||||
if (process.dev) {
|
||||
if (import.meta.dev) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.info({
|
||||
raw: draft.value.params.status,
|
||||
|
@ -249,7 +249,7 @@ export function useUploadMediaAttachment(draft: Ref<Draft>) {
|
|||
}
|
||||
|
||||
async function pickAttachments() {
|
||||
if (process.server)
|
||||
if (import.meta.server)
|
||||
return
|
||||
const mimeTypes = currentInstance.value!.configuration?.mediaAttachments.supportedMimeTypes
|
||||
const files = await fileOpen({
|
||||
|
|
|
@ -4,7 +4,7 @@ import { STORAGE_KEY_DRAFTS } from '~/constants'
|
|||
import type { Draft, DraftMap } from '~/types'
|
||||
import type { Mutable } from '~/types/utils'
|
||||
|
||||
export const currentUserDrafts = (process.server || process.test)
|
||||
export const currentUserDrafts = (import.meta.server || process.test)
|
||||
? computed<DraftMap>(() => ({}))
|
||||
: useUserLocalStorage<DraftMap>(STORAGE_KEY_DRAFTS, () => ({}))
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ export const supportedTranslationCodes = [
|
|||
export function getLanguageCode() {
|
||||
let code = 'en'
|
||||
const getCode = (code: string) => code.replace(/-.*$/, '')
|
||||
if (!process.server) {
|
||||
if (import.meta.client) {
|
||||
const { locale } = useI18n()
|
||||
code = getCode(locale.value ? locale.value : navigator.language)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue