Skip to content

Commit a9ec34f

Browse files
Merge pull request #1793 from kamalqureshi/settings_navigation_app
Updated navigation app for settings and JS
2 parents 0060f16 + 876fe31 commit a9ec34f

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import { DEFAULT_THEMEID } from "comps/utils/themeUtil";
1717
import { NumberControl, RangeControl, StringControl } from "comps/controls/codeControl";
1818
import { IconControl } from "comps/controls/iconControl";
1919
import { dropdownControl } from "comps/controls/dropdownControl";
20-
import { ApplicationCategoriesEnum } from "constants/applicationConstants";
20+
import { ApplicationCategoriesEnum, AppUILayoutType } from "constants/applicationConstants";
2121
import { BoolControl } from "../controls/boolControl";
22-
import { getNpmPackageMeta } from "../utils/remote";
2322
import { getPromiseAfterDispatch } from "@lowcoder-ee/util/promiseUtils";
2423
import type { AppState } from "@lowcoder-ee/redux/reducers";
2524
import { ColorControl } from "../controls/colorControl";
2625
import { DEFAULT_ROW_COUNT } from "@lowcoder-ee/layout/calculateUtils";
2726
import { AppSettingContext } from "../utils/appSettingContext";
28-
import { isPublicApplication } from "@lowcoder-ee/redux/selectors/applicationSelector";
27+
import { currentApplication, isPublicApplication } from "@lowcoder-ee/redux/selectors/applicationSelector";
28+
import { isAggregationApp } from "util/appUtils";
2929

3030
const TITLE = trans("appSetting.title");
3131
const USER_DEFINE = "__USER_DEFINE";
@@ -234,6 +234,7 @@ type ChildrenInstance = RecordConstructorToComp<typeof childrenMap> & {
234234
};
235235

236236
function AppGeneralSettingsModal(props: ChildrenInstance) {
237+
const application = useSelector(currentApplication);
237238
const lowcoderCompsMeta = useSelector((state: AppState) => state.npmPlugin.packageMeta['lowcoder-comps']);
238239
const [lowcoderCompVersions, setLowcoderCompVersions] = useState(['latest']);
239240
const {
@@ -288,7 +289,8 @@ function AppGeneralSettingsModal(props: ChildrenInstance) {
288289
</div>
289290
</DivStyled>
290291
</BaseSection>
291-
<BaseSection
292+
{application && !isAggregationApp(AppUILayoutType[application.applicationType]) &&
293+
<BaseSection
292294
name={"Lowcoder Comps"}
293295
width={288}
294296
noMargin
@@ -320,6 +322,7 @@ function AppGeneralSettingsModal(props: ChildrenInstance) {
320322
/>
321323
</DivStyled>
322324
</BaseSection>
325+
}
323326
<BaseSection
324327
name={"Shortcuts"}
325328
width={288}
@@ -520,7 +523,6 @@ export const AppSettingsComp = new MultiCompBuilder(childrenMap, (props) => {
520523
const { settingType } = useContext(AppSettingContext);
521524
const themeList = useSelector(getThemeList) || [];
522525
const defaultTheme = (useSelector(getDefaultTheme) || "").toString();
523-
524526
return settingType === 'canvas'
525527
? <AppCanvasSettingsModal {...children} themeList={themeList} defaultTheme={defaultTheme} />
526528
: <AppGeneralSettingsModal {...children} themeList={themeList} defaultTheme={defaultTheme} />;

client/packages/lowcoder/src/pages/editor/editorView.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,11 @@ const aggregationSiderItems = [
337337
{
338338
key: SiderKey.Setting,
339339
icon: <LeftSettingIcon />,
340-
}
340+
},
341+
{
342+
key: SiderKey.JS,
343+
icon: <LeftJSSettingIcon />,
344+
},
341345
];
342346

343347
const DeviceWrapper = ({
@@ -706,9 +710,7 @@ function EditorView(props: EditorViewProps) {
706710
<SettingsDiv>
707711
<ScrollBar>
708712
{application &&
709-
!isAggregationApp(
710-
AppUILayoutType[application.applicationType]
711-
) && (
713+
(
712714
<>
713715
{appSettingsComp.getPropertyView()}
714716
</>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy