diff --git a/packages/core/client/src/pm/Card.tsx b/packages/core/client/src/pm/Card.tsx new file mode 100644 index 000000000..386465abe --- /dev/null +++ b/packages/core/client/src/pm/Card.tsx @@ -0,0 +1,397 @@ +import React, { useEffect, useMemo, useState, useCallback, MouseEventHandler } from 'react'; +import { useAPIClient, useRequest } from '../api-client'; +import { + Avatar, + Card, + message, + Modal, + Popconfirm, + Spin, + Switch, + Tabs, + TabsProps, + Tag, + Tooltip, + Typography, +} from 'antd'; +import { css } from '@emotion/css'; +import cls from 'classnames'; +import { useHistory } from 'react-router-dom'; +import { useTranslation } from 'react-i18next'; +import { DeleteOutlined, SettingOutlined } from '@ant-design/icons'; +import { useParseMarkdown } from '../schema-component/antd/markdown/util'; +import type { IPluginData } from '.'; + +interface PluginDocumentProps { + path: string; + name: string; +} + +interface ICommonCard { + onClick: () => void; + name: string; + description: string; + title: string; + displayName: string; + actions?: JSX.Element[]; +} + +interface IPluginDetail { + plugin: any; + onCancel: () => void; + items: TabsProps['items']; +} + +/** + * get color by string + * TODO: real avatar + * @param str + */ +const stringToColor = function (str: string) { + let hash = 0; + for (let i = 0; i < str.length; i++) { + hash = str.charCodeAt(i) + ((hash << 5) - hash); + } + let color = '#'; + for (let i = 0; i < 3; i++) { + const value = (hash >> (i * 8)) & 0xff; + color += ('00' + value.toString(16)).substr(-2); + } + return color; +}; + +const PluginDocument: React.FC = (props) => { + const [docLang, setDocLang] = useState(''); + const { name, path } = props; + const { data, loading, error } = useRequest( + { + url: '/plugins:getTabInfo', + params: { + filterByTk: name, + path: path, + locale: docLang, + }, + }, + { + refreshDeps: [name, path, docLang], + }, + ); + const { html, loading: parseLoading } = useParseMarkdown(data?.data?.content); + + const htmlWithOutRelativeDirect = useMemo(() => { + if (html) { + const pattern = / match + `onclick="return false;"`); // prevent the default event of + } + }, [html]); + + const handleSwitchDocLang = useCallback((e: MouseEvent) => { + const lang = (e.target as HTMLDivElement).innerHTML; + if (lang.trim() === '中文') { + setDocLang('zh-CN'); + } else if (lang.trim() === 'English') { + setDocLang('en-US'); + } + }, []); + + useEffect(() => { + const md = document.getElementById('pm-md-preview'); + md.addEventListener('click', handleSwitchDocLang); + return () => { + removeEventListener('click', handleSwitchDocLang); + }; + }, [handleSwitchDocLang]); + + return ( +
+ {loading || parseLoading ? ( + + ) : ( +
+ )} +
+ ); +}; + +function PluginDetail(props: IPluginDetail) { + const { plugin, onCancel, items } = props; + return ( + + {plugin?.displayName || plugin?.name} + + v{plugin?.version} + + + } + open={!!plugin} + onCancel={onCancel} + destroyOnClose + > + {plugin?.description &&
{plugin?.description}
} + +
+ ); +} + +function CommonCard(props: ICommonCard) { + const { onClick, name, displayName, actions, description, title } = props; + return ( + Settings
, Remove, ]} + > + {name?.[0]}} + description={ + +
+ {description || '-'} +
+
+ } + title={ + + {displayName || name} + + {title} + + + } + /> + + ); +} + +export const PluginCard = (props: { data: IPluginData }) => { + const history = useHistory(); + const { data } = props; + const api = useAPIClient(); + const { t } = useTranslation(); + const { enabled, name, displayName, id, description, version } = data; + const [plugin, setPlugin] = useState(null); + const { data: tabsData, run } = useRequest( + { + url: '/plugins:getTabs', + }, + { + manual: true, + }, + ); + const items = useMemo(() => { + return tabsData?.data?.tabs.map((item) => { + return { + label: item.title, + key: item.path, + children: React.createElement(PluginDocument, { + name: tabsData?.data.filterByTk, + path: item.path, + }), + }; + }); + }, [tabsData?.data]); + + const actions = useMemo( + () => + [ + enabled ? ( + { + e.stopPropagation(); + history.push(`/admin/settings/${name}`); + }} + /> + ) : null, + { + e.stopPropagation(); + await api.request({ + url: `pm:remove/${name}`, + }); + message.success(t('插件删除成功')); + window.location.reload(); + }} + onCancel={(e) => e.stopPropagation()} + okText={t('Yes')} + cancelText={t('No')} + > + e.stopPropagation()} /> + , + { + e.stopPropagation(); + Modal.warn({ + title: checked ? t('Plugin staring') : t('Plugin stopping'), + content: t('The application is reloading, please do not close the page.'), + okButtonProps: { + style: { + display: 'none', + }, + }, + }); + await api.request({ + url: `pm:${checked ? 'enable' : 'disable'}/${name}`, + }); + window.location.reload(); + // message.success(checked ? t('插件激活成功') : t('插件禁用成功')); + }} + defaultChecked={enabled} + >, + ].filter(Boolean), + [api, enabled, history, id, name, t], + ); + return ( + <> + setPlugin(null)} items={items} /> + { + setPlugin(data); + run({ + params: { + filterByTk: name, + }, + }); + }} + name={name} + description={description} + title={version} + actions={actions} + displayName={displayName} + /> + + ); +}; + +export const BuiltInPluginCard = (props: { data: IPluginData }) => { + const { + data: { description, name, version, displayName }, + data, + } = props; + const history = useHistory(); + const [plugin, setPlugin] = useState(null); + const { data: tabsData, run } = useRequest( + { + url: '/plugins:getTabs', + }, + { + manual: true, + }, + ); + const items = useMemo(() => { + return tabsData?.data?.tabs.map((item) => { + return { + label: item.title, + key: item.path, + children: React.createElement(PluginDocument, { + name: tabsData?.data.filterByTk, + path: item.path, + }), + }; + }); + }, [tabsData?.data]); + + return ( + <> + setPlugin(null)} items={items} /> + { + setPlugin(data); + run({ + params: { + filterByTk: name, + }, + }); + }} + name={name} + displayName={displayName} + description={description} + title={version} + actions={[ +
, + { + e.stopPropagation(); + history.push(`/admin/settings/${name}`); + }} + />, + ]} + /> + + ); +}; +function useCallabck(arg0: () => void, arg1: undefined[]) { + throw new Error('Function not implemented.'); +} diff --git a/packages/core/client/src/pm/PluginManagerLink.tsx b/packages/core/client/src/pm/PluginManagerLink.tsx index 60b0dd529..3f9fba376 100644 --- a/packages/core/client/src/pm/PluginManagerLink.tsx +++ b/packages/core/client/src/pm/PluginManagerLink.tsx @@ -16,7 +16,7 @@ export const PluginManagerLink = () => { icon={} title={t('Plugin manager')} onClick={() => { - history.push('/admin/pm/list'); + history.push('/admin/pm/list/'); }} /> diff --git a/packages/core/client/src/pm/index.tsx b/packages/core/client/src/pm/index.tsx index 3b7197c69..40e0ee8df 100644 --- a/packages/core/client/src/pm/index.tsx +++ b/packages/core/client/src/pm/index.tsx @@ -1,313 +1,105 @@ import { css } from '@emotion/css'; -import { - Layout, - Menu, - message, - Modal, - PageHeader, - Popconfirm, - Result, - Space, - Spin, - Table, - TableProps, - Tabs, - TabsProps, - Tag, - Typography, -} from 'antd'; +import { Layout, Menu, PageHeader, Result, Spin, Tabs } from 'antd'; import { sortBy } from 'lodash'; -import React, { createContext, useContext, useMemo, useState } from 'react'; +import React, { createContext, useContext, useEffect, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { Redirect, useHistory, useRouteMatch } from 'react-router-dom'; import { ACLPane } from '../acl'; import { useACLRoleContext } from '../acl/ACLProvider'; -import { useAPIClient, useRequest } from '../api-client'; +import { useRequest } from '../api-client'; import { CollectionManagerPane } from '../collection-manager'; import { useDocumentTitle } from '../document-title'; import { Icon } from '../icon'; import { RouteSwitchContext } from '../route-switch'; -import { useCompile, useTableSize } from '../schema-component'; -import { useParseMarkdown } from '../schema-component/antd/markdown/util'; +import { useCompile } from '../schema-component'; import { BlockTemplatesPane } from '../schema-templates'; import { SystemSettingsPane } from '../system-settings'; -const { Link } = Typography; +import { BuiltInPluginCard, PluginCard } from './Card'; + +export interface TData { + data: IPluginData[]; + meta: IMetaData; +} + +export interface IPluginData { + id: number; + createdAt: Date; + updatedAt: Date; + name: string; + displayName: string; + version: string; + enabled: boolean; + installed: boolean; + builtIn: boolean; + options: Record; + description?: string; +} + +export interface IMetaData { + count: number; + page: number; + pageSize: number; + totalPage: number; + allowedActions: AllowedActions; +} + +export interface AllowedActions { + view: number[]; + update: number[]; + destroy: number[]; +} + +// TODO: refactor card/built-int card + export const SettingsCenterContext = createContext({}); -interface PluginTableProps { - filter: any; - builtIn?: boolean; -} - -interface PluginDocumentProps { - path: string; - name: string; -} -const PluginDocument: React.FC = (props) => { - const { data, loading, error } = useRequest( - { - url: '/plugins:getTabInfo', - params: { - filterByTk: props.name, - path: props.path, - }, - }, - { - refreshDeps: [props.name, props.path], - }, - ); - const { html, loading: parseLoading } = useParseMarkdown(data?.data?.content); - - return ( -
- {loading || parseLoading ? ( - - ) : ( -
- )} -
- ); -}; - -const PluginTable: React.FC = (props) => { - const { builtIn } = props; - const history = useHistory(); - const api = useAPIClient(); - const [plugin, setPlugin] = useState(null); - const { t, i18n } = useTranslation(); - const settingItems = useContext(SettingsCenterContext); - const { data, loading } = useRequest({ +const LocalPlugins = () => { + // TODO: useRequest types for data ts type + const { data, loading }: { data: TData; loading: boolean } = useRequest({ url: 'applicationPlugins:list', params: { - filter: props.filter, + filter: { + 'builtIn.$isFalsy': true, + }, sort: 'name', paginate: false, }, }); - - const { data: tabsData, run } = useRequest( - { - url: '/plugins:getTabs', - }, - { - manual: true, - }, - ); - - const columns = useMemo['columns']>(() => { - return [ - { - title: t('Plugin name'), - dataIndex: 'displayName', - width: 300, - render: (displayName, record) => displayName || record.name, - }, - { - title: t('Description'), - dataIndex: 'description', - ellipsis: true, - }, - { - title: t('Version'), - dataIndex: 'version', - width: 300, - }, - // { - // title: t('Author'), - // dataIndex: 'author', - // width: 200, - // }, - { - title: t('Actions'), - width: 300, - render(data) { - return ( - - { - setPlugin(data); - run({ - params: { - filterByTk: data.name, - }, - }); - }} - > - {t('View')} - - {data.enabled && settingItems[data.name] ? ( - { - history.push(`/admin/settings/${data.name}`); - }} - > - {t('Setting')} - - ) : null} - {!builtIn ? ( - <> - { - const checked = !data.enabled; - Modal.warn({ - title: checked ? t('Plugin starting') : t('Plugin stopping'), - content: t('The application is reloading, please do not close the page.'), - okButtonProps: { - style: { - display: 'none', - }, - }, - }); - await api.request({ - url: `pm:${checked ? 'enable' : 'disable'}/${data.name}`, - }); - window.location.reload(); - // message.success(checked ? t('插件激活成功') : t('插件禁用成功')); - }} - > - {t(data.enabled ? 'Disable' : 'Enable')} - - { - await api.request({ - url: `pm:remove/${data.name}`, - }); - message.success(t('插件删除成功')); - window.location.reload(); - }} - onCancel={() => {}} - okText={t('Yes')} - cancelText={t('No')} - > - {t('Delete')} - - - ) : null} - - ); - }, - }, - ]; - }, [t, builtIn]); - - const items = useMemo(() => { - return tabsData?.data?.tabs.map((item) => { - return { - label: item.title, - key: item.path, - children: React.createElement(PluginDocument, { - name: tabsData?.data.filterByTk, - path: item.path, - }), - }; - }); - }, [tabsData?.data]); - - const { height, tableSizeRefCallback } = useTableSize(); + if (loading) { + return ; + } return ( -
- - {plugin?.displayName || plugin?.name} - - v{plugin?.version} - - - } - open={!!plugin} - onCancel={() => setPlugin(null)} - > - {plugin?.description &&
{plugin?.description}
} - -
- - - ); -}; - -const LocalPlugins = () => { - return ( - + <> + {data?.data?.map((item) => { + const { id } = item; + return ; + })} + ); }; const BuiltinPlugins = () => { - return ( - + }, + sort: 'name', + paginate: false, + }, + }); + if (loading) { + return ; + } + return ( + <> + {data?.data?.map((item) => { + const { id } = item; + return ; + })} + ); }; @@ -324,15 +116,15 @@ const PluginList = (props) => { const { t } = useTranslation(); const { snippets = [] } = useACLRoleContext(); + useEffect(() => { + const { tabName } = match.params; + if (!tabName) { + history.replace(`/admin/pm/list/local/`); + } + }, []); + return snippets.includes('pm') ? ( -
+
{ { - history.push(`/admin/pm/list/${activeKey}`); + history.push(`/admin/pm/list/${activeKey}/`); }} > @@ -349,7 +141,7 @@ const PluginList = (props) => { } /> -
+
{React.createElement( { local: LocalPlugins, @@ -529,7 +321,7 @@ const SettingsCenter = (props) => { } /> )} -
+
{aclPluginTabCheck ? ( component && React.createElement(component) ) : ( @@ -555,7 +347,7 @@ export const PMProvider = (props) => { routes[1].routes.unshift( { type: 'route', - path: '/admin/pm/list/:tabName?', + path: '/admin/pm/list/:tabName?/:mdfile?', component: PluginList, }, { diff --git a/packages/plugins/acl/package.json b/packages/plugins/acl/package.json index aeda1cb67..3648e7d72 100644 --- a/packages/plugins/acl/package.json +++ b/packages/plugins/acl/package.json @@ -3,7 +3,7 @@ "displayName": "ACL", "displayName.zh-CN": "权限控制", "description": "A simple access control based on roles, resources and actions", - "description.zh-CN": "基于角色、资源和操作的权限控制插件", + "description.zh-CN": "基于角色、资源和操作的权限控制。", "version": "0.9.4-alpha.2", "license": "AGPL-3.0", "main": "./lib/index.js", diff --git a/packages/plugins/audit-logs/package.json b/packages/plugins/audit-logs/package.json index 44eebbdf4..99f06d905 100644 --- a/packages/plugins/audit-logs/package.json +++ b/packages/plugins/audit-logs/package.json @@ -1,6 +1,10 @@ { "name": "@nocobase/plugin-audit-logs", "version": "0.9.4-alpha.2", + "displayName": "audit-logs", + "displayName.zh-CN": "审计日志", + "description": "audit logs plugin", + "description.zh-CN": "审计日志。", "main": "./lib/server/index.js", "types": "./lib/server/index.d.ts", "license": "AGPL-3.0", diff --git a/packages/plugins/charts/package.json b/packages/plugins/charts/package.json index 01f9368ff..1415ba69e 100644 --- a/packages/plugins/charts/package.json +++ b/packages/plugins/charts/package.json @@ -1,5 +1,9 @@ { "name": "@nocobase/plugin-charts", + "displayName": "charts", + "displayName.zh-CN": "图表", + "description": "Out-of-the-box, feature-rich chart plugins.", + "description.zh-CN": "开箱即用、丰富的报表。", "version": "0.9.4-alpha.2", "main": "lib/server/index.js", "devDependencies": { diff --git a/packages/plugins/china-region/package.json b/packages/plugins/china-region/package.json index d9ae1b6cd..c56e66e1b 100644 --- a/packages/plugins/china-region/package.json +++ b/packages/plugins/china-region/package.json @@ -1,6 +1,10 @@ { "name": "@nocobase/plugin-china-region", "version": "0.9.4-alpha.2", + "displayName": "china-region", + "displayName.zh-CN": "中国行政区", + "description": "Chinese Administrative Division Plugin, including all administrative regions of China.", + "description.zh-CN": "中国行政区划插件,内含所有中国行政区域。", "main": "lib/index.js", "license": "AGPL-3.0", "dependencies": { diff --git a/packages/plugins/client/package.json b/packages/plugins/client/package.json index 748f06553..edf30a302 100644 --- a/packages/plugins/client/package.json +++ b/packages/plugins/client/package.json @@ -1,5 +1,9 @@ { "name": "@nocobase/plugin-client", + "displayName": "client", + "displayName.zh-CN": "客户端", + "description": "client", + "description.zh-CN": "客户端。", "version": "0.9.4-alpha.2", "main": "lib/index.js", "license": "AGPL-3.0", diff --git a/packages/plugins/collection-manager/package.json b/packages/plugins/collection-manager/package.json index 8dc2b4eb4..9be6103c6 100644 --- a/packages/plugins/collection-manager/package.json +++ b/packages/plugins/collection-manager/package.json @@ -1,5 +1,9 @@ { "name": "@nocobase/plugin-collection-manager", + "displayName": "collection manager plugin", + "displayName.zh-CN": "数据库管理", + "description": " database management plugin designed to simplify the process of managing and operating databases. It seamlessly integrates with various relational database systems such as MySQL and PostgreSQL, and provides an intuitive user interface for performing various database tasks.", + "description.zh-CN": "可以与多种关系型数据库系统(如MySQL、PostgreSQL)无缝集成,并提供直观的用户界面来执行各种数据库任务。", "version": "0.9.4-alpha.2", "main": "lib/index.js", "license": "AGPL-3.0", diff --git a/packages/plugins/duplicator/package.json b/packages/plugins/duplicator/package.json index 47f0767a5..0910222c8 100644 --- a/packages/plugins/duplicator/package.json +++ b/packages/plugins/duplicator/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-duplicator", + "displayName": "duplicator", + "displayName.zh-CN": "NocoBase应用备份与还原", + "description": "Backup and Restore Plugin for NocoBase applications, used for scenarios such as application replication, migration, and upgrade.", + "description.zh-CN": "NocoBase 应用的备份与还原插件,可用于应用的复制、迁移、升级等场景。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/error-handler/package.json b/packages/plugins/error-handler/package.json index 4c29b8690..61f160f56 100644 --- a/packages/plugins/error-handler/package.json +++ b/packages/plugins/error-handler/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-error-handler", + "displayName": "error handler", + "displayName.zh-CN": "错误处理", + "description": "Managing and handling errors and exceptions in an application.", + "description.zh-CN": "管理和处理应用程序中的错误和异常。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/export/package.json b/packages/plugins/export/package.json index 89536477b..40bf99876 100644 --- a/packages/plugins/export/package.json +++ b/packages/plugins/export/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-export", + "displayName": "export", + "displayName.zh-CN": "导出", + "description": "export data", + "description.zh-CN": "导出数据。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/file-manager/package.json b/packages/plugins/file-manager/package.json index 3d08652b4..38b10a2f8 100644 --- a/packages/plugins/file-manager/package.json +++ b/packages/plugins/file-manager/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-file-manager", "version": "0.9.4-alpha.2", - "description": "", + "displayName": "file manager", + "displayName.zh-CN": "文件管理", + "description": "file management plugin.", + "description.zh-CN": "文件管理。", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/formula-field/package.json b/packages/plugins/formula-field/package.json index aa49236a2..a5ca6bc6b 100644 --- a/packages/plugins/formula-field/package.json +++ b/packages/plugins/formula-field/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-formula-field", + "displayName": "formula-field", + "displayName.zh-CN": "字段", + "description": "formula-field", + "description.zh-CN": "字段。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/graph-collection-manager/package.json b/packages/plugins/graph-collection-manager/package.json index f43c06d99..0def2ef61 100644 --- a/packages/plugins/graph-collection-manager/package.json +++ b/packages/plugins/graph-collection-manager/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-graph-collection-manager", + "displayName": "graph collection manager", + "displayName.zh-CN": "数据库可视化管理", + "description": "database collection manage", + "description.zh-CN": "数据库管理。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/iframe-block/package.json b/packages/plugins/iframe-block/package.json index d4cd885c5..58c07868d 100644 --- a/packages/plugins/iframe-block/package.json +++ b/packages/plugins/iframe-block/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-iframe-block", + "displayName": "iframe", + "displayName.zh-CN": "iframe", + "description": "create and manage IFrame blocks on the page for embedding and displaying external web pages or content.", + "description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/import/package.json b/packages/plugins/import/package.json index 9857d2802..7e61a4b08 100644 --- a/packages/plugins/import/package.json +++ b/packages/plugins/import/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-import", + "displayName": "import", + "displayName.zh-CN": "导入", + "description": "import data.", + "description.zh-CN": "导入数据。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/math-formula-field/package.json b/packages/plugins/math-formula-field/package.json index c910612f1..2daeeadef 100644 --- a/packages/plugins/math-formula-field/package.json +++ b/packages/plugins/math-formula-field/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-math-formula-field", + "displayName": "math formula field", + "displayName.zh-CN": "数学公式字段", + "description": "A powerful mathematical formula field plugin designed to provide flexible mathematical and formula calculation capabilities for databases or data management systems. It seamlessly integrates with various database systems such as MySQL, PostgreSQL, and offers an intuitive user interface for defining and executing mathematical formula fields.", + "description.zh-CN": "一个功能强大的数学公式字段插件,旨在为数据库或数据管理系统提供灵活的数学计算和公式计算功能。它可以与各种数据库系统(如MySQL、PostgreSQL)无缝集成,并提供直观的用户界面来定义和执行数学公式字段。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/multi-app-manager/package.json b/packages/plugins/multi-app-manager/package.json index b8c87ddac..ca85e2105 100644 --- a/packages/plugins/multi-app-manager/package.json +++ b/packages/plugins/multi-app-manager/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-multi-app-manager", + "displayName": "multi app manager", + "displayName.zh-CN": "多应用管理", + "description": "manage app", + "description.zh-CN": "管理应用", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/multi-app-share-collection/package.json b/packages/plugins/multi-app-share-collection/package.json index bfcace8d8..1bca8f5b7 100644 --- a/packages/plugins/multi-app-share-collection/package.json +++ b/packages/plugins/multi-app-share-collection/package.json @@ -1,5 +1,9 @@ { "name": "@nocobase/plugin-multi-app-share-collection", + "displayName": "multi app share collection", + "displayName.zh-CN": "多应用数据共享", + "description": "multi app share collection", + "description.zh-CN": "多应用数据共享", "version": "0.9.4-alpha.2", "main": "lib/server/index.js", "devDependencies": { diff --git a/packages/plugins/oidc/package.json b/packages/plugins/oidc/package.json index 8ea848089..30ee1decf 100644 --- a/packages/plugins/oidc/package.json +++ b/packages/plugins/oidc/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-oidc", + "displayName": "OpenID Connect", + "displayName.zh-CN": "OpenID Connect", + "description": " provide OIDC authentication and authorization functionality for applications or authentication systems.", + "description.zh-CN": "在为应用程序或身份验证系统提供OIDC认证和授权功能。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/saml/package.json b/packages/plugins/saml/package.json index 01ad6c6e2..82fd5ac89 100644 --- a/packages/plugins/saml/package.json +++ b/packages/plugins/saml/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-saml", + "displayName": "saml", + "displayName.zh-CN": "saml", + "description": "provide SAML authentication and authorization functionality for applications or authentication systems.", + "description.zh-CN": "为应用程序或身份验证系统提供SAML认证和授权功能。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/sequence-field/package.json b/packages/plugins/sequence-field/package.json index 9fe0d3dc1..71b95bc1c 100644 --- a/packages/plugins/sequence-field/package.json +++ b/packages/plugins/sequence-field/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-sequence-field", + "displayName": "sequence field", + "displayName.zh-CN": "字段序列", + "description": "provide the functionality of automatically generating unique sequence values for databases or data management systems.", + "description.zh-CN": "为数据库或数据管理系统提供自动生成唯一序列值的功能。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/snapshot-field/package.json b/packages/plugins/snapshot-field/package.json index c3d73e0fc..0c4db85c6 100644 --- a/packages/plugins/snapshot-field/package.json +++ b/packages/plugins/snapshot-field/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-snapshot-field", + "displayName": "snapshot field", + "displayName.zh-CN": "关系数据库快照", + "description": "provide fast and reliable database backup and recovery functionality for database systems.", + "description.zh-CN": "为数据库系统提供快速、可靠的数据库备份和恢复功能。。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/system-settings/package.json b/packages/plugins/system-settings/package.json index 1d50fb273..0dbb870f1 100644 --- a/packages/plugins/system-settings/package.json +++ b/packages/plugins/system-settings/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-system-settings", + "displayName": "system settings", + "displayName.zh-CN": "系统配置", + "description": "A plugin specifically designed to adjust the system-level settings of NocoBase.", + "description.zh-CN": "用于调整 nocobase 的系统级设置。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/ui-routes-storage/package.json b/packages/plugins/ui-routes-storage/package.json index de14293f6..86d15d81b 100644 --- a/packages/plugins/ui-routes-storage/package.json +++ b/packages/plugins/ui-routes-storage/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-ui-routes-storage", + "displayName": "ui routes storage", + "displayName.zh-CN": "路由管理", + "description": "manage the routes of nocobase", + "description.zh-CN": "管理页面路由。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/ui-schema-storage/package.json b/packages/plugins/ui-schema-storage/package.json index d912c86d2..ef063d4fc 100644 --- a/packages/plugins/ui-schema-storage/package.json +++ b/packages/plugins/ui-schema-storage/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-ui-schema-storage", + "displayName": "UI schema storage", + "displayName.zh-CN": "UI schema", + "description": "A plugin used for managing page UI schemas.", + "description.zh-CN": "UI schema 配置。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/users/package.json b/packages/plugins/users/package.json index 332210bff..4b53dbdc7 100644 --- a/packages/plugins/users/package.json +++ b/packages/plugins/users/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-users", + "displayName": "users", + "displayName.zh-CN": "用户管理", + "description": "manage the uses of nocobase system", + "description.zh-CN": "管理系统用户", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/verification/package.json b/packages/plugins/verification/package.json index 13a8e376e..7ab8851cd 100644 --- a/packages/plugins/verification/package.json +++ b/packages/plugins/verification/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-verification", + "displayName": "verification", + "displayName.zh-CN": "验证码", + "description": "verification setting.", + "description.zh-CN": "验证码配置。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/plugins/workflow/package.json b/packages/plugins/workflow/package.json index 54fe90d2e..78f03db4f 100644 --- a/packages/plugins/workflow/package.json +++ b/packages/plugins/workflow/package.json @@ -1,7 +1,10 @@ { "name": "@nocobase/plugin-workflow", + "displayName": "workflow", + "displayName.zh-CN": "工作流", + "description": " a powerful workflow plugin designed to support business process management and automation. .", + "description.zh-CN": "工作流插件,为业务流程管理和自动化提供支持。", "version": "0.9.4-alpha.2", - "description": "", "license": "AGPL-3.0", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/samples/hello/package.json b/packages/samples/hello/package.json index e00a7c821..76a5b2f0b 100644 --- a/packages/samples/hello/package.json +++ b/packages/samples/hello/package.json @@ -2,6 +2,10 @@ "name": "@nocobase/plugin-sample-hello", "version": "0.9.4-alpha.2", "main": "lib/server/index.js", + "displayName": "Sample-Hello", + "displayName.zh-CN": "插件demo-hello", + "description": "simple plugin demo", + "description.zh-CN": "这就是一个简单的插件demo", "devDependencies": { "@nocobase/client": "0.9.4-alpha.2", "@nocobase/server": "0.9.4-alpha.2",