Commit
·
19816d9
1
Parent(s):
2d1c19b
Changed Colors
Browse files
app/components/ui/Settings.tsx
CHANGED
@@ -10,6 +10,7 @@ import { toast } from 'react-toastify';
|
|
10 |
import { useNavigate } from '@remix-run/react';
|
11 |
import commit from '~/commit.json';
|
12 |
import Cookies from 'js-cookie';
|
|
|
13 |
|
14 |
interface SettingsProps {
|
15 |
open: boolean;
|
@@ -217,7 +218,9 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
217 |
onClick={() => setActiveTab(tab.id)}
|
218 |
className={classNames(
|
219 |
'w-full flex items-center gap-2 px-4 py-3 rounded-lg text-left text-sm transition-all mb-2',
|
220 |
-
activeTab === tab.id
|
|
|
|
|
221 |
)}
|
222 |
>
|
223 |
<div className={tab.icon} />
|
@@ -299,10 +302,10 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
299 |
checked={provider.isEnabled}
|
300 |
onChange={() => handleToggleProvider(provider.name)}
|
301 |
/>
|
302 |
-
<div className=
|
303 |
<div
|
304 |
-
className={`absolute left-0 w-6 h-6
|
305 |
-
provider.isEnabled ? 'transform translate-x-full bg-
|
306 |
}`}
|
307 |
></div>
|
308 |
</label>
|
@@ -325,7 +328,8 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
325 |
</div>
|
326 |
)}
|
327 |
{activeTab === 'features' && (
|
328 |
-
<div className="p-4">
|
|
|
329 |
<div className="flex items-center justify-between mb-2">
|
330 |
<span className="text-white">Debug Info</span>
|
331 |
<label className="relative inline-flex items-center cursor-pointer">
|
@@ -335,10 +339,10 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
335 |
checked={isDebugEnabled}
|
336 |
onChange={() => setIsDebugEnabled(!isDebugEnabled)}
|
337 |
/>
|
338 |
-
<div className=
|
339 |
<div
|
340 |
-
className={`absolute left-0 w-6 h-6
|
341 |
-
isDebugEnabled ? 'transform translate-x-full bg-
|
342 |
}`}
|
343 |
></div>
|
344 |
</label>
|
|
|
10 |
import { useNavigate } from '@remix-run/react';
|
11 |
import commit from '~/commit.json';
|
12 |
import Cookies from 'js-cookie';
|
13 |
+
import { SettingsSlider } from './SettingsSlider';
|
14 |
|
15 |
interface SettingsProps {
|
16 |
open: boolean;
|
|
|
218 |
onClick={() => setActiveTab(tab.id)}
|
219 |
className={classNames(
|
220 |
'w-full flex items-center gap-2 px-4 py-3 rounded-lg text-left text-sm transition-all mb-2',
|
221 |
+
activeTab === tab.id
|
222 |
+
? 'bg-gradient-to-r from-purple-500 to-blue-500 text-white'
|
223 |
+
: 'bg-gray-600 text-gray-200 hover:bg-gradient-to-r hover:from-purple-400 hover:to-blue-400',
|
224 |
)}
|
225 |
>
|
226 |
<div className={tab.icon} />
|
|
|
302 |
checked={provider.isEnabled}
|
303 |
onChange={() => handleToggleProvider(provider.name)}
|
304 |
/>
|
305 |
+
<div className={`w-11 h-6 rounded-full shadow-inner transition-colors duration-200 ${provider.isEnabled ? 'bg-[#b44aff]' : 'bg-gray-300'}`}></div>
|
306 |
<div
|
307 |
+
className={`absolute left-0 w-6 h-6 rounded-full shadow transition-transform duration-200 ease-in-out ${
|
308 |
+
provider.isEnabled ? 'transform translate-x-full bg-white' : 'bg-white'
|
309 |
}`}
|
310 |
></div>
|
311 |
</label>
|
|
|
328 |
</div>
|
329 |
)}
|
330 |
{activeTab === 'features' && (
|
331 |
+
<div className="p-4 bg-bolt-elements-background-depth-2 border border-bolt-elements-borderColor rounded-lg">
|
332 |
+
<h3 className="text-lg font-medium text-white mb-4">Feature Settings</h3>
|
333 |
<div className="flex items-center justify-between mb-2">
|
334 |
<span className="text-white">Debug Info</span>
|
335 |
<label className="relative inline-flex items-center cursor-pointer">
|
|
|
339 |
checked={isDebugEnabled}
|
340 |
onChange={() => setIsDebugEnabled(!isDebugEnabled)}
|
341 |
/>
|
342 |
+
<div className={`w-11 h-6 rounded-full shadow-inner transition-colors duration-200 ${isDebugEnabled ? 'bg-[#b44aff]' : 'bg-gray-300'}`}></div>
|
343 |
<div
|
344 |
+
className={`absolute left-0 w-6 h-6 rounded-full shadow transition-transform duration-200 ease-in-out ${
|
345 |
+
isDebugEnabled ? 'transform translate-x-full bg-white' : 'bg-white'
|
346 |
}`}
|
347 |
></div>
|
348 |
</label>
|
app/components/ui/SettingsSlider.tsx
CHANGED
@@ -25,8 +25,8 @@ export const SettingsSlider = memo(<T,>({ selected, options, setSelected }: Sett
|
|
25 |
<div className="relative flex items-center bg-bolt-elements-prompt-background rounded-lg">
|
26 |
<motion.div
|
27 |
className={classNames(
|
28 |
-
'absolute h-full
|
29 |
-
isLeftSelected ? 'left-0 w-1/2' : 'right-0 w-1/2',
|
30 |
)}
|
31 |
initial={false}
|
32 |
animate={{
|
|
|
25 |
<div className="relative flex items-center bg-bolt-elements-prompt-background rounded-lg">
|
26 |
<motion.div
|
27 |
className={classNames(
|
28 |
+
'absolute h-full transition-all duration-300 rounded-lg',
|
29 |
+
isLeftSelected ? 'left-0 w-1/2 bg-[#b44aff]' : 'right-0 w-1/2 bg-[#b44aff]',
|
30 |
)}
|
31 |
initial={false}
|
32 |
animate={{
|