From 51a2d17f1306788b3bb6c90e23e4bdaa4a2d4fca Mon Sep 17 00:00:00 2001
From: Zeke Zhang <958414905@qq.com>
Date: Thu, 27 Mar 2025 11:13:58 +0800
Subject: [PATCH] fix: adjust the font size displayed on the phone to 14px
(#6570)
* refactor(plugin-mobile): rename GlobalStyle to ResetScrollbar for clarity
* fix: increase font size in InternalAdminLayout from 14 to 16
* fix: ensure button alignment in WorkbenchBlock styles
---
.../core/client/src/route-switch/antd/admin-layout/index.tsx | 2 +-
.../plugin-block-workbench/src/client/WorkbenchBlock.tsx | 1 +
.../plugin-mobile/src/client/MobileComponentsProvider.tsx | 4 ++--
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx
index 4bf3acbb33..b36ab25d68 100644
--- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx
+++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx
@@ -618,7 +618,7 @@ export const InternalAdminLayout = () => {
paddingPageVertical: 8, // Vertical page padding
marginBlock: 12, // Spacing between blocks
borderRadiusBlock: 8, // Block border radius
- fontSize: 14, // Font size
+ fontSize: 16, // Font size
},
algorithm: isDarkTheme ? [antdTheme.compactAlgorithm, antdTheme.darkAlgorithm] : antdTheme.compactAlgorithm, // Set mobile mode to always use compact algorithm
};
diff --git a/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx b/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx
index e2fe54b46b..88c0584782 100644
--- a/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx
+++ b/packages/plugins/@nocobase/plugin-block-workbench/src/client/WorkbenchBlock.tsx
@@ -122,6 +122,7 @@ const useStyles = createStyles(({ token, css }) => ({
margin: -12px -32px;
width: calc(100% + 64px);
text-align: start;
+ justify-content: start !important;
color: ${token.colorText};
}
}
diff --git a/packages/plugins/@nocobase/plugin-mobile/src/client/MobileComponentsProvider.tsx b/packages/plugins/@nocobase/plugin-mobile/src/client/MobileComponentsProvider.tsx
index d1b702cb9f..8e85cfea21 100644
--- a/packages/plugins/@nocobase/plugin-mobile/src/client/MobileComponentsProvider.tsx
+++ b/packages/plugins/@nocobase/plugin-mobile/src/client/MobileComponentsProvider.tsx
@@ -14,7 +14,7 @@ import { ActionDrawerUsedInMobile, useToAdaptActionDrawerToMobile } from './adap
import { useToAdaptFilterActionToMobile } from './adaptor-of-desktop/FilterAction';
import { mobileComponents } from './pages/dynamic-page/MobilePage';
-const GlobalStyle = createGlobalStyle`
+const ResetScrollbar = createGlobalStyle`
::-webkit-scrollbar {
display: none;
}
@@ -49,7 +49,7 @@ const MobileAdapter: FC = (props) => {
return (
<>
-
+
{props.children}