From 1e2d2bfd20b0c19074576ecb9709f581e3c235c0 Mon Sep 17 00:00:00 2001 From: FalkWolsky Date: Tue, 21 May 2024 14:22:02 +0200 Subject: [PATCH 01/57] WIP - Changing the Theme Detail View --- .../src/pages/setting/theme/detail/index.tsx | 290 +++++++++++------- .../pages/setting/theme/styledComponents.tsx | 4 +- 2 files changed, 173 insertions(+), 121 deletions(-) diff --git a/client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx b/client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx index 7c36196cd..500a15e55 100644 --- a/client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx +++ b/client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx @@ -32,6 +32,7 @@ import { HeaderBack } from "pages/setting/permission/styledComponents"; import dsl from "./previewDsl"; import chartDsl from "./chartPreviewDsl"; import { messageInstance } from "lowcoder-design/src/components/GlobalInstances"; +import { Collapse, CollapseProps } from 'antd'; const CodeEditor = lazy( () => import("base/codeEditor/codeEditor") @@ -148,7 +149,166 @@ class ThemeDetailPage extends React.Component +
+ {trans("theme.mainColor")} + this.configChange(params)} + /> +
+ this.configChange(params)} + /> + this.configChange(params)} + /> +
+ {trans("theme.text")} + this.configChange(params)} + /> +
+ this.configChange(params)} + /> + + + }, + { + key: '2', + label: 'Text & Fonts', + children:

to define...

, + }, + { + key: '3', + label: 'Layout', + children: +
+
+ {trans("themeDetail.borderRadius")} + this.configChange(params)} + /> +
+
+ {trans("themeDetail.margin")} + { + this.configChange(params); + }} + /> +
+
+ {trans("themeDetail.padding")} + { + this.configChange(params); + }} + /> +
+
+ {trans("themeDetail.gridColumns")} + { + this.configChange(params); + }} + /> +
+
, + }, + { + key: '4', + label: 'Components', + children:

to define...

, + }, + { + key: '5', + label: 'Theme Preview', + children: , + }, + { + key: '6', + label: 'eCharts Definition', + children: +
+ {/* {trans("themeDetail.chart")} */} + + {trans("themeDetail.chartDesc")} + + {" "} + {trans("themeDetail.echartsJson")} + + + +
+ this.configChange({ + colorKey: "chart", + chart: value.doc.toString() ? value.doc.toString() : undefined, + })} + styleName="higher" + codeType="Function" + showLineNum + bordered + /> +
+
+
, + }, + { + key: '7', + label: 'eCharts Definition Preview', + children: , + }, + + ]; + return ( <> -
-
- {trans("theme.mainColor")} - this.configChange(params)} - /> -
- this.configChange(params)} - /> - this.configChange(params)} - /> -
- {trans("theme.text")} - this.configChange(params)} - /> -
- this.configChange(params)} - /> -
- {trans("themeDetail.borderRadius")} - this.configChange(params)} - /> -
-
-
-
- {trans("themeDetail.margin")} - { - this.configChange(params); - }} - /> -
-
- {trans("themeDetail.padding")} - { - this.configChange(params); - }} - /> -
-
- {trans("themeDetail.gridColumns")} - { - this.configChange(params); - }} - /> -
-
- -
- {trans("themeDetail.chart")} - - {trans("themeDetail.chartDesc")} - - {" "} - {trans("themeDetail.echartsJson")} - - - -
- this.configChange({ - colorKey: "chart", - chart: value.doc.toString() ? value.doc.toString() : undefined, - })} - styleName="higher" - codeType="Function" - showLineNum - bordered - /> -
-
-
- + + + + {/* */} + + + {/* + /> */} +