mirror of https://github.com/msgbyte/tailchat
feat: 增加工具蛙插件
parent
fdedd4eef5
commit
8d539d2fa9
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -0,0 +1,10 @@
|
||||
{
|
||||
"label": "工具哇!",
|
||||
"name": "com.msgbyte.toolwa",
|
||||
"url": "/plugins/com.msgbyte.toolwa/index.js",
|
||||
"icon": "/plugins/com.msgbyte.toolwa/assets/icon.png",
|
||||
"version": "0.0.0",
|
||||
"author": "msgbyte",
|
||||
"description": "工具哇 —— 在线小工具",
|
||||
"requireRestart": false
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "@plugins/com.msgbyte.toolwa",
|
||||
"main": "src/index.tsx",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import { regCustomPanel } from '@capital/common';
|
||||
import { Webview } from '@capital/component';
|
||||
import React from 'react';
|
||||
import { Translate } from './translate';
|
||||
|
||||
const PLUGIN_NAME = 'com.msgbyte.toolwa';
|
||||
|
||||
regCustomPanel({
|
||||
name: `${PLUGIN_NAME}/personPanel`,
|
||||
position: 'personal',
|
||||
label: Translate.panelName,
|
||||
icon: 'openmoji:frog',
|
||||
render: () => (
|
||||
<Webview className="w-full h-full bg-white" url="https://toolwa.com/" />
|
||||
),
|
||||
});
|
@ -0,0 +1,5 @@
|
||||
import { localTrans } from '@capital/common';
|
||||
|
||||
export const Translate = {
|
||||
panelName: localTrans({ 'zh-CN': '工具哇!', 'en-US': 'Toolwa!' }),
|
||||
};
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./src",
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react",
|
||||
"paths": {
|
||||
"@capital/*": ["../../../src/plugin/*"],
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue