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} 应用配置不正确")