Merge branch 'main' into next

This commit is contained in:
GitHub Actions Bot 2024-09-07 09:02:44 +00:00
commit 1a7e835fd9
3 changed files with 21 additions and 4 deletions

View File

@ -838,5 +838,7 @@
"Open in new window": "Open in new window", "Open in new window": "Open in new window",
"Sorry, the page you visited does not exist.": "Sorry, the page you visited does not exist.", "Sorry, the page you visited does not exist.": "Sorry, the page you visited does not exist.",
"is none of": "is none of", "is none of": "is none of",
"is any of": "is any of" "is any of": "is any of",
"Plugin dependency version mismatch": "Plugin dependency version mismatch",
"The current dependency version of the plugin does not match the version of the application and may not work properly. Are you sure you want to continue enabling the plugin?": "The current dependency version of the plugin does not match the version of the application and may not work properly. Are you sure you want to continue enabling the plugin?"
} }

View File

@ -972,5 +972,7 @@
"Sorry, the page you visited does not exist.": "抱歉,你访问的页面不存在。", "Sorry, the page you visited does not exist.": "抱歉,你访问的页面不存在。",
"Set Template Engine": "设置模板引擎", "Set Template Engine": "设置模板引擎",
"Skip getting the total number of table records during paging to speed up loading. It is recommended to enable this option for data tables with a large amount of data": "在分页时跳过获取表记录总数,以加快加载速度,建议对有大量数据的数据表开启此选项", "Skip getting the total number of table records during paging to speed up loading. It is recommended to enable this option for data tables with a large amount of data": "在分页时跳过获取表记录总数,以加快加载速度,建议对有大量数据的数据表开启此选项",
"The current user only has the UI configuration permission, but don't have view permission for collection \"{{name}}\"": "当前用户只有 UI 配置权限,但没有数据表 \"{{name}}\" 查看权限。" "The current user only has the UI configuration permission, but don't have view permission for collection \"{{name}}\"": "当前用户只有 UI 配置权限,但没有数据表 \"{{name}}\" 查看权限。",
"Plugin dependency version mismatch": "插件依赖版本不一致",
"The current dependency version of the plugin does not match the version of the application and may not work properly. Are you sure you want to continue enabling the plugin?": "当前插件的依赖版本与应用的版本不一致,可能无法正常工作。您确定要继续激活插件吗?"
} }

View File

@ -7,7 +7,7 @@
* For more information, please refer to: https://www.nocobase.com/agreement. * For more information, please refer to: https://www.nocobase.com/agreement.
*/ */
import { App, Card, Divider, Popconfirm, Space, Switch, Typography, message } from 'antd'; import { App, Card, Divider, Popconfirm, Space, Switch, Typography } from 'antd';
import classnames from 'classnames'; import classnames from 'classnames';
import React, { FC, useState } from 'react'; import React, { FC, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -157,7 +157,20 @@ function PluginInfo(props: IPluginInfo) {
onChange={async (checked, e) => { onChange={async (checked, e) => {
e.stopPropagation(); e.stopPropagation();
if (!isCompatible && checked) { if (!isCompatible && checked) {
message.error(t("Dependencies check failed, can't enable.")); modal.confirm({
title: t('Plugin dependency version mismatch'),
content: t(
'The current dependency version of the plugin does not match the version of the application and may not work properly. Are you sure you want to continue enabling the plugin?',
),
onOk: async () => {
await api.request({
url: `pm:enable`,
params: {
filterByTk: name,
},
});
},
});
return; return;
} }
if (!checked) { if (!checked) {