From 9bee36461034469707074ef4955e4942c9db2521 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 20 Jul 2022 11:11:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0snapdrop=E6=8F=92?= =?UTF-8?q?=E4=BB=B6,=20=E7=94=A8=E4=BA=8E=E9=9A=94=E7=A9=BA=E6=8A=95?= =?UTF-8?q?=E9=80=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/plugins/com.msgbyte.miaolang/manifest.json | 2 +- web/plugins/com.msgbyte.snapdrop/README.md | 9 +++++++++ web/plugins/com.msgbyte.snapdrop/manifest.json | 10 ++++++++++ web/plugins/com.msgbyte.snapdrop/package.json | 8 ++++++++ web/plugins/com.msgbyte.snapdrop/src/index.tsx | 15 +++++++++++++++ .../com.msgbyte.snapdrop/src/translate.ts | 5 +++++ web/plugins/com.msgbyte.snapdrop/tsconfig.json | 10 ++++++++++ .../com.msgbyte.theme.genshin/manifest.json | 2 +- web/plugins/com.msgbyte.theme.miku/manifest.json | 2 +- web/registry.json | 16 +++++++++++++--- 10 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 web/plugins/com.msgbyte.snapdrop/README.md create mode 100644 web/plugins/com.msgbyte.snapdrop/manifest.json create mode 100644 web/plugins/com.msgbyte.snapdrop/package.json create mode 100644 web/plugins/com.msgbyte.snapdrop/src/index.tsx create mode 100644 web/plugins/com.msgbyte.snapdrop/src/translate.ts create mode 100644 web/plugins/com.msgbyte.snapdrop/tsconfig.json diff --git a/web/plugins/com.msgbyte.miaolang/manifest.json b/web/plugins/com.msgbyte.miaolang/manifest.json index 9d2e1f48..a24e373a 100644 --- a/web/plugins/com.msgbyte.miaolang/manifest.json +++ b/web/plugins/com.msgbyte.miaolang/manifest.json @@ -6,5 +6,5 @@ "author": "msgbyte", "description": "为聊天提供喵语言对话功能", "documentUrl": "/plugins/com.msgbyte.miaolang/README.md", - "requireRestart": true + "requireRestart": false } diff --git a/web/plugins/com.msgbyte.snapdrop/README.md b/web/plugins/com.msgbyte.snapdrop/README.md new file mode 100644 index 00000000..7d7b5ef4 --- /dev/null +++ b/web/plugins/com.msgbyte.snapdrop/README.md @@ -0,0 +1,9 @@ +## com.msgbyte.snapdrop + +为 `Tailchat` 增加 局域网文件互传的功能 + +Powered by [snapdrop](https://github.com/RobinLinus/snapdrop.git) + +### 使用方式 + +仅需要在同一网络下两个设备均打开 [我 -> 隔空投送] 面板,单击或长按即可发送 diff --git a/web/plugins/com.msgbyte.snapdrop/manifest.json b/web/plugins/com.msgbyte.snapdrop/manifest.json new file mode 100644 index 00000000..2b344337 --- /dev/null +++ b/web/plugins/com.msgbyte.snapdrop/manifest.json @@ -0,0 +1,10 @@ +{ + "label": "隔空投送", + "name": "com.msgbyte.snapdrop", + "url": "/plugins/com.msgbyte.snapdrop/index.js", + "version": "0.0.0", + "author": "msgbyte", + "description": "隔空投送 —— 在同一网络发送文件与消息", + "documentUrl": "/plugins/com.msgbyte.webview/README.md", + "requireRestart": false +} diff --git a/web/plugins/com.msgbyte.snapdrop/package.json b/web/plugins/com.msgbyte.snapdrop/package.json new file mode 100644 index 00000000..cdf75f5b --- /dev/null +++ b/web/plugins/com.msgbyte.snapdrop/package.json @@ -0,0 +1,8 @@ +{ + "name": "@plugins/com.msgbyte.snapdrop", + "main": "src/index.tsx", + "version": "0.0.0", + "private": true, + "dependencies": { + } +} diff --git a/web/plugins/com.msgbyte.snapdrop/src/index.tsx b/web/plugins/com.msgbyte.snapdrop/src/index.tsx new file mode 100644 index 00000000..3b7b06ba --- /dev/null +++ b/web/plugins/com.msgbyte.snapdrop/src/index.tsx @@ -0,0 +1,15 @@ +import { regCustomPanel } from '@capital/common'; +import React from 'react'; +import { Translate } from './translate'; + +const PLUGIN_NAME = 'com.msgbyte.snapdrop'; + +regCustomPanel({ + name: `${PLUGIN_NAME}/personPanel`, + position: 'personal', + label: Translate.panelName, + icon: 'mdi:radio-tower', + render: () => ( +