From 3e1c9fab764ee61bc6130d3f6a1f0f8aaf9cb23b Mon Sep 17 00:00:00 2001 From: Alex Norman Date: Tue, 25 Jun 2024 07:12:50 -0700 Subject: [PATCH 1/3] simplify configuration setting titles --- src/models/config.ts | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/models/config.ts b/src/models/config.ts index d8aa26d0..0486f466 100644 --- a/src/models/config.ts +++ b/src/models/config.ts @@ -53,52 +53,52 @@ const instanceConfigDetails: Partial Date: Tue, 25 Jun 2024 07:13:03 -0700 Subject: [PATCH 2/3] rename "Instance" tab to "Patcher Instance" in settings except mobile where it is too big --- src/components/settings/index.tsx | 49 ++++++++++++++++--------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/src/components/settings/index.tsx b/src/components/settings/index.tsx index 8566df5f..da27f810 100644 --- a/src/components/settings/index.tsx +++ b/src/components/settings/index.tsx @@ -129,30 +129,6 @@ const SettingsTabPanel: FunctionComponent = memo(function ); }); -const tabConfigByTab: Record = { - [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.UI); @@ -160,6 +136,7 @@ const Settings: FunctionComponent = memo(function WrappedSettings() { const dispatch = useAppDispatch(); const showFullScreen = useIsMobileDevice(); + const isMobile = useIsMobileDevice(); const [ doShowSettings, @@ -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.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 ( Date: Tue, 25 Jun 2024 18:14:09 +0100 Subject: [PATCH 3/3] more responsive settings ui --- src/components/settings/index.tsx | 14 +++++++---- src/components/settings/item.tsx | 4 +-- src/components/settings/settings.module.css | 28 +++++++++++++++------ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/components/settings/index.tsx b/src/components/settings/index.tsx index da27f810..685ff96a 100644 --- a/src/components/settings/index.tsx +++ b/src/components/settings/index.tsx @@ -1,4 +1,4 @@ -import { Anchor, Button, Group, Modal, Stack, Tabs } from "@mantine/core"; +import { Anchor, Button, Group, Modal, Stack, Tabs, Text } from "@mantine/core"; import SettingsList from "./list"; import { FunctionComponent, memo, useCallback, useState } from "react"; import { useAppDispatch, useAppSelector } from "../../hooks/useAppDispatch"; @@ -113,7 +113,8 @@ const SettingsTabPanel: FunctionComponent = memo(function actions.map((info, i) => (