From 57a2bac72a586916297314b17f932aff624b6a2f Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 12 Jan 2024 09:14:27 +0800 Subject: [PATCH 1/3] fix(api-doc): invalid headers --- .../@nocobase/plugin-api-doc/src/client/Document.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx index c7ee6806f0..b515fcdfb3 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx +++ b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx @@ -12,13 +12,13 @@ const Documentation = () => { const apiClient = useAPIClient(); const { t } = useTranslation(); const swaggerUIRef = useRef(); - const { data: urls } = useRequest<{ data: { name: string; url: string }[] }>({ url: 'swagger:getUrls' }); const requestInterceptor = (req) => { if (!req.headers['Authorization']) { const match = location.pathname.match(/^\/apps\/([^/]*)\//); - // multi apps need to set X-App header - req.headers['X-App'] = match?.[1] || 'main'; + if (match?.[1]) { + req.headers['X-App'] = match?.[1]; + } req.headers['Authorization'] = `Bearer ${apiClient.auth.getToken()}`; } return req; From dfb44214842c05833e50d1dcc7cf4ab1b2b48b15 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Fri, 12 Jan 2024 09:50:17 +0800 Subject: [PATCH 2/3] fix: table column sort params should support cancel sort (#3372) * fix: sort params * fix: sort params --- .../core/client/src/block-provider/TableBlockProvider.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/core/client/src/block-provider/TableBlockProvider.tsx b/packages/core/client/src/block-provider/TableBlockProvider.tsx index 7829612acb..6663c512b8 100644 --- a/packages/core/client/src/block-provider/TableBlockProvider.tsx +++ b/packages/core/client/src/block-provider/TableBlockProvider.tsx @@ -174,11 +174,7 @@ export const useTableBlockProps = () => { ctx.service.refresh(); }, onChange({ current, pageSize }, filters, sorter) { - const sort = sorter.order - ? sorter.order === `ascend` - ? [sorter.field] - : [`-${sorter.field}`] - : globalSort || ctx.service.params?.[0]?.sort; + const sort = sorter.order ? (sorter.order === `ascend` ? [sorter.field] : [`-${sorter.field}`]) : globalSort; ctx.service.run({ ...ctx.service.params?.[0], page: current, pageSize, sort }); }, onClickRow(record, setSelectedRow, selectedRow) { From a6a1eaa0202367c271c06a36f8f1b9919a489a54 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 12 Jan 2024 09:59:38 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e44a105379..0570c8e52c 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ NocoBase is in early stage of development and is subject to frequent changes, pl ## Recent major updates -- [v0.19: Application process optimization - 2014/01/08](https://blog.nocobase.com/posts/release-v019/) -- [v0.18: Establish a sound testing system - 2013/12/21](https://blog.nocobase.com/posts/release-v018/) +- [v0.19: Application process optimization - 2024/01/08](https://blog.nocobase.com/posts/release-v019/) +- [v0.18: Establish a sound testing system - 2023/12/21](https://blog.nocobase.com/posts/release-v018/) - [v0.17: New SchemaInitializer and SchemaSettings - 2023/12/11](https://blog.nocobase.com/posts/release-v017/) - [v0.16: New cache manager - 2023/11/20](https://blog.nocobase.com/posts/release-v016/) - [v0.15: New plugin settings manager - 2023/11/13](https://blog.nocobase.com/posts/release-v015/)