Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c33fd0

Browse files
added canvas bg color option in app Settings
1 parentc459d56 commit1c33fd0

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

‎client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { BoolControl } from "../controls/boolControl";
2222
import{getNpmPackageMeta}from"../utils/remote";
2323
import{getPromiseAfterDispatch}from"@lowcoder-ee/util/promiseUtils";
2424
importtype{AppState}from"@lowcoder-ee/redux/reducers";
25+
import{ColorControl}from"../controls/colorControl";
2526

2627
constTITLE=trans("appSetting.title");
2728
constUSER_DEFINE="__USER_DEFINE";
@@ -106,12 +107,32 @@ const DivStyled = styled.div`
106107
107108
> div {
108109
width: 100%;
110+
flex: 0 0 100%;
109111
display: block;
112+
113+
.tooltipLabel {
114+
width: 100%;
115+
}
110116
}
111117
112118
> div:first-child {
113119
margin-bottom: 6px;
114120
}
121+
122+
> div:nth-child(2) {
123+
> div {
124+
width: 100%;
125+
justify-content: flex-start;
126+
> div:first-child {
127+
flex: 0 0 24px;
128+
}
129+
> div:nth-child(2) {
130+
> div:nth-child(2) {
131+
width: 100%;
132+
}
133+
}
134+
}
135+
}
115136
116137
}
117138
// custom styles for icon selector
@@ -194,6 +215,7 @@ const childrenMap = {
194215
gridRowCount:NumberControl,
195216
gridPaddingX:NumberControl,
196217
gridPaddingY:NumberControl,
218+
gridBg:ColorControl,
197219
gridBgImage:StringControl,
198220
gridBgImageRepeat:StringControl,
199221
gridBgImageSize:StringControl,
@@ -225,6 +247,7 @@ function AppSettingsModal(props: ChildrenInstance) {
225247
gridRowCount,
226248
gridPaddingX,
227249
gridPaddingY,
250+
gridBg,
228251
gridBgImage,
229252
gridBgImageRepeat,
230253
gridBgImageSize,
@@ -365,6 +388,9 @@ function AppSettingsModal(props: ChildrenInstance) {
365388
label:trans("appSetting.gridPaddingY"),
366389
placeholder:'20',
367390
})}
391+
{gridBg.propertyView({
392+
label:trans("style.background"),
393+
})}
368394
{gridBgImage.propertyView({
369395
label:trans("appSetting.gridBgImage"),
370396
placeholder:'',

‎client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,6 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
203203
desc:trans('themeDetail.primaryDesc'),
204204
color:this.state.theme?.primary,
205205
},
206-
{
207-
settingsKey:'canvas',
208-
name:trans('themeDetail.canvas'),
209-
desc:trans('themeDetail.canvasDesc'),
210-
color:this.state.theme?.canvas,
211-
},
212206
{
213207
settingsKey:'primarySurface',
214208
name:trans('themeDetail.primarySurface'),
@@ -374,6 +368,13 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
374368
{
375369
title:trans('themeDetail.background'),
376370
items:[
371+
{
372+
settingsKey:'canvas',
373+
type:"canvas",
374+
name:trans('themeDetail.canvas'),
375+
desc:trans('themeDetail.canvasDesc'),
376+
color:this.state.theme?.canvas,
377+
},
377378
{
378379
settingsKey:'gridBgImage',
379380
name:trans('themeDetail.gridBgImage'),
@@ -619,6 +620,17 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
619620
}}
620621
/>
621622
}
623+
{canvasSettingItem.type=="canvas"&&
624+
<ThemeSettingsSelector
625+
themeSettingKey={canvasSettingItem.settingsKey}
626+
name={canvasSettingItem.name}
627+
// desc={colorItem.desc}
628+
color={(canvasSettingItemasany).color}
629+
configChange={(params)=>{
630+
this.configChange(params);
631+
}}
632+
/>
633+
}
622634
{canvasSettingItem.type=="gridBgImage"&&
623635
<ThemeSettingsSelector
624636
themeSettingKey={canvasSettingItem.settingsKey}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp