Skip to content

Commit 7c3a3bb

Browse files
ui-ux: Setting-Menu
ui-ux: Setting Modal Changes
2 parents ecbf2f3 + 1e73e88 commit 7c3a3bb

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

app/components/settings/SettingsWindow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export const SettingsWindow = ({ open, onClose }: SettingsProps) => {
2727
const tabs: { id: TabType; label: string; icon: string; component?: ReactElement }[] = [
2828
{ id: 'chat-history', label: 'Chat History', icon: 'i-ph:book', component: <ChatHistoryTab /> },
2929
{ id: 'providers', label: 'Providers', icon: 'i-ph:key', component: <ProvidersTab /> },
30-
{ id: 'features', label: 'Features', icon: 'i-ph:star', component: <FeaturesTab /> },
3130
{ id: 'connection', label: 'Connection', icon: 'i-ph:link', component: <ConnectionsTab /> },
31+
{ id: 'features', label: 'Features', icon: 'i-ph:star', component: <FeaturesTab /> },
3232
...(debug
3333
? [
3434
{

app/components/settings/chat-history/ChatHistoryTab.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,20 @@ export default function ChatHistoryTab() {
2222
};
2323

2424
const handleDeleteAllChats = async () => {
25+
const confirmDelete = window.confirm("Are you sure you want to delete all chats? This action cannot be undone.");
26+
if (!confirmDelete) {
27+
return; // Exit if the user cancels
28+
}
29+
2530
if (!db) {
2631
const error = new Error('Database is not available');
2732
logStore.logError('Failed to delete chats - DB unavailable', error);
2833
toast.error('Database is not available');
29-
3034
return;
3135
}
3236

3337
try {
3438
setIsDeleting(true);
35-
3639
const allChats = await getAll(db);
3740
await Promise.all(allChats.map((chat) => deleteById(db!, chat.id)));
3841
logStore.logSystem('All chats deleted successfully', { count: allChats.length });
@@ -52,7 +55,6 @@ export default function ChatHistoryTab() {
5255
const error = new Error('Database is not available');
5356
logStore.logError('Failed to export chats - DB unavailable', error);
5457
toast.error('Database is not available');
55-
5658
return;
5759
}
5860

app/components/settings/debug/DebugTab.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useCallback, useEffect, useState } from 'react';
22
import { useSettings } from '~/lib/hooks/useSettings';
33
import commit from '~/commit.json';
4+
import { toast } from 'react-toastify';
45

56
interface ProviderStatus {
67
name: string;
@@ -308,8 +309,9 @@ export default function DebugTab() {
308309
Version: versionHash,
309310
Timestamp: new Date().toISOString(),
310311
};
312+
311313
navigator.clipboard.writeText(JSON.stringify(debugInfo, null, 2)).then(() => {
312-
alert('Debug information copied to clipboard!');
314+
toast.success('Debug information copied to clipboard!');
313315
});
314316
}, [activeProviders, systemInfo]);
315317

0 commit comments

Comments
 (0)