Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4fc650c
fix duplicate gid : null by filling in gid
dragonpoo Oct 11, 2024
f1bedbf
add theme to snapshot list api
dragonpoo Oct 9, 2024
6fece96
add range to snapshot list api
dragonpoo Oct 9, 2024
449f1fd
convert to time-series collection
dragonpoo Oct 10, 2024
4d8ac38
add new endpoint to retrieve archived snapshot list
dragonpoo Oct 11, 2024
38a32d5
Add name param to application list endpoint
goldants Oct 1, 2024
0ad8fef
Add name param to folder list endpoint
goldants Oct 1, 2024
fbfa78b
Add name param to folder list endpoint
goldants Oct 1, 2024
7d5fb6b
Add name param to datasource, libraryquery list endpoint
goldants Oct 2, 2024
9541784
Refactor code to use StringUtils
dragonpoo Oct 17, 2024
172be23
sync style property views with applied comp styles + added useThemeSt…
raheeliftikhar5 Oct 17, 2024
60609a1
added showValidationMessageOnEmptyInput flag in input fields
raheeliftikhar5 Oct 17, 2024
dd36801
Fix required issue
dragonpoo Oct 17, 2024
49a4a61
Add authorization check to Extension Endpoint
dragonpoo Oct 22, 2024
1ff153e
Fix org list by email
dragonpoo Oct 23, 2024
1616232
theme canvas settings
raheeliftikhar5 Oct 8, 2024
420c56f
set default values for canvas settings
raheeliftikhar5 Oct 8, 2024
dba9097
theme canvas settings
raheeliftikhar5 Oct 10, 2024
e76ef90
canvas setting in theme and app
raheeliftikhar5 Oct 10, 2024
81a55be
small fix
raheeliftikhar5 Oct 10, 2024
21ced62
add rowCount in readonly view
raheeliftikhar5 Oct 11, 2024
9c11938
replaced color picker to allow gradient selection
raheeliftikhar5 Oct 15, 2024
c459d56
Timeline: added gradient
raheeliftikhar5 Oct 16, 2024
1c33fd0
added canvas bg color option in app Settings
raheeliftikhar5 Oct 16, 2024
4f19e7b
added background style utility
raheeliftikhar5 Oct 16, 2024
419c11c
ShapeComp: added gradient
raheeliftikhar5 Oct 16, 2024
aba86a6
Containers: added gradient
raheeliftikhar5 Oct 16, 2024
91d8e3a
List/GridView: added gradient
raheeliftikhar5 Oct 16, 2024
f462970
Modal/Drawer: added gradients
raheeliftikhar5 Oct 16, 2024
92292c3
added gradient
raheeliftikhar5 Oct 16, 2024
0d4b64d
Table: added gradient
raheeliftikhar5 Oct 17, 2024
f560a9a
Table: added gradients
raheeliftikhar5 Oct 18, 2024
557407f
fixed canvas settings
raheeliftikhar5 Oct 18, 2024
2f0a51a
set app default canvas settings
raheeliftikhar5 Oct 18, 2024
6c16141
show theme colors in preset colors for color picker
raheeliftikhar5 Oct 21, 2024
b09e024
separate app settings, canvas settings and js settings
raheeliftikhar5 Oct 21, 2024
89aa5d0
move theme selection in color settings
raheeliftikhar5 Oct 22, 2024
bd028f3
fix opacity not working
raheeliftikhar5 Oct 25, 2024
dd50f07
hide gradient selection in color picker for text/border colors
raheeliftikhar5 Oct 25, 2024
23ba36e
Merge pull request #1247 from lowcoder-org/theme_canvas_settings
FalkWolsky Oct 25, 2024
3c8bc96
Small branding changes in Seletable
Oct 25, 2024
861e472
fix canvas setting issues
raheeliftikhar5 Oct 28, 2024
3a95a7f
refresh oauth issue - invalid workspace id
dragonpoo Oct 25, 2024
b7277b0
disable email and providers based on workspace
dragonpoo Oct 25, 2024
f243dcc
Update Firebase Query to accept paging parameter
Oct 28, 2024
6ea831c
Updating Firestore Query to accept "startAt" for Pagination, Adapting…
Oct 28, 2024
e81a571
Updating yarn lock file for Node-Service
Oct 28, 2024
f5d21fa
Merge branch 'main' into dev
FalkWolsky Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move theme selection in color settings
  • Loading branch information
