diff --git a/client/web/build/webpack.config.ts b/client/web/build/webpack.config.ts index 2786b091..e68edeb5 100644 --- a/client/web/build/webpack.config.ts +++ b/client/web/build/webpack.config.ts @@ -159,7 +159,7 @@ const config: Configuration = { publicPath: ASSET_PATH, }, devServer: { - open: true, + open: false, port: PORT, historyApiFallback: true, static: { diff --git a/client/web/plugins/com.msgbyte.snapdrop/manifest.json b/client/web/plugins/com.msgbyte.snapdrop/manifest.json index a0b7d4b4..81321cad 100644 --- a/client/web/plugins/com.msgbyte.snapdrop/manifest.json +++ b/client/web/plugins/com.msgbyte.snapdrop/manifest.json @@ -3,6 +3,7 @@ "name": "com.msgbyte.snapdrop", "url": "/plugins/com.msgbyte.snapdrop/index.js", "icon": "/plugins/com.msgbyte.snapdrop/assets/icon.png", + "documentUrl": "/plugins/com.msgbyte.snapdrop/README.md", "version": "0.0.0", "author": "msgbyte", "description": "隔空投送 —— 在同一网络发送文件与消息", diff --git a/client/web/plugins/com.msgbyte.toolwa/assets/icon.png b/client/web/plugins/com.msgbyte.toolwa/assets/icon.png new file mode 100644 index 00000000..40bf05b0 Binary files /dev/null and b/client/web/plugins/com.msgbyte.toolwa/assets/icon.png differ diff --git a/client/web/plugins/com.msgbyte.toolwa/manifest.json b/client/web/plugins/com.msgbyte.toolwa/manifest.json new file mode 100644 index 00000000..8f234480 --- /dev/null +++ b/client/web/plugins/com.msgbyte.toolwa/manifest.json @@ -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 +} diff --git a/client/web/plugins/com.msgbyte.toolwa/package.json b/client/web/plugins/com.msgbyte.toolwa/package.json new file mode 100644 index 00000000..24203a8c --- /dev/null +++ b/client/web/plugins/com.msgbyte.toolwa/package.json @@ -0,0 +1,8 @@ +{ + "name": "@plugins/com.msgbyte.toolwa", + "main": "src/index.tsx", + "version": "0.0.0", + "private": true, + "dependencies": { + } +} diff --git a/client/web/plugins/com.msgbyte.toolwa/src/index.tsx b/client/web/plugins/com.msgbyte.toolwa/src/index.tsx new file mode 100644 index 00000000..05b3ce50 --- /dev/null +++ b/client/web/plugins/com.msgbyte.toolwa/src/index.tsx @@ -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: () => ( + + ), +}); diff --git a/client/web/plugins/com.msgbyte.toolwa/src/translate.ts b/client/web/plugins/com.msgbyte.toolwa/src/translate.ts new file mode 100644 index 00000000..2e7f19b8 --- /dev/null +++ b/client/web/plugins/com.msgbyte.toolwa/src/translate.ts @@ -0,0 +1,5 @@ +import { localTrans } from '@capital/common'; + +export const Translate = { + panelName: localTrans({ 'zh-CN': '工具哇!', 'en-US': 'Toolwa!' }), +}; diff --git a/client/web/plugins/com.msgbyte.toolwa/tsconfig.json b/client/web/plugins/com.msgbyte.toolwa/tsconfig.json new file mode 100644 index 00000000..465a28b5 --- /dev/null +++ b/client/web/plugins/com.msgbyte.toolwa/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "baseUrl": "./src", + "esModuleInterop": true, + "jsx": "react", + "paths": { + "@capital/*": ["../../../src/plugin/*"], + } + } +} diff --git a/client/web/registry.json b/client/web/registry.json index 5ee47031..ca98f539 100644 --- a/client/web/registry.json +++ b/client/web/registry.json @@ -51,6 +51,7 @@ "name": "com.msgbyte.snapdrop", "url": "/plugins/com.msgbyte.snapdrop/index.js", "icon": "/plugins/com.msgbyte.snapdrop/assets/icon.png", + "documentUrl": "/plugins/com.msgbyte.snapdrop/README.md", "version": "0.0.0", "author": "msgbyte", "description": "隔空投送 —— 在同一网络发送文件与消息", @@ -113,5 +114,15 @@ "author": "moonrailgun", "description": "在聊天输入框快捷打开 wormhole 以支持传输文件", "requireRestart": true + }, + { + "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 } ]