Update .gitignore, refactor UI components, and enhance model download logic

- Added CLAUDE.local.md to .gitignore to prevent local configuration files from being tracked.
- Refactored the App component layout for improved responsiveness and user experience.
- Updated ModelDownloadProgress to include a new `isDownloaded` state for better visibility of download status.
- Simplified SettingsHome by commenting out unused functions and improving the organization of settings options.
- Adjusted PrivacyPanel to ensure analytics settings are correctly evaluated.
- Modified various page components to use `min-h-full` for consistent height management across the application.
This commit is contained in:
Steven Enamakel
2026-02-06 01:59:56 +05:30
parent af7ca87831
commit aeb9626db1
12 changed files with 140 additions and 140 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ const ModelDownloadProgress = ({
className = '',
showWhenLoaded = false,
}: ModelDownloadProgressProps) => {
const { isAvailable, isLoaded, isLoading, downloadProgress, error, ensureLoaded } =
const { isAvailable, isLoaded, isLoading, isDownloaded, downloadProgress, error, ensureLoaded } =
useModelStatus();
const [isMobile, setIsMobile] = useState(false);
@@ -63,8 +63,8 @@ const ModelDownloadProgress = ({
return null;
}
// Don't render if loaded and showWhenLoaded is false
if (isLoaded && !showWhenLoaded && !isLoading) {
// Hide when downloaded or loaded (nothing for the user to do)
if ((isDownloaded || isLoaded) && !showWhenLoaded && !isLoading) {
return null;
}
+62 -62
View File
@@ -13,10 +13,10 @@ const SettingsHome = () => {
closeSettings();
};
const handleViewEncryptionKey = () => {
// TODO: Show encryption key in a secure modal
console.log('View encryption key');
};
// const handleViewEncryptionKey = () => {
// // TODO: Show encryption key in a secure modal
// console.log('View encryption key');
// };
const handleDeleteAllData = () => {
// TODO: Show confirmation dialog and delete all data
@@ -64,63 +64,63 @@ const SettingsHome = () => {
onClick: () => navigateToSettings('privacy'),
dangerous: false,
},
{
id: 'profile',
title: 'Profile',
description: 'Update your profile information and preferences',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
/>
</svg>
),
onClick: () => navigateToSettings('profile'),
dangerous: false,
},
{
id: 'advanced',
title: 'Advanced',
description: 'Advanced configuration and developer options',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
/>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
/>
</svg>
),
onClick: () => navigateToSettings('advanced'),
dangerous: false,
},
{
id: 'encryption',
title: 'View Encryption Key',
description: 'Access your encryption key for backup purposes',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M15 7a2 2 0 0 1 2 2m4 0a6 6 0 0 1-7.743 5.743L11 17H9v2H7v2H4a1 1 0 0 1-1-1v-2.586a1 1 0 0 1 .293-.707l5.964-5.964A6 6 0 1 1 21 9z"
/>
</svg>
),
onClick: handleViewEncryptionKey,
dangerous: false,
},
// {
// id: 'profile',
// title: 'Profile',
// description: 'Update your profile information and preferences',
// icon: (
// <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
// <path
// strokeLinecap="round"
// strokeLinejoin="round"
// strokeWidth={2}
// d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
// />
// </svg>
// ),
// onClick: () => navigateToSettings('profile'),
// dangerous: false,
// },
// {
// id: 'advanced',
// title: 'Advanced',
// description: 'Advanced configuration and developer options',
// icon: (
// <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
// <path
// strokeLinecap="round"
// strokeLinejoin="round"
// strokeWidth={2}
// d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
// />
// <path
// strokeLinecap="round"
// strokeLinejoin="round"
// strokeWidth={2}
// d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
// />
// </svg>
// ),
// onClick: () => navigateToSettings('advanced'),
// dangerous: false,
// },
// {
// id: 'encryption',
// title: 'View Encryption Key',
// description: 'Access your encryption key for backup purposes',
// icon: (
// <svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
// <path
// strokeLinecap="round"
// strokeLinejoin="round"
// strokeWidth={2}
// d="M15 7a2 2 0 0 1 2 2m4 0a6 6 0 0 1-7.743 5.743L11 17H9v2H7v2H4a1 1 0 0 1-1-1v-2.586a1 1 0 0 1 .293-.707l5.964-5.964A6 6 0 1 1 21 9z"
// />
// </svg>
// ),
// onClick: handleViewEncryptionKey,
// dangerous: false,
// },
{
id: 'team',
title: 'Team',
@@ -140,7 +140,7 @@ const SettingsHome = () => {
},
{
id: 'billing',
title: 'Billing',
title: 'Billing & Usage',
description: 'Manage your subscription and payment methods',
icon: (
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -11,7 +11,7 @@ const PrivacyPanel = () => {
const analyticsEnabled = useAppSelector(state => {
const userId = state.user.user?._id;
if (!userId) return false;
return state.auth.isAnalyticsEnabledByUser[userId] === true;
return state.auth.isAnalyticsEnabledByUser[userId] !== false;
});
const handleToggleAnalytics = () => {