diff --git a/app/components/Settings.tsx b/app/components/Settings.tsx index e3e626b..7875724 100644 --- a/app/components/Settings.tsx +++ b/app/components/Settings.tsx @@ -15,7 +15,6 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( const [newName, setNewName] = useState(''); const [newEmail, setNewEmail] = useState(''); const [newPassword, setNewPassword] = useState(''); - const [preferredMessurement, setPreferredMessurement] = useState('Metric'); // Theme settings state const [backgroundColor, setBackgroundColor] = useState(getComputedStyle(document.documentElement).getPropertyValue('--background-color').trim()); @@ -38,15 +37,9 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( const [fontFamily, setFontFamily] = useState(getComputedStyle(document.documentElement).getPropertyValue('--font-family').trim()); const [fontSize, setFontSize] = useState(getComputedStyle(document.documentElement).getPropertyValue('--font-size').trim()); - // Theme selection - const [selectedTheme, setSelectedTheme] = useState('default'); + // Theme selection + const [selectedTheme, setSelectedTheme] = useState('default'); - // API Keys - const [laPlateforme, setLaPlateforme] = useState(getComputedStyle(document.documentElement).getPropertyValue('--online-la-plateforme').trim()); - const [openAI, setOpenAI] = useState(getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-openai').trim()); - const [anthropic, setAnthropic] = useState(getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-anthropic').trim()); - const [google, setGoogle] = useState(getComputedStyle(document.documentElement).getPropertyValue('--online-cheap-google').trim()); - // Apply imported settings to the CSS variables const applySettings = (settings: any) => { if (settings.backgroundColor) { @@ -154,102 +147,85 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( case 'general': return (
-

General Settings

- -
- - +

General Settings

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - {/* New Preferred Measurement Option */} -
- - -
-
- ); + ); case 'privacy': return ( @@ -721,55 +697,17 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( ); - case 'api': - return ( -
-
- - setLaPlateforme(e.target.value)} - /> -
-
- - setOpenAI(e.target.value)} - /> -
-
- - setAnthropic(e.target.value)} - /> -
-
- - setGoogle(e.target.value)} - /> -
-
- ); - case 'im/export': return (

Import & Export

Export the settings

- +

Import the settings

- +
); @@ -810,7 +748,6 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( fontSize, preferredLanguage, preferredCurrency, - preferredMessurement, dateFormat, timeFormat, timeZone, @@ -818,14 +755,7 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = ( disableChatHistory, disableAIMemory, openSourceMode, - - // API Keys - laPlateforme, - openAI, - anthropic, - google -}; - + }; return (
@@ -838,7 +768,6 @@ const Settings: React.FC<{ closeSettings: () => void; accountName: string }> = (
  • setActiveSection('theme')}>Theme
  • setActiveSection('foss')}>FOSS
  • setActiveSection('account')}>Account
  • -
  • setActiveSection('api')}>API Keys
  • setActiveSection('im/export')}>Import/Export
  • diff --git a/app/components/json/black.json b/app/components/json/black.json deleted file mode 100644 index cc56d50..0000000 --- a/app/components/json/black.json +++ /dev/null @@ -1 +0,0 @@ -{"backgroundColor":"#8B9635","textColor":"#474D22","inputBackgroundColor":"#ffffff","inputButtonColor":"#8B9635","inputButtonHoverColor":"#6b7c2b","userMessageBackgroundColor":"#8B9635","userMessageTextColor":"#000","aiMessageBackgroundColor":"#FCFCEB","aiMessageTextColor":"#000","buttonBackgroundColor":"#8B9635","buttonHoverBackgroundColor":"#6b7c2b","modelsBackgroundColor":"#ffffff","historyBackgroundColor":"#f9f9f9","leftPanelBackgroundColor":"#79832e","conversationBackgroundColor":"#79832e","popUpTextColor":"#000","inputBorderColor":"#8B9635","fontFamily":"'Poppins', 'sans-serif'","fontSize":"16px","preferredLanguage":"en","preferredCurrency":"usd","dateFormat":"mm/dd/yyyy","timeFormat":"12-hour","timeZone":"GMT","disableOnlineAI":false,"disableChatHistory":false,"disableAIMemory":false,"openSourceMode":false,"laPlateforme":"","openAI":"","anthropic":"","google":""} \ No newline at end of file diff --git a/app/components/json/iomarket.json b/app/components/json/iomarket.json deleted file mode 100644 index cc56d50..0000000 --- a/app/components/json/iomarket.json +++ /dev/null @@ -1 +0,0 @@ -{"backgroundColor":"#8B9635","textColor":"#474D22","inputBackgroundColor":"#ffffff","inputButtonColor":"#8B9635","inputButtonHoverColor":"#6b7c2b","userMessageBackgroundColor":"#8B9635","userMessageTextColor":"#000","aiMessageBackgroundColor":"#FCFCEB","aiMessageTextColor":"#000","buttonBackgroundColor":"#8B9635","buttonHoverBackgroundColor":"#6b7c2b","modelsBackgroundColor":"#ffffff","historyBackgroundColor":"#f9f9f9","leftPanelBackgroundColor":"#79832e","conversationBackgroundColor":"#79832e","popUpTextColor":"#000","inputBorderColor":"#8B9635","fontFamily":"'Poppins', 'sans-serif'","fontSize":"16px","preferredLanguage":"en","preferredCurrency":"usd","dateFormat":"mm/dd/yyyy","timeFormat":"12-hour","timeZone":"GMT","disableOnlineAI":false,"disableChatHistory":false,"disableAIMemory":false,"openSourceMode":false,"laPlateforme":"","openAI":"","anthropic":"","google":""} \ No newline at end of file diff --git a/app/components/json/white.json b/app/components/json/white.json deleted file mode 100644 index cc56d50..0000000 --- a/app/components/json/white.json +++ /dev/null @@ -1 +0,0 @@ -{"backgroundColor":"#8B9635","textColor":"#474D22","inputBackgroundColor":"#ffffff","inputButtonColor":"#8B9635","inputButtonHoverColor":"#6b7c2b","userMessageBackgroundColor":"#8B9635","userMessageTextColor":"#000","aiMessageBackgroundColor":"#FCFCEB","aiMessageTextColor":"#000","buttonBackgroundColor":"#8B9635","buttonHoverBackgroundColor":"#6b7c2b","modelsBackgroundColor":"#ffffff","historyBackgroundColor":"#f9f9f9","leftPanelBackgroundColor":"#79832e","conversationBackgroundColor":"#79832e","popUpTextColor":"#000","inputBorderColor":"#8B9635","fontFamily":"'Poppins', 'sans-serif'","fontSize":"16px","preferredLanguage":"en","preferredCurrency":"usd","dateFormat":"mm/dd/yyyy","timeFormat":"12-hour","timeZone":"GMT","disableOnlineAI":false,"disableChatHistory":false,"disableAIMemory":false,"openSourceMode":false,"laPlateforme":"","openAI":"","anthropic":"","google":""} \ No newline at end of file diff --git a/app/styles/Settings.css b/app/styles/Settings.css index a2224a4..bf88759 100644 --- a/app/styles/Settings.css +++ b/app/styles/Settings.css @@ -147,16 +147,3 @@ display: block; font-weight: bold; } - -.export-button{ - background-color: var(--button-hover-background-color); - padding: 10px; - margin: 10px; - border-radius: 10px; -} - -.import-file{ - background-color: var(--button-hover-background-color); - padding: 10px; - margin: 10px; -} \ No newline at end of file diff --git a/py/api.py b/py/api.py index 273a633..228f567 100644 --- a/py/api.py +++ b/py/api.py @@ -1,4 +1,4 @@ - from flask import Flask, request, jsonify +from flask import Flask, request, jsonify from flask_cors import CORS import secrets import threading