mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { Loadable, regGroupPanel } from '@capital/common';
|
|
import { Translate } from './translate';
|
|
|
|
const PLUGIN_NAME = 'com.msgbyte.webview';
|
|
|
|
regGroupPanel({
|
|
name: `${PLUGIN_NAME}/grouppanel`,
|
|
label: Translate.webpanel,
|
|
provider: PLUGIN_NAME,
|
|
extraFormMeta: [
|
|
{
|
|
type: 'text',
|
|
name: 'url',
|
|
label: Translate.website,
|
|
},
|
|
],
|
|
render: Loadable(() => import('./group/GroupWebPanelRender')),
|
|
menus: [
|
|
{
|
|
name: 'openInNewWindow',
|
|
label: Translate.openInExtra,
|
|
icon: 'mdi:web',
|
|
onClick: (panelInfo) => {
|
|
if (panelInfo.meta?.url) {
|
|
window.open(String(panelInfo.meta?.url));
|
|
}
|
|
},
|
|
},
|
|
],
|
|
});
|
|
|
|
regGroupPanel({
|
|
name: `${PLUGIN_NAME}/customwebpanel`,
|
|
label: Translate.customwebpanel,
|
|
provider: PLUGIN_NAME,
|
|
extraFormMeta: [
|
|
{
|
|
type: 'textarea',
|
|
name: 'html',
|
|
label: Translate.htmlcode,
|
|
placeholder: Translate.customwebpanelPlaceholder,
|
|
},
|
|
],
|
|
render: Loadable(() => import('./group/GroupCustomWebPanelRender'), {
|
|
componentName: 'com.msgbyte.webview:GroupCustomWebPanelRender',
|
|
}),
|
|
});
|