From 6b998704917b2bc933962a6f846d5029b1256a4c Mon Sep 17 00:00:00 2001 From: thsrite Date: Wed, 29 Nov 2023 14:16:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=B6=88=E6=81=AF=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E9=85=8D=E7=BD=AE=E5=8F=AF=E5=8A=A0=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- plugins/messageforward/__init__.py | 30 +++++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c4e4ba9..80b1131 100644 --- a/package.json +++ b/package.json @@ -182,7 +182,7 @@ "MessageForward": { "name": "消息转发", "description": "根据正则转发通知到其他WeChat应用。", - "version": "1.0", + "version": "1.1", "icon": "forward.png", "color": "#32ABD1", "author": "thsrite", diff --git a/plugins/messageforward/__init__.py b/plugins/messageforward/__init__.py index 333d0da..7a6b940 100644 --- a/plugins/messageforward/__init__.py +++ b/plugins/messageforward/__init__.py @@ -19,7 +19,7 @@ class MessageForward(_PluginBase): # 插件图标 plugin_icon = "forward.png" # 插件版本 - plugin_version = "1.0" + plugin_version = "1.1" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -104,7 +104,7 @@ class MessageForward(_PluginBase): 'component': 'VTextarea', 'props': { 'model': 'wechat', - 'rows': '3', + 'rows': '5', 'label': '应用配置', 'placeholder': 'appid:corpid:appsecret(一行一个配置)' } @@ -126,7 +126,7 @@ class MessageForward(_PluginBase): 'component': 'VTextarea', 'props': { 'model': 'pattern', - 'rows': '3', + 'rows': '6', 'label': '正则配置', 'placeholder': '对应上方应用配置,一行一个,一一对应' } @@ -155,6 +155,28 @@ class MessageForward(_PluginBase): ] } ] + }, + { + 'component': 'VRow', + 'content': [ + { + 'component': 'VCol', + 'props': { + 'cols': 12, + }, + 'content': [ + { + 'component': 'VAlert', + 'props': { + 'type': 'info', + 'variant': 'tonal', + 'text': '应用配置可加注释:' + 'appid:corpid:appsecret#站点通知' + } + } + ] + } + ] } ] } @@ -209,6 +231,8 @@ class MessageForward(_PluginBase): # 解析配置 wechats = self._wechat.split("\n") for index, wechat in enumerate(wechats): + # 排除注释 + wechat = wechat.split("#")[0] wechat_config = wechat.split(":") if len(wechat_config) != 3: logger.error(f"{wechat} 应用配置不正确")