raheeliftikhar5 committed Oct 25, 2024
commit 89aa5d00105c3d90d193d5d71f78c44d0c93489c
154 changes: 83 additions & 71 deletions client/packages/lowcoder/src/comps/comps/appSettingsComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,36 +236,13 @@ function AppGeneralSettingsModal(props: ChildrenInstance) {
const lowcoderCompsMeta = useSelector((state: AppState) => state.npmPlugin.packageMeta['lowcoder-comps']);
const [lowcoderCompVersions, setLowcoderCompVersions] = useState(['latest']);
const {
themeList,
defaultTheme,
themeId,
title,
description,
icon,
category,
showHeaderInPublic,
preventAppStylesOverwriting,
lowcoderCompVersion,
} = props;

const THEME_OPTIONS = themeList?.map((theme) => ({
label: theme.name,
value: theme.id + "",
}));

const themeWithDefault = (
themeId.getView() === DEFAULT_THEMEID ||
(!!themeId.getView() &&
THEME_OPTIONS.findIndex((item) => item.value === themeId.getView()) === -1)
? DEFAULT_THEMEID
: themeId.getView()
) as string;

useEffect(() => {
if (themeWithDefault === DEFAULT_THEMEID) {
themeId.dispatchChangeValueAction(themeWithDefault);
}
}, [themeWithDefault]);

useEffect(() => {
setLowcoderCompVersions([
Expand All @@ -274,20 +251,6 @@ function AppGeneralSettingsModal(props: ChildrenInstance) {
])
}, [lowcoderCompsMeta])


const DropdownItem = (params: { value: string }) => {
const themeItem = themeList.find((theme) => theme.id === params.value);
return (
<ItemSpan>
<TagDesc $theme={themeItem?.theme}>
<div className="left" />
<div className="right" />
</TagDesc>
<EllipsisSpan style={{ maxWidth: "238px" }}>{themeItem?.name}</EllipsisSpan>
{themeItem?.id === defaultTheme && <DefaultSpan>{trans("appSetting.default")}</DefaultSpan>}
</ItemSpan>
);
};
return (
<>
<BaseSection
Expand Down Expand Up @@ -322,40 +285,6 @@ function AppGeneralSettingsModal(props: ChildrenInstance) {
label: trans("appSetting.showPublicHeader"),
})}
</div>
<Dropdown
defaultValue={
themeWithDefault === ""
? undefined
: themeWithDefault === DEFAULT_THEMEID
? defaultTheme || undefined
: themeWithDefault
}
placeholder={trans("appSetting.themeSettingDefault")}
options={THEME_OPTIONS}
label={trans("appSetting.themeSetting")}
placement="bottom"
itemNode={(value) => <DropdownItem value={value} />}
preNode={() => (
<>
<CreateDiv onClick={() => window.open(THEME_SETTING)}>
<StyledAddIcon />
{trans("appSetting.themeCreate")}
</CreateDiv>
<DividerStyled />
</>
)}
allowClear
onChange={(value) => {
themeId.dispatchChangeValueAction(
value === defaultTheme ? DEFAULT_THEMEID : value || ""
);
}}
/>
<div style={{ margin: '20px 0'}}>
{preventAppStylesOverwriting.propertyView({
label: trans("prop.preventOverwriting"),
})}
</div>
</DivStyled>
</BaseSection>
<BaseSection
Expand Down Expand Up @@ -409,6 +338,10 @@ function AppGeneralSettingsModal(props: ChildrenInstance) {

function AppCanvasSettingsModal(props: ChildrenInstance) {
const {
themeList,
defaultTheme,
themeId,
preventAppStylesOverwriting,
maxWidth,
gridColumns,
gridRowHeight,
Expand All @@ -423,8 +356,87 @@ function AppCanvasSettingsModal(props: ChildrenInstance) {
gridBgImageOrigin,
} = props;

const THEME_OPTIONS = themeList?.map((theme) => ({
label: theme.name,
value: theme.id + "",
}));

const themeWithDefault = (
themeId.getView() === DEFAULT_THEMEID ||
(!!themeId.getView() &&
THEME_OPTIONS.findIndex((item) => item.value === themeId.getView()) === -1)
? DEFAULT_THEMEID
: themeId.getView()
) as string;

useEffect(() => {
if (themeWithDefault === DEFAULT_THEMEID) {
themeId.dispatchChangeValueAction(themeWithDefault);
}
}, [themeWithDefault]);

const DropdownItem = (params: { value: string }) => {
const themeItem = themeList.find((theme) => theme.id === params.value);
return (
<ItemSpan>
<TagDesc $theme={themeItem?.theme}>
<div className="left" />
<div className="right" />
</TagDesc>
<EllipsisSpan style={{ maxWidth: "238px" }}>{themeItem?.name}</EllipsisSpan>
{themeItem?.id === defaultTheme && <DefaultSpan>{trans("appSetting.default")}</DefaultSpan>}
</ItemSpan>
);
};

return (
<>
<BaseSection
name={"Theme Settings"}
width={288}
noMargin
style={{
borderTop: "1px solid #e1e3eb",
backgroundColor: "#fff",
}}
>
<DivStyled>
<Dropdown
defaultValue={
themeWithDefault === ""
? undefined
: themeWithDefault === DEFAULT_THEMEID
? defaultTheme || undefined
: themeWithDefault
}
placeholder={trans("appSetting.themeSettingDefault")}
options={THEME_OPTIONS}
label={trans("appSetting.themeSetting")}
placement="bottom"
itemNode={(value) => <DropdownItem value={value} />}
preNode={() => (
<>
<CreateDiv onClick={() => window.open(THEME_SETTING)}>
<StyledAddIcon />
{trans("appSetting.themeCreate")}
</CreateDiv>
<DividerStyled />
</>
)}
allowClear
onChange={(value) => {
themeId.dispatchChangeValueAction(
value === defaultTheme ? DEFAULT_THEMEID : value || ""
);
}}
/>
<div style={{ margin: '20px 0'}}>
{preventAppStylesOverwriting.propertyView({
label: trans("prop.preventOverwriting"),
})}
</div>
</DivStyled>
</BaseSection>
<BaseSection
name={trans("appSetting.canvas")}
width={288}
Expand Down
25 changes: 13 additions & 12 deletions client/packages/lowcoder/src/pages/editor/editorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -562,18 +562,6 @@ function EditorView(props: EditorViewProps) {
{appSettingsComp.getPropertyView()}
</>
)}
<TitleDiv>{trans("leftPanel.toolbarTitle")}</TitleDiv>
{props.preloadComp.getPropertyView()}
<PreloadDiv
onClick={() => dispatch(
setEditorExternalStateAction({
showScriptsAndStyleModal: true,
})
)}
>
<LeftPreloadIcon />
{trans("leftPanel.toolbarPreload")}
</PreloadDiv>
</ScrollBar>
</SettingsDiv>
)}
Expand All @@ -595,6 +583,19 @@ function EditorView(props: EditorViewProps) {
</AppSettingContext.Provider>
{menuKey === SiderKey.JS && (
<>
<TitleDiv>{trans("leftPanel.toolbarTitle")}</TitleDiv>
{props.preloadComp.getPropertyView()}
<PreloadDiv
onClick={() => dispatch(
setEditorExternalStateAction({
showScriptsAndStyleModal: true,
})
)}
>
<LeftPreloadIcon />
{trans("leftPanel.toolbarPreload")}
</PreloadDiv>

{props.preloadComp.getJSLibraryPropertyView()}
</>
)}
Expand Down