diff --git a/client/packages/design/components/WebMetaForm/types/Checkbox.tsx b/client/packages/design/components/WebMetaForm/types/Checkbox.tsx
index 1fe4470a..ba7501f3 100644
--- a/client/packages/design/components/WebMetaForm/types/Checkbox.tsx
+++ b/client/packages/design/components/WebMetaForm/types/Checkbox.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from 'react';
+import React from 'react';
import { Form, Checkbox } from 'antd';
import type { FastifyFormFieldComponent } from 'react-fastify-form';
import { getValidateStatus } from '../utils';
diff --git a/client/web/plugins/com.msgbyte.webview/src/group/GroupWebPanelRender.tsx b/client/web/plugins/com.msgbyte.webview/src/group/GroupWebPanelRender.tsx
index 2aff8fb3..71c7d9b7 100644
--- a/client/web/plugins/com.msgbyte.webview/src/group/GroupWebPanelRender.tsx
+++ b/client/web/plugins/com.msgbyte.webview/src/group/GroupWebPanelRender.tsx
@@ -20,10 +20,15 @@ const GroupWebPanelRender: React.FC<{ panelInfo: any }> = (props) => {
// 不包含协议, 但是是个网址
url = 'https://' + url;
}
+ const background = panelInfo?.meta?.background ?? false;
return (
-
+
);
};
diff --git a/client/web/plugins/com.msgbyte.webview/src/index.tsx b/client/web/plugins/com.msgbyte.webview/src/index.tsx
index 19e46222..b84dc89f 100644
--- a/client/web/plugins/com.msgbyte.webview/src/index.tsx
+++ b/client/web/plugins/com.msgbyte.webview/src/index.tsx
@@ -13,6 +13,11 @@ regGroupPanel({
name: 'url',
label: Translate.website,
},
+ {
+ type: 'checkbox',
+ name: 'background',
+ label: Translate.addBackground,
+ },
],
render: Loadable(() => import('./group/GroupWebPanelRender')),
menus: [
diff --git a/client/web/plugins/com.msgbyte.webview/src/translate.ts b/client/web/plugins/com.msgbyte.webview/src/translate.ts
index 77c3a231..019f0178 100644
--- a/client/web/plugins/com.msgbyte.webview/src/translate.ts
+++ b/client/web/plugins/com.msgbyte.webview/src/translate.ts
@@ -14,6 +14,10 @@ export const Translate = {
'zh-CN': '网址',
'en-US': 'Website',
}),
+ addBackground: localTrans({
+ 'zh-CN': '添加背景色',
+ 'en-US': 'Add Background Color',
+ }),
htmlcode: localTrans({
'zh-CN': 'HTML代码',
'en-US': 'HTML Code',
diff --git a/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx b/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx
index 141a1850..9e55b938 100644
--- a/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx
+++ b/client/web/src/components/modals/GroupPanel/ModifyGroupPanel.tsx
@@ -56,7 +56,7 @@ export const ModalModifyGroupPanel: React.FC<{
}
return (
-
+
f.type !== 'type')} // 变更时不显示类型
diff --git a/packages/types/src/model/group.ts b/packages/types/src/model/group.ts
index bde3b690..1d7f60d6 100644
--- a/packages/types/src/model/group.ts
+++ b/packages/types/src/model/group.ts
@@ -64,7 +64,7 @@ export interface GroupPanel {
/**
* 面板的其他数据
*/
- meta?: object;
+ meta?: Record;
/**
* 身份组或者用户的权限