Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions src/containers/UserSettings/UserSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ export const UserSettings = ({settings: userSettings}: UserSettingsProps) => {
return (
<Settings>
{userSettings.map((page) => {
const {id, title, icon, sections = []} = page;
const {id, title, icon, sections = [], showTitle} = page;

return (
<Settings.Page key={id} id={id} title={title} icon={icon}>
{sections.map((section) => {
const {title: sectionTitle, settings: sectionSettings = []} = section;

return (
<Settings.Section key={id} title={sectionTitle}>
<Settings.Section
key={id}
title={sectionTitle}
showTitle={showTitle ?? true}
>
{sectionSettings.map((setting) => {
if (setting.type === 'info') {
return (
Expand Down
5 changes: 5 additions & 0 deletions src/containers/UserSettings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export interface SettingsPage {
title: string;
icon: IconProps;
sections: SettingsSection[];
// default true
showTitle?: false;
}

export type YDBEmbeddedUISettings = SettingsPage[];
Expand Down Expand Up @@ -155,12 +157,14 @@ export const generalPage: SettingsPage = {
title: i18n('page.general'),
icon: {data: StarFill, height: 14, width: 14},
sections: [appearanceSection],
showTitle: false,
};
export const experimentsPage: SettingsPage = {
id: 'experimentsPage',
title: i18n('page.experiments'),
icon: {data: Flask},
sections: [experimentsSection],
showTitle: false,
};
export const editorPage: SettingsPage = {
id: 'editorPage',
Expand All @@ -174,6 +178,7 @@ export const aboutPage: SettingsPage = {
title: i18n('page.about'),
icon: {data: CircleInfo},
sections: [aboutSettingsSection],
showTitle: false,
};

export function getUserSettings({singleClusterMode}: {singleClusterMode: boolean}) {
Expand Down
Loading