Files
claudecodeui/src/components/quick-settings-panel/view/QuickSettingsContent.tsx
Haile a8dab0edcf fix(ui): remove mobile bottom nav, unify processing indicator, and improve tooltip behavior on mobile (#632)
* fix: update tooltip component

* fix: remove the mobile navigation component

In addition,
- the sidebar is also updated to take full space
- the terminal shortcuts in shell are updated to not interfere with the
shell content.

* fix: remove mobile nav component

* fix: remove "Thinking..." indicator

In addition, the claude status component has been restyled to be more
compact and less obtrusive.
- The type and prop arguments for ChatMessagesPane have been updated to
remove the isLoading prop, which was only used to control the display of
 the AssistantThinkingIndicator.

* fix: show elapsed time only when loading

---------

Co-authored-by: Haileyesus <something@gmail.com>
Co-authored-by: Simos Mikelatos <simosmik@gmail.com>
2026-04-10 12:36:06 +02:00

81 lines
2.6 KiB
TypeScript

import { Moon, Sun } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { DarkModeToggle } from '../../../shared/view/ui';
import LanguageSelector from '../../../shared/view/ui/LanguageSelector';
import {
INPUT_SETTING_TOGGLES,
SETTING_ROW_CLASS,
TOOL_DISPLAY_TOGGLES,
VIEW_OPTION_TOGGLES,
} from '../constants';
import type {
PreferenceToggleItem,
PreferenceToggleKey,
QuickSettingsPreferences,
} from '../types';
import QuickSettingsSection from './QuickSettingsSection';
import QuickSettingsToggleRow from './QuickSettingsToggleRow';
import QuickSettingsWhisperSection from './QuickSettingsWhisperSection';
type QuickSettingsContentProps = {
isDarkMode: boolean;
preferences: QuickSettingsPreferences;
onPreferenceChange: (key: PreferenceToggleKey, value: boolean) => void;
};
export default function QuickSettingsContent({
isDarkMode,
preferences,
onPreferenceChange,
}: QuickSettingsContentProps) {
const { t } = useTranslation('settings');
const renderToggleRows = (items: PreferenceToggleItem[]) => (
items.map(({ key, labelKey, icon }) => (
<QuickSettingsToggleRow
key={key}
label={t(labelKey)}
icon={icon}
checked={preferences[key]}
onCheckedChange={(value) => onPreferenceChange(key, value)}
/>
))
);
return (
<div className="flex-1 space-y-6 overflow-y-auto overflow-x-hidden bg-background p-4">
<QuickSettingsSection title={t('quickSettings.sections.appearance')}>
<div className={SETTING_ROW_CLASS}>
<span className="flex items-center gap-2 text-sm text-gray-900 dark:text-white">
{isDarkMode ? (
<Moon className="h-4 w-4 text-gray-600 dark:text-gray-400" />
) : (
<Sun className="h-4 w-4 text-gray-600 dark:text-gray-400" />
)}
{t('quickSettings.darkMode')}
</span>
<DarkModeToggle />
</div>
<LanguageSelector compact />
</QuickSettingsSection>
<QuickSettingsSection title={t('quickSettings.sections.toolDisplay')}>
{renderToggleRows(TOOL_DISPLAY_TOGGLES)}
</QuickSettingsSection>
<QuickSettingsSection title={t('quickSettings.sections.viewOptions')}>
{renderToggleRows(VIEW_OPTION_TOGGLES)}
</QuickSettingsSection>
<QuickSettingsSection title={t('quickSettings.sections.inputSettings')}>
{renderToggleRows(INPUT_SETTING_TOGGLES)}
<p className="ml-3 text-xs text-gray-500 dark:text-gray-400">
{t('quickSettings.sendByCtrlEnterDescription')}
</p>
</QuickSettingsSection>
<QuickSettingsWhisperSection />
</div>
);
}