Commit
·
0bf6b6f
1
Parent(s):
96020a5
update to styles
Browse files
app/components/ui/Settings.tsx
CHANGED
@@ -207,14 +207,14 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
207 |
</RadixDialog.Overlay>
|
208 |
<RadixDialog.Content asChild>
|
209 |
<motion.div
|
210 |
-
className="fixed top-[50%] left-[50%] z-max h-[85vh] w-[90vw] max-w-[900px] translate-x-[-50%] translate-y-[-50%] border border-bolt-elements-borderColor rounded-lg
|
211 |
initial="closed"
|
212 |
animate="open"
|
213 |
exit="closed"
|
214 |
variants={dialogVariants}
|
215 |
>
|
216 |
<div className="flex h-full">
|
217 |
-
<div className="w-48 border-r border-bolt-elements-borderColor bg-gray-
|
218 |
{tabs.map((tab) => (
|
219 |
<button
|
220 |
key={tab.id}
|
@@ -249,12 +249,12 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
249 |
</div>
|
250 |
</div>
|
251 |
|
252 |
-
<div className="flex-1 flex flex-col p-8">
|
253 |
-
<DialogTitle className="flex-shrink-0 text-lg font-semibold text-
|
254 |
<div className="flex-1 overflow-y-auto">
|
255 |
{activeTab === 'chat-history' && (
|
256 |
<div className="p-4">
|
257 |
-
<h3 className="text-lg font-medium text-
|
258 |
<button
|
259 |
onClick={handleExportAllChats}
|
260 |
className="bg-blue-500 text-white rounded-lg px-4 py-2 hover:bg-blue-600 mb-4 transition-colors duration-200"
|
@@ -262,7 +262,7 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
262 |
Export All Chats
|
263 |
</button>
|
264 |
|
265 |
-
<div className="text-
|
266 |
<h4 className="font-semibold">Danger Area</h4>
|
267 |
<p className="mb-2">This action cannot be undone!</p>
|
268 |
<button
|
@@ -281,7 +281,7 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
281 |
{activeTab === 'providers' && (
|
282 |
<div className="p-4">
|
283 |
<div className="flex items-center justify-between mb-4">
|
284 |
-
<h3 className="text-lg font-medium text-
|
285 |
<input
|
286 |
type="text"
|
287 |
placeholder="Search providers..."
|
@@ -293,10 +293,10 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
293 |
{filteredProviders.map((provider) => (
|
294 |
<div
|
295 |
key={provider.name}
|
296 |
-
className="flex flex-col mb-6 provider-item hover:bg-
|
297 |
>
|
298 |
<div className="flex items-center justify-between mb-2">
|
299 |
-
<span className="text-
|
300 |
<label className="relative inline-flex items-center cursor-pointer">
|
301 |
<input
|
302 |
type="checkbox"
|
@@ -317,13 +317,13 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
317 |
{/* Base URL input for configurable providers */}
|
318 |
{URL_CONFIGURABLE_PROVIDERS.includes(provider.name) && provider.isEnabled && (
|
319 |
<div className="mt-2">
|
320 |
-
<label className="block text-sm text-
|
321 |
<input
|
322 |
type="text"
|
323 |
value={baseUrls[provider.name]}
|
324 |
onChange={(e) => handleBaseUrlChange(provider.name, e.target.value)}
|
325 |
placeholder={`Enter ${provider.name} base URL`}
|
326 |
-
className="w-full p-2 rounded border border-
|
327 |
/>
|
328 |
</div>
|
329 |
)}
|
@@ -332,10 +332,10 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
332 |
</div>
|
333 |
)}
|
334 |
{activeTab === 'features' && (
|
335 |
-
<div className="p-4 bg-bolt-elements-
|
336 |
-
<h3 className="text-lg font-medium text-
|
337 |
<div className="flex items-center justify-between mb-2">
|
338 |
-
<span className="text-
|
339 |
<label className="relative inline-flex items-center cursor-pointer">
|
340 |
<input
|
341 |
type="checkbox"
|
@@ -356,10 +356,10 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
356 |
</div>
|
357 |
)}
|
358 |
{activeTab === 'features' && (
|
359 |
-
<div className="p-4 bg-bolt-elements-
|
360 |
-
<h3 className="text-lg font-medium text-
|
361 |
<div className="flex items-center justify-between mb-2">
|
362 |
-
<span className="text-
|
363 |
<label className="relative inline-flex items-center cursor-pointer">
|
364 |
<input
|
365 |
type="checkbox"
|
@@ -381,7 +381,7 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
381 |
)}
|
382 |
{activeTab === 'debug' && isDebugEnabled && (
|
383 |
<div className="p-4">
|
384 |
-
<h3 className="text-lg font-medium text-
|
385 |
<button
|
386 |
onClick={handleCopyToClipboard}
|
387 |
className="bg-blue-500 text-white rounded-lg px-4 py-2 hover:bg-blue-600 mb-4 transition-colors duration-200"
|
@@ -389,30 +389,30 @@ export const Settings = ({ open, onClose }: SettingsProps) => {
|
|
389 |
Copy to Clipboard
|
390 |
</button>
|
391 |
|
392 |
-
<h4 className="text-md font-medium text-
|
393 |
-
<p className="text-
|
394 |
-
<p className="text-
|
395 |
|
396 |
-
<h4 className="text-md font-medium text-
|
397 |
<ul>
|
398 |
{providers
|
399 |
.filter((provider) => provider.isEnabled)
|
400 |
.map((provider) => (
|
401 |
-
<li key={provider.name} className="text-
|
402 |
{provider.name}
|
403 |
</li>
|
404 |
))}
|
405 |
</ul>
|
406 |
|
407 |
-
<h4 className="text-md font-medium text-
|
408 |
<ul>
|
409 |
-
<li className="text-
|
410 |
-
<li className="text-
|
411 |
-
<li className="text-
|
412 |
</ul>
|
413 |
|
414 |
-
<h4 className="text-md font-medium text-
|
415 |
-
<p className="text-
|
416 |
</div>
|
417 |
)}
|
418 |
</div>
|
|
|
207 |
</RadixDialog.Overlay>
|
208 |
<RadixDialog.Content asChild>
|
209 |
<motion.div
|
210 |
+
className="fixed top-[50%] left-[50%] z-max h-[85vh] w-[90vw] max-w-[900px] translate-x-[-50%] translate-y-[-50%] border border-bolt-elements-borderColor rounded-lg shadow-lg focus:outline-none overflow-hidden"
|
211 |
initial="closed"
|
212 |
animate="open"
|
213 |
exit="closed"
|
214 |
variants={dialogVariants}
|
215 |
>
|
216 |
<div className="flex h-full">
|
217 |
+
<div className="w-48 border-r border-bolt-elements-borderColor bg-white dark:bg-gray-900 p-4 flex flex-col justify-between settings-tabs">
|
218 |
{tabs.map((tab) => (
|
219 |
<button
|
220 |
key={tab.id}
|
|
|
249 |
</div>
|
250 |
</div>
|
251 |
|
252 |
+
<div className="flex-1 flex flex-col p-8 bg-gray-50 dark:bg-gray-800">
|
253 |
+
<DialogTitle className="flex-shrink-0 text-lg font-semibold text-bolt-elements-textPrimary">Settings</DialogTitle>
|
254 |
<div className="flex-1 overflow-y-auto">
|
255 |
{activeTab === 'chat-history' && (
|
256 |
<div className="p-4">
|
257 |
+
<h3 className="text-lg font-medium text-bolt-elements-textPrimary mb-4">Chat History</h3>
|
258 |
<button
|
259 |
onClick={handleExportAllChats}
|
260 |
className="bg-blue-500 text-white rounded-lg px-4 py-2 hover:bg-blue-600 mb-4 transition-colors duration-200"
|
|
|
262 |
Export All Chats
|
263 |
</button>
|
264 |
|
265 |
+
<div className="text-bolt-elements-textPrimary rounded-lg p-4 mb-4 settings-danger-area">
|
266 |
<h4 className="font-semibold">Danger Area</h4>
|
267 |
<p className="mb-2">This action cannot be undone!</p>
|
268 |
<button
|
|
|
281 |
{activeTab === 'providers' && (
|
282 |
<div className="p-4">
|
283 |
<div className="flex items-center justify-between mb-4">
|
284 |
+
<h3 className="text-lg font-medium text-bolt-elements-textPrimary">Providers</h3>
|
285 |
<input
|
286 |
type="text"
|
287 |
placeholder="Search providers..."
|
|
|
293 |
{filteredProviders.map((provider) => (
|
294 |
<div
|
295 |
key={provider.name}
|
296 |
+
className="flex flex-col mb-6 provider-item hover:bg-bolt-elements-bg-depth-3 p-4 rounded-lg"
|
297 |
>
|
298 |
<div className="flex items-center justify-between mb-2">
|
299 |
+
<span className="text-bolt-elements-textPrimary">{provider.name}</span>
|
300 |
<label className="relative inline-flex items-center cursor-pointer">
|
301 |
<input
|
302 |
type="checkbox"
|
|
|
317 |
{/* Base URL input for configurable providers */}
|
318 |
{URL_CONFIGURABLE_PROVIDERS.includes(provider.name) && provider.isEnabled && (
|
319 |
<div className="mt-2">
|
320 |
+
<label className="block text-sm text-bolt-elements-textSecondary mb-1">Base URL:</label>
|
321 |
<input
|
322 |
type="text"
|
323 |
value={baseUrls[provider.name]}
|
324 |
onChange={(e) => handleBaseUrlChange(provider.name, e.target.value)}
|
325 |
placeholder={`Enter ${provider.name} base URL`}
|
326 |
+
className="w-full p-2 rounded border border-bolt-elements-borderColor bg-bolt-elements-bg-depth-2 text-bolt-elements-textPrimary text-sm"
|
327 |
/>
|
328 |
</div>
|
329 |
)}
|
|
|
332 |
</div>
|
333 |
)}
|
334 |
{activeTab === 'features' && (
|
335 |
+
<div className="p-4 bg-bolt-elements-bg-depth-2 border border-bolt-elements-borderColor rounded-lg mb-4">
|
336 |
+
<h3 className="text-lg font-medium text-bolt-elements-textPrimary mb-4">Feature Settings</h3>
|
337 |
<div className="flex items-center justify-between mb-2">
|
338 |
+
<span className="text-bolt-elements-textPrimary">Debug Info</span>
|
339 |
<label className="relative inline-flex items-center cursor-pointer">
|
340 |
<input
|
341 |
type="checkbox"
|
|
|
356 |
</div>
|
357 |
)}
|
358 |
{activeTab === 'features' && (
|
359 |
+
<div className="p-4 bg-bolt-elements-bg-depth-2 border border-bolt-elements-borderColor rounded-lg">
|
360 |
+
<h3 className="text-lg font-medium text-bolt-elements-textPrimary mb-4">Experimental Area</h3>
|
361 |
<div className="flex items-center justify-between mb-2">
|
362 |
+
<span className="text-bolt-elements-textPrimary">Replace with local models</span>
|
363 |
<label className="relative inline-flex items-center cursor-pointer">
|
364 |
<input
|
365 |
type="checkbox"
|
|
|
381 |
)}
|
382 |
{activeTab === 'debug' && isDebugEnabled && (
|
383 |
<div className="p-4">
|
384 |
+
<h3 className="text-lg font-medium text-bolt-elements-textPrimary mb-4">Debug Tab</h3>
|
385 |
<button
|
386 |
onClick={handleCopyToClipboard}
|
387 |
className="bg-blue-500 text-white rounded-lg px-4 py-2 hover:bg-blue-600 mb-4 transition-colors duration-200"
|
|
|
389 |
Copy to Clipboard
|
390 |
</button>
|
391 |
|
392 |
+
<h4 className="text-md font-medium text-bolt-elements-textPrimary">System Information</h4>
|
393 |
+
<p className="text-bolt-elements-textSecondary">OS: {navigator.platform}</p>
|
394 |
+
<p className="text-bolt-elements-textSecondary">Browser: {navigator.userAgent}</p>
|
395 |
|
396 |
+
<h4 className="text-md font-medium text-bolt-elements-textPrimary mt-4">Active Features</h4>
|
397 |
<ul>
|
398 |
{providers
|
399 |
.filter((provider) => provider.isEnabled)
|
400 |
.map((provider) => (
|
401 |
+
<li key={provider.name} className="text-bolt-elements-textSecondary">
|
402 |
{provider.name}
|
403 |
</li>
|
404 |
))}
|
405 |
</ul>
|
406 |
|
407 |
+
<h4 className="text-md font-medium text-bolt-elements-textPrimary mt-4">Base URLs</h4>
|
408 |
<ul>
|
409 |
+
<li className="text-bolt-elements-textSecondary">Ollama: {process.env.REACT_APP_OLLAMA_URL}</li>
|
410 |
+
<li className="text-bolt-elements-textSecondary">OpenAI: {process.env.REACT_APP_OPENAI_URL}</li>
|
411 |
+
<li className="text-bolt-elements-textSecondary">LM Studio: {process.env.REACT_APP_LM_STUDIO_URL}</li>
|
412 |
</ul>
|
413 |
|
414 |
+
<h4 className="text-md font-medium text-bolt-elements-textPrimary mt-4">Version Information</h4>
|
415 |
+
<p className="text-bolt-elements-textSecondary">Version Hash: {versionHash}</p>
|
416 |
</div>
|
417 |
)}
|
418 |
</div>
|
app/styles/components/Settings.scss
CHANGED
@@ -12,49 +12,49 @@
|
|
12 |
margin-bottom: 0.5rem;
|
13 |
|
14 |
&.active {
|
15 |
-
background:
|
16 |
-
color:
|
17 |
}
|
18 |
|
19 |
&:not(.active) {
|
20 |
-
background:
|
21 |
-
color:
|
22 |
|
23 |
&:hover {
|
24 |
-
background:
|
25 |
}
|
26 |
}
|
27 |
}
|
28 |
}
|
29 |
|
30 |
.settings-button {
|
31 |
-
background-color:
|
32 |
-
color:
|
33 |
border-radius: 0.5rem;
|
34 |
padding: 0.5rem 1rem;
|
35 |
transition: background-color 0.2s;
|
36 |
|
37 |
&:hover {
|
38 |
-
background-color:
|
39 |
}
|
40 |
}
|
41 |
|
42 |
.settings-danger-area {
|
43 |
background-color: transparent;
|
44 |
-
color:
|
45 |
border-radius: 0.5rem;
|
46 |
padding: 1rem;
|
47 |
margin-bottom: 1rem;
|
48 |
|
49 |
button {
|
50 |
-
background-color:
|
51 |
-
color:
|
52 |
border-radius: 0.5rem;
|
53 |
padding: 0.5rem 1rem;
|
54 |
transition: background-color 0.2s;
|
55 |
|
56 |
&:hover {
|
57 |
-
background-color:
|
58 |
}
|
59 |
}
|
60 |
}
|
|
|
12 |
margin-bottom: 0.5rem;
|
13 |
|
14 |
&.active {
|
15 |
+
background: var(--bolt-elements-button-primary-background);
|
16 |
+
color: var(--bolt-elements-textPrimary);
|
17 |
}
|
18 |
|
19 |
&:not(.active) {
|
20 |
+
background: var(--bolt-elements-bg-depth-3);
|
21 |
+
color: var(--bolt-elements-textPrimary);
|
22 |
|
23 |
&:hover {
|
24 |
+
background: var(--bolt-elements-button-primary-backgroundHover);
|
25 |
}
|
26 |
}
|
27 |
}
|
28 |
}
|
29 |
|
30 |
.settings-button {
|
31 |
+
background-color: var(--bolt-elements-button-primary-background);
|
32 |
+
color: var(--bolt-elements-textPrimary);
|
33 |
border-radius: 0.5rem;
|
34 |
padding: 0.5rem 1rem;
|
35 |
transition: background-color 0.2s;
|
36 |
|
37 |
&:hover {
|
38 |
+
background-color: var(--bolt-elements-button-primary-backgroundHover);
|
39 |
}
|
40 |
}
|
41 |
|
42 |
.settings-danger-area {
|
43 |
background-color: transparent;
|
44 |
+
color: var(--bolt-elements-textPrimary);
|
45 |
border-radius: 0.5rem;
|
46 |
padding: 1rem;
|
47 |
margin-bottom: 1rem;
|
48 |
|
49 |
button {
|
50 |
+
background-color: var(--bolt-elements-button-danger-background);
|
51 |
+
color: var(--bolt-elements-button-danger-text);
|
52 |
border-radius: 0.5rem;
|
53 |
padding: 0.5rem 1rem;
|
54 |
transition: background-color 0.2s;
|
55 |
|
56 |
&:hover {
|
57 |
+
background-color: var(--bolt-elements-button-danger-backgroundHover);
|
58 |
}
|
59 |
}
|
60 |
}
|
app/styles/components/SettingsSlider.scss
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
|
4 |
&__thumb {
|
5 |
@apply absolute h-full transition-all duration-300 rounded-lg;
|
6 |
-
background-color:
|
7 |
|
8 |
&--left {
|
9 |
@apply left-0 w-1/2;
|
@@ -18,7 +18,7 @@
|
|
18 |
@apply relative z-10 flex-1 p-2 rounded-lg text-sm transition-colors duration-200;
|
19 |
|
20 |
&--selected {
|
21 |
-
@apply text-
|
22 |
}
|
23 |
|
24 |
&--unselected {
|
@@ -32,16 +32,17 @@
|
|
32 |
@apply w-11 h-6 rounded-full shadow-inner transition-colors duration-200;
|
33 |
|
34 |
&--enabled {
|
35 |
-
background-color:
|
36 |
}
|
37 |
|
38 |
&--disabled {
|
39 |
-
|
40 |
}
|
41 |
}
|
42 |
|
43 |
&__thumb {
|
44 |
-
@apply absolute left-0 w-6 h-6 rounded-full shadow transition-transform duration-200 ease-in-out
|
|
|
45 |
|
46 |
&--enabled {
|
47 |
@apply transform translate-x-full;
|
|
|
3 |
|
4 |
&__thumb {
|
5 |
@apply absolute h-full transition-all duration-300 rounded-lg;
|
6 |
+
background-color: var(--bolt-elements-button-primary-background);
|
7 |
|
8 |
&--left {
|
9 |
@apply left-0 w-1/2;
|
|
|
18 |
@apply relative z-10 flex-1 p-2 rounded-lg text-sm transition-colors duration-200;
|
19 |
|
20 |
&--selected {
|
21 |
+
@apply text-bolt-elements-textPrimary;
|
22 |
}
|
23 |
|
24 |
&--unselected {
|
|
|
32 |
@apply w-11 h-6 rounded-full shadow-inner transition-colors duration-200;
|
33 |
|
34 |
&--enabled {
|
35 |
+
background-color: var(--bolt-elements-item-contentAccent);
|
36 |
}
|
37 |
|
38 |
&--disabled {
|
39 |
+
background-color: var(--bolt-elements-bg-depth-3);
|
40 |
}
|
41 |
}
|
42 |
|
43 |
&__thumb {
|
44 |
+
@apply absolute left-0 w-6 h-6 rounded-full shadow transition-transform duration-200 ease-in-out;
|
45 |
+
background-color: var(--bolt-elements-textPrimary);
|
46 |
|
47 |
&--enabled {
|
48 |
@apply transform translate-x-full;
|