Compare commits

..

5 Commits

Author SHA1 Message Date
手瓜一十雪
feb84809ec fix: #761 2025-02-04 21:22:36 +08:00
bietiaop
a812c568e4 fix: 文件预览 2025-02-04 21:12:13 +08:00
bietiaop
11db25e355 fix: 文件预览 2025-02-04 21:08:28 +08:00
手瓜一十雪
ecd2fba629 fix: #762 2025-02-04 20:42:13 +08:00
Mlikiowa
a6763cf5a1 release: v4.5.5 2025-02-04 11:50:37 +00:00
7 changed files with 20 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "4.5.4",
"version": "4.5.5",
"icon": "./logo.png",
"authors": [
{

View File

@@ -45,6 +45,12 @@ export default function FilePreviewModal({
}
)
useEffect(() => {
if (filePath) {
run()
}
}, [filePath])
let contentElement = null
if (!supportedPreviewExts.includes(ext)) {
contentElement = <div></div>
@@ -68,12 +74,6 @@ export default function FilePreviewModal({
)
}
useEffect(() => {
if (filePath) {
run()
}
}, [])
return (
<Modal isOpen={isOpen} onClose={onClose} scrollBehavior="inside" size="3xl">
<ModalContent>

View File

@@ -58,6 +58,7 @@ export default function ImageNameButton({
run()
}
}, [])
return (
<Button
variant="light"
@@ -69,7 +70,12 @@ export default function ImageNameButton({
) : loading || !data ? (
<Spinner size="sm" />
) : (
<Image src={data} alt={name} className="w-8 h-8" radius="sm" />
<Image
src={data}
alt={name}
className="w-8 h-8 flex-shrink-0"
radius="sm"
/>
)
}
>

View File

@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "4.5.4",
"version": "4.5.5",
"scripts": {
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",

View File

@@ -1 +1 @@
export const napCatVersion = '4.5.4';
export const napCatVersion = '4.5.5';

View File

@@ -1,4 +1,4 @@
import { OB11EmitEventContent, OB11NetworkReloadType } from './index';
import { OB11EmitEventContent, OB11NetworkReloadType } from './index';
import express, { Express, NextFunction, Request, Response } from 'express';
import http from 'http';
import { NapCatCore } from '@/core';
@@ -60,7 +60,7 @@ export class OB11HttpServerAdapter extends IOB11NetworkAdapter<HttpServerConfig>
});
req.on('end', () => {
try {
req.body = json5.parse(rawData || '{}');
req.body = { ...json5.parse(rawData || '{}'), ...req.body };
next();
} catch {
return res.status(400).send('Invalid JSON');

View File

@@ -7,8 +7,8 @@ export const GetProxyHandler: RequestHandler = async (req, res) => {
if (url && typeof url === 'string') {
url = decodeURIComponent(url);
const responseText = await RequestUtil.HttpGetText(url);
res.send(sendSuccess(res, responseText));
return sendSuccess(res, responseText);
} else {
res.send(sendError(res, 'url参数不合法'));
return sendError(res, 'url参数不合法');
}
};