diff --git a/src/main/modules/userApi/renderer/preload.js b/src/main/modules/userApi/renderer/preload.js index f0b0793e..253914af 100644 --- a/src/main/modules/userApi/renderer/preload.js +++ b/src/main/modules/userApi/renderer/preload.js @@ -66,6 +66,7 @@ const handleRequest = (context, { requestKey, data }) => { * * @param {*} context * @param {*} info { + * openDevTools: false, * status: true, * message: 'xxx', * sources: { diff --git a/src/main/modules/userApi/utils/index.js b/src/main/modules/userApi/utils/index.js index 3e0f9256..27aa183e 100644 --- a/src/main/modules/userApi/utils/index.js +++ b/src/main/modules/userApi/utils/index.js @@ -19,9 +19,9 @@ exports.importApi = script => { let name = scriptInfo[1] || '' let description = scriptInfo[2] || '' name = name.startsWith(' * @name ') ? name.replace(' * @name ', '').trim() : `user_api_${new Date().toLocaleString()}` - if (name.length > 10) name = name.substring(0, 10) + '...' + if (name.length > 24) name = name.substring(0, 24) + '...' description = description.startsWith(' * @description ') ? description.replace(' * @description ', '').trim() : '' - if (description.length > 20) description = description.substring(0, 20) + '...' + if (description.length > 36) description = description.substring(0, 36) + '...' const apiInfo = { id: `user_api_${Math.random().toString().substring(2, 5)}_${Date.now()}`, name,