mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
feb84809ec | ||
![]() |
a812c568e4 | ||
![]() |
11db25e355 | ||
![]() |
ecd2fba629 | ||
![]() |
a6763cf5a1 | ||
![]() |
c9e91a9b94 | ||
![]() |
43fb62c5bd |
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.5.3",
|
"version": "4.5.5",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@@ -45,6 +45,12 @@ export default function FilePreviewModal({
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (filePath) {
|
||||||
|
run()
|
||||||
|
}
|
||||||
|
}, [filePath])
|
||||||
|
|
||||||
let contentElement = null
|
let contentElement = null
|
||||||
if (!supportedPreviewExts.includes(ext)) {
|
if (!supportedPreviewExts.includes(ext)) {
|
||||||
contentElement = <div>暂不支持预览此文件类型</div>
|
contentElement = <div>暂不支持预览此文件类型</div>
|
||||||
@@ -68,12 +74,6 @@ export default function FilePreviewModal({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (filePath) {
|
|
||||||
run()
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={isOpen} onClose={onClose} scrollBehavior="inside" size="3xl">
|
<Modal isOpen={isOpen} onClose={onClose} scrollBehavior="inside" size="3xl">
|
||||||
<ModalContent>
|
<ModalContent>
|
||||||
|
@@ -58,6 +58,7 @@ export default function ImageNameButton({
|
|||||||
run()
|
run()
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
variant="light"
|
variant="light"
|
||||||
@@ -69,7 +70,12 @@ export default function ImageNameButton({
|
|||||||
) : loading || !data ? (
|
) : loading || !data ? (
|
||||||
<Spinner size="sm" />
|
<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"
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
@@ -20,7 +20,7 @@ const WebsocketServerForm: React.FC<WebsocketServerFormProps> = ({
|
|||||||
enable: false,
|
enable: false,
|
||||||
name: '',
|
name: '',
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 3000,
|
port: 3001,
|
||||||
reportSelfMessage: false,
|
reportSelfMessage: false,
|
||||||
enableForcePushEvent: true,
|
enableForcePushEvent: true,
|
||||||
messagePostFormat: 'array',
|
messagePostFormat: 'array',
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.5.3",
|
"version": "4.5.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
||||||
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '4.5.3';
|
export const napCatVersion = '4.5.5';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { OB11EmitEventContent, OB11NetworkReloadType } from './index';
|
import { OB11EmitEventContent, OB11NetworkReloadType } from './index';
|
||||||
import express, { Express, NextFunction, Request, Response } from 'express';
|
import express, { Express, NextFunction, Request, Response } from 'express';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import { NapCatCore } from '@/core';
|
import { NapCatCore } from '@/core';
|
||||||
@@ -60,7 +60,7 @@ export class OB11HttpServerAdapter extends IOB11NetworkAdapter<HttpServerConfig>
|
|||||||
});
|
});
|
||||||
req.on('end', () => {
|
req.on('end', () => {
|
||||||
try {
|
try {
|
||||||
req.body = json5.parse(rawData || '{}');
|
req.body = { ...json5.parse(rawData || '{}'), ...req.body };
|
||||||
next();
|
next();
|
||||||
} catch {
|
} catch {
|
||||||
return res.status(400).send('Invalid JSON');
|
return res.status(400).send('Invalid JSON');
|
||||||
|
@@ -7,8 +7,8 @@ export const GetProxyHandler: RequestHandler = async (req, res) => {
|
|||||||
if (url && typeof url === 'string') {
|
if (url && typeof url === 'string') {
|
||||||
url = decodeURIComponent(url);
|
url = decodeURIComponent(url);
|
||||||
const responseText = await RequestUtil.HttpGetText(url);
|
const responseText = await RequestUtil.HttpGetText(url);
|
||||||
res.send(sendSuccess(res, responseText));
|
return sendSuccess(res, responseText);
|
||||||
} else {
|
} else {
|
||||||
res.send(sendError(res, 'url参数不合法'));
|
return sendError(res, 'url参数不合法');
|
||||||
}
|
}
|
||||||
};
|
};
|
Reference in New Issue
Block a user