Skip to content

Commit

Permalink
rename "Instance" tab to "Patcher Instance" in settings
Browse files Browse the repository at this point in the history
except mobile where it is too big
  • Loading branch information
x37v committed Jun 25, 2024
1 parent 3e1c9fa commit 6f37e51
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions src/components/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,37 +129,14 @@ const SettingsTabPanel: FunctionComponent<SettingsTabPanelProps> = memo(function
);
});

const tabConfigByTab: Record<SettingsTab, TabConfig> = {
[SettingsTab.UI]: {
title: "UI",
description: "UI settings are device scoped, saved to the local storage and restored on page load."
},
[SettingsTab.Control]: {
title: "Control"
},
[SettingsTab.Instance]: {
title: "Instance"
},
[SettingsTab.Audio]: {
title: "Audio",
actions: [
{
action: updateRunnerAudio,
description: "Restarts the Jack Server with the updated configuration",
icon: mdiRestart,
label: "Apply Configuration"
}
]
}
};

const Settings: FunctionComponent = memo(function WrappedSettings() {

const [activeTab, setActiveTab] = useState<SettingsTab>(SettingsTab.UI);
const [showAbout, setShowAbout] = useState<boolean>(false);
const dispatch = useAppDispatch();

const showFullScreen = useIsMobileDevice();
const isMobile = useIsMobileDevice();

const [
doShowSettings,
Expand All @@ -181,6 +158,30 @@ const Settings: FunctionComponent = memo(function WrappedSettings() {
const onOpenAbout = useCallback(() => setShowAbout(true), [setShowAbout]);
const onCloseAbout = useCallback(() => setShowAbout(false), [setShowAbout]);

const tabConfigByTab: Record<SettingsTab, TabConfig> = {
[SettingsTab.UI]: {
title: "UI",
description: "UI settings are device scoped, saved to the local storage and restored on page load."
},
[SettingsTab.Control]: {
title: "Control"
},
[SettingsTab.Instance]: {
title: isMobile ? "Instance" : "Patcher Instance"
},
[SettingsTab.Audio]: {
title: "Audio",
actions: [
{
action: updateRunnerAudio,
description: "Restarts the Jack Server with the updated configuration",
icon: mdiRestart,
label: "Apply Configuration"
}
]
}
};

return (
<Modal
onClose={ onCloseSettingsModal }
Expand Down

0 comments on commit 6f37e51

Please sign in to comment.