mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-11 03:18:29 +08:00
✨ WebUI 中,允许查看 Cookie 的 content
This commit is contained in:
@@ -76,11 +76,17 @@ function CookieEditModal({ visible, setVisible, cookie }: CookieEditModalProps)
|
||||
<Input disabled value={cookie.id.toString()} />
|
||||
</FormItem>
|
||||
<FormItem label="Cookie 名称">
|
||||
<Input value={cookie.friendly_name} disabled />
|
||||
<Input value={cookie.cookie_name} disabled />
|
||||
</FormItem>
|
||||
<FormItem label="所属站点">
|
||||
<Input value={cookie.site_name} disabled />
|
||||
</FormItem>
|
||||
<FormItem label="内容">
|
||||
<Input.TextArea
|
||||
value={cookie.content}
|
||||
disabled
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="标签">
|
||||
<Input.TextArea
|
||||
|
||||
@@ -37,19 +37,7 @@ export default function CookieManager() {
|
||||
setShowEditModal(true);
|
||||
};
|
||||
|
||||
let data = [
|
||||
{
|
||||
id: 3,
|
||||
site_name: 'rss',
|
||||
friendly_name: 'rss [{"ewqe":"e]',
|
||||
last_usage: '1970-01-01T00:00:00',
|
||||
status: '',
|
||||
cd_milliseconds: 10000,
|
||||
is_universal: false,
|
||||
is_anonymous: false,
|
||||
tags: {},
|
||||
},
|
||||
];
|
||||
let data = [];
|
||||
if (siteName) {
|
||||
data = cookiesList.filter((tSite) => tSite.site_name === siteName);
|
||||
}
|
||||
@@ -61,7 +49,7 @@ export default function CookieManager() {
|
||||
},
|
||||
{
|
||||
title: 'Cookie 名称',
|
||||
dataIndex: 'friendly_name',
|
||||
dataIndex: 'cookie_name',
|
||||
},
|
||||
{
|
||||
title: '所属站点',
|
||||
@@ -84,7 +72,7 @@ export default function CookieManager() {
|
||||
render: (_: null, record: Cookie) => (
|
||||
<Space size="small">
|
||||
<Popconfirm
|
||||
title={`确定删除 Cookie ${record.friendly_name} ?`}
|
||||
title={`确定删除 Cookie ${record.cookie_name} ?`}
|
||||
onOk={handleDelCookie(record.id.toString())}
|
||||
>
|
||||
<span className="list-actions-icon">
|
||||
|
||||
@@ -91,7 +91,8 @@ export interface Target {
|
||||
export interface Cookie {
|
||||
id: number;
|
||||
site_name: string;
|
||||
friendly_name: string;
|
||||
content: string;
|
||||
cookie_name: string;
|
||||
last_usage: Date;
|
||||
status: string;
|
||||
cd_milliseconds: number;
|
||||
|
||||
Reference in New Issue
Block a user