fix update issues
This commit is contained in:
parent
d7dea68f05
commit
0684f04546
5 changed files with 21 additions and 24 deletions
|
@ -81,15 +81,17 @@ export default function CustomEmbedLinkMenu({
|
|||
{t('Customise direct link')}
|
||||
</Dialog.Title>
|
||||
<Dialog.Description as="p" className="py-2 opacity-80">
|
||||
{t('Change the raw file direct link to a URL ending with the extension of the file.')}{' '}
|
||||
<a
|
||||
href="https://ovi.swo.moe/docs/features/customise-direct-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-400 underline"
|
||||
>
|
||||
{t('What is this?')}
|
||||
</a>
|
||||
<>
|
||||
{t('Change the raw file direct link to a URL ending with the extension of the file.')}{' '}
|
||||
<a
|
||||
href="https://ovi.swo.moe/docs/features/customise-direct-link"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-400 underline"
|
||||
>
|
||||
{t('What is this?')}
|
||||
</a>
|
||||
</>
|
||||
</Dialog.Description>
|
||||
|
||||
<div className="mt-4">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { FC, CSSProperties, ReactNode } from 'react'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import gfm from 'remark-gfm'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import remarkMath from 'remark-math'
|
||||
import rehypeKatex from 'rehype-katex'
|
||||
import rehypeRaw from 'rehype-raw'
|
||||
|
@ -120,7 +120,8 @@ const MarkdownPreview: FC<{
|
|||
<div className="markdown-body">
|
||||
{/* Using rehypeRaw to render HTML inside Markdown is potentially dangerous, use under safe environments. (#18) */}
|
||||
<ReactMarkdown
|
||||
remarkPlugins={[gfm, remarkMath]}
|
||||
// @ts-ignore
|
||||
remarkPlugins={[remarkGfm, remarkMath]}
|
||||
// The type error is introduced by caniuse-lite upgrade.
|
||||
// Since type errors occur often in remark toolchain and the use is so common,
|
||||
// ignoring it shoudld be safe enough.
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
"devDependencies": {
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/crypto-js": "^4.0.2",
|
||||
"@types/ioredis": "^4.28.5",
|
||||
"@types/node": "18.8.3",
|
||||
"@types/react": "18.0.21",
|
||||
"@types/react-copy-to-clipboard": "^5.0.4",
|
||||
"@types/react-dom": "^18.0.6",
|
||||
|
|
|
@ -10,7 +10,7 @@ specifiers:
|
|||
'@tailwindcss/line-clamp': ^0.4.2
|
||||
'@types/cors': ^2.8.12
|
||||
'@types/crypto-js': ^4.0.2
|
||||
'@types/ioredis': ^4.28.5
|
||||
'@types/node': 18.8.3
|
||||
'@types/react': 18.0.21
|
||||
'@types/react-copy-to-clipboard': ^5.0.4
|
||||
'@types/react-dom': ^18.0.6
|
||||
|
@ -107,7 +107,7 @@ dependencies:
|
|||
devDependencies:
|
||||
'@types/cors': 2.8.12
|
||||
'@types/crypto-js': 4.1.1
|
||||
'@types/ioredis': 4.28.10
|
||||
'@types/node': 18.8.3
|
||||
'@types/react': 18.0.21
|
||||
'@types/react-copy-to-clipboard': 5.0.4
|
||||
'@types/react-dom': 18.0.6
|
||||
|
@ -439,12 +439,6 @@ packages:
|
|||
hoist-non-react-statics: 3.3.2
|
||||
dev: false
|
||||
|
||||
/@types/ioredis/4.28.10:
|
||||
resolution: {integrity: sha512-69LyhUgrXdgcNDv7ogs1qXZomnfOEnSmrmMFqKgt1XMJxmoOSG/u3wYy13yACIfKuMJ8IhKgHafDO3sx19zVQQ==}
|
||||
dependencies:
|
||||
'@types/node': 18.0.6
|
||||
dev: true
|
||||
|
||||
/@types/json5/0.0.29:
|
||||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||
dev: true
|
||||
|
@ -474,8 +468,8 @@ packages:
|
|||
resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==}
|
||||
dev: false
|
||||
|
||||
/@types/node/18.0.6:
|
||||
resolution: {integrity: sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==}
|
||||
/@types/node/18.8.3:
|
||||
resolution: {integrity: sha512-0os9vz6BpGwxGe9LOhgP/ncvYN5Tx1fNcd2TM3rD/aCGBkysb+ZWpXEocG24h6ZzOi13+VB8HndAQFezsSOw1w==}
|
||||
dev: true
|
||||
|
||||
/@types/parse5/6.0.3:
|
||||
|
|
|
@ -3,7 +3,7 @@ import siteConfig from '../config/site.config'
|
|||
|
||||
// Persistent key-value store is provided by Redis, hosted on Upstash
|
||||
// https://vercel.com/integrations/upstash
|
||||
const kv = new Redis(process.env.REDIS_URL)
|
||||
const kv = new Redis(process.env.REDIS_URL || '')
|
||||
|
||||
export async function getOdAuthTokens(): Promise<{ accessToken: unknown; refreshToken: unknown }> {
|
||||
const accessToken = await kv.get(`${siteConfig.kvPrefix}access_token`)
|
||||
|
@ -24,6 +24,6 @@ export async function storeOdAuthTokens({
|
|||
accessTokenExpiry: number
|
||||
refreshToken: string
|
||||
}): Promise<void> {
|
||||
await kv.set(`${siteConfig.kvPrefix}access_token`, accessToken, 'ex', accessTokenExpiry)
|
||||
await kv.set(`${siteConfig.kvPrefix}access_token`, accessToken, 'EX', accessTokenExpiry)
|
||||
await kv.set(`${siteConfig.kvPrefix}refresh_token`, refreshToken)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue