Skip to content

Commit 8d7d71f

Browse files
author
FalkWolsky
committed
Introducing Layout / Logic Mode step 4 - Tabs
1 parent 5c732d9 commit 8d7d71f

File tree

3 files changed

+61
-35
lines changed

3 files changed

+61
-35
lines changed

client/packages/lowcoder/src/comps/comps/tabs/tabbedContainerComp.tsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,26 @@ export const TabbedContainerBaseComp = (function () {
237237
newOptionLabel: "Tab",
238238
})}
239239
{children.selectedTabKey.propertyView({ label: trans("prop.defaultValue") })}
240-
{children.autoHeight.getPropertyView()}
241240
</Section>
242-
<Section name={sectionNames.interaction}>
243-
{children.onEvent.getPropertyView()}
244-
{disabledPropertyView(children)}
245-
</Section>
246-
<Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
247-
<Section name={sectionNames.style}>{children.style.getPropertyView()}</Section>
241+
242+
{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
243+
<Section name={sectionNames.interaction}>
244+
{children.onEvent.getPropertyView()}
245+
{disabledPropertyView(children)}
246+
{hiddenPropertyView(children)}
247+
</Section>
248+
)}
249+
250+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
251+
<>
252+
<Section name={sectionNames.layout}>
253+
{children.autoHeight.getPropertyView()}
254+
</Section>
255+
<Section name={sectionNames.style}>
256+
{children.style.getPropertyView()}
257+
</Section>
258+
</>
259+
)}
248260
</>
249261
);
250262
})

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

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ import { Timeline } from "antd";
6262

6363
import { ANTDICON } from "./antIcon"; // todo: select icons to not import all icons
6464

65+
import { useContext } from "react";
66+
import { EditorContext } from "comps/editorState";
67+
6568
const EventOptions = [
6669
clickEvent,
6770
] as const;
@@ -167,24 +170,34 @@ let TimeLineBasicComp = (function () {
167170
tooltip: TimelineDataTooltip,
168171
placeholder: "[]",
169172
})}
170-
{children.mode.propertyView({
171-
label: trans("timeLine.mode"),
172-
tooltip: trans("timeLine.modeTooltip"),
173-
})}
174-
{children.reverse.propertyView({
175-
label: trans("timeLine.reverse"),
176-
})}
177-
{children.pending.propertyView({
178-
label: trans("timeLine.pending"),
179-
})}
180-
</Section>
181-
<Section name={sectionNames.layout}>
182-
{children.onEvent.getPropertyView()}
183-
{hiddenPropertyView(children)}
184-
</Section>
185-
<Section name={sectionNames.style}>
186-
{children.style.getPropertyView()}
187173
</Section>
174+
175+
{["logic", "both"].includes(useContext(EditorContext).editorModeStatus) && (
176+
<Section name={sectionNames.interaction}>
177+
{children.onEvent.getPropertyView()}
178+
{hiddenPropertyView(children)}
179+
</Section>
180+
)}
181+
182+
{["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
183+
<><Section name={sectionNames.layout}>
184+
{children.mode.propertyView({
185+
label: trans("timeLine.mode"),
186+
tooltip: trans("timeLine.modeTooltip"),
187+
})}
188+
{children.pending.propertyView({
189+
label: trans("timeLine.pending"),
190+
tooltip: trans("timeLine.pendingDescription"),
191+
})}
192+
{children.reverse.propertyView({
193+
label: trans("timeLine.reverse"),
194+
})}
195+
</Section>
196+
<Section name={sectionNames.style}>
197+
{children.style.getPropertyView()}
198+
</Section>
199+
</>
200+
)}
188201
</>
189202
))
190203
.build();

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2639,20 +2639,21 @@ export const en = {
26392639
},
26402640
/////////////////////
26412641
timeLine: {
2642-
titleColor: "title Color",
2643-
subTitleColor: "subTitle Color",
2644-
lableColor: "lable Color",
2645-
value: "value",
2646-
mode: "mode",
2647-
left: "Left",
2648-
right: "Right",
2649-
alternate: "alternate",
2642+
titleColor: "Title color",
2643+
subTitleColor: "Subtitle color",
2644+
lableColor: "Label color",
2645+
value: "Timeline data",
2646+
mode: "Display order",
2647+
left: "Content right",
2648+
right: "Content left",
2649+
alternate: "Alternate content order",
26502650
modeTooltip:
26512651
"Set the content to appear left/right or alternately on both sides of the timeline",
2652-
reverse: "reverse",
2653-
pending: "pending",
2652+
reverse: "Newest events first",
2653+
pending: "Pending node text",
2654+
pendingDescription: "When set, then an last node with the text and a waiting indicator will be displayed.",
26542655
defaultPending: "continuous improvement",
2655-
clickTitleEvent: "clickTitleEvent",
2656+
clickTitleEvent: "Click Title Event",
26562657
clickTitleEventDesc: "click Title Event",
26572658
Introduction: "Introduction keys",
26582659
helpTitle: "title of timeline(Required)",

0 commit comments

Comments
 (0)