Stijnus
commited on
Commit
·
b99ab7a
1
Parent(s):
308f363
final UI fixes
Browse files
app/components/settings/event-logs/EventLogsTab.tsx
CHANGED
@@ -5,6 +5,7 @@ import { logStore, type LogEntry } from '~/lib/stores/logs';
|
|
5 |
import { useStore } from '@nanostores/react';
|
6 |
import { classNames } from '~/utils/classNames';
|
7 |
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
|
8 |
|
9 |
interface SelectOption {
|
10 |
value: string;
|
@@ -241,16 +242,18 @@ export function EventLogsTab() {
|
|
241 |
</div>
|
242 |
</div>
|
243 |
<div className="flex items-center gap-4">
|
244 |
-
<
|
245 |
onClick={handleRefresh}
|
246 |
-
className=
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
|
|
251 |
>
|
252 |
-
<div className="i-ph:arrows-clockwise text-
|
253 |
-
|
|
|
254 |
</div>
|
255 |
</div>
|
256 |
|
|
|
5 |
import { useStore } from '@nanostores/react';
|
6 |
import { classNames } from '~/utils/classNames';
|
7 |
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
8 |
+
import { settingsStyles } from '~/components/settings/settings.styles';
|
9 |
|
10 |
interface SelectOption {
|
11 |
value: string;
|
|
|
242 |
</div>
|
243 |
</div>
|
244 |
<div className="flex items-center gap-4">
|
245 |
+
<button
|
246 |
onClick={handleRefresh}
|
247 |
+
className={classNames(
|
248 |
+
settingsStyles.button.base,
|
249 |
+
settingsStyles.button.secondary,
|
250 |
+
'hover:bg-purple-500/10 hover:text-purple-500',
|
251 |
+
'dark:bg-[#1A1A1A] dark:hover:bg-purple-500/20 dark:text-bolt-elements-textPrimary dark:hover:text-purple-500',
|
252 |
+
)}
|
253 |
>
|
254 |
+
<div className="i-ph:arrows-clockwise text-lg" />
|
255 |
+
{isRefreshing ? 'Refreshing...' : 'Refresh Logs'}
|
256 |
+
</button>
|
257 |
</div>
|
258 |
</div>
|
259 |
|
app/components/settings/profile/ProfileTab.tsx
CHANGED
@@ -4,6 +4,7 @@ import { toast } from 'react-toastify';
|
|
4 |
import { classNames } from '~/utils/classNames';
|
5 |
import type { UserProfile } from '~/components/settings/settings.types';
|
6 |
import { motion } from 'framer-motion';
|
|
|
7 |
|
8 |
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
|
9 |
const ALLOWED_FILE_TYPES = ['image/jpeg', 'image/png', 'image/gif'];
|
@@ -92,6 +93,15 @@ export default function ProfileTab() {
|
|
92 |
};
|
93 |
|
94 |
localStorage.setItem('bolt_user_profile', JSON.stringify(updatedProfile));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
toast.success('Profile settings saved successfully');
|
96 |
} catch (error) {
|
97 |
console.error('Error saving profile:', error);
|
@@ -234,18 +244,13 @@ export default function ProfileTab() {
|
|
234 |
</motion.div>
|
235 |
|
236 |
{/* Save Button */}
|
237 |
-
<
|
238 |
-
className="flex justify-end mt-6"
|
239 |
-
initial={{ opacity: 0, y: 20 }}
|
240 |
-
animate={{ opacity: 1, y: 0 }}
|
241 |
-
transition={{ delay: 0.2 }}
|
242 |
-
>
|
243 |
<button
|
244 |
onClick={handleSave}
|
245 |
disabled={isLoading}
|
246 |
className={classNames(
|
247 |
-
|
248 |
-
|
249 |
'hover:bg-purple-600',
|
250 |
'disabled:opacity-50 disabled:cursor-not-allowed',
|
251 |
)}
|
@@ -262,7 +267,7 @@ export default function ProfileTab() {
|
|
262 |
</>
|
263 |
)}
|
264 |
</button>
|
265 |
-
</
|
266 |
</div>
|
267 |
);
|
268 |
}
|
|
|
4 |
import { classNames } from '~/utils/classNames';
|
5 |
import type { UserProfile } from '~/components/settings/settings.types';
|
6 |
import { motion } from 'framer-motion';
|
7 |
+
import { settingsStyles } from '~/components/settings/settings.styles';
|
8 |
|
9 |
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
|
10 |
const ALLOWED_FILE_TYPES = ['image/jpeg', 'image/png', 'image/gif'];
|
|
|
93 |
};
|
94 |
|
95 |
localStorage.setItem('bolt_user_profile', JSON.stringify(updatedProfile));
|
96 |
+
|
97 |
+
// Dispatch a storage event to notify other components
|
98 |
+
window.dispatchEvent(
|
99 |
+
new StorageEvent('storage', {
|
100 |
+
key: 'bolt_user_profile',
|
101 |
+
newValue: JSON.stringify(updatedProfile),
|
102 |
+
}),
|
103 |
+
);
|
104 |
+
|
105 |
toast.success('Profile settings saved successfully');
|
106 |
} catch (error) {
|
107 |
console.error('Error saving profile:', error);
|
|
|
244 |
</motion.div>
|
245 |
|
246 |
{/* Save Button */}
|
247 |
+
<div className="flex justify-end mt-6">
|
|
|
|
|
|
|
|
|
|
|
248 |
<button
|
249 |
onClick={handleSave}
|
250 |
disabled={isLoading}
|
251 |
className={classNames(
|
252 |
+
settingsStyles.button.base,
|
253 |
+
settingsStyles.button.primary,
|
254 |
'hover:bg-purple-600',
|
255 |
'disabled:opacity-50 disabled:cursor-not-allowed',
|
256 |
)}
|
|
|
267 |
</>
|
268 |
)}
|
269 |
</button>
|
270 |
+
</div>
|
271 |
</div>
|
272 |
);
|
273 |
}
|
app/components/settings/settings/SettingsTab.tsx
CHANGED
@@ -5,6 +5,7 @@ import { classNames } from '~/utils/classNames';
|
|
5 |
import { Switch } from '~/components/ui/Switch';
|
6 |
import { themeStore, kTheme } from '~/lib/stores/theme';
|
7 |
import type { UserProfile } from '~/components/settings/settings.types';
|
|
|
8 |
|
9 |
export default function SettingsTab() {
|
10 |
const [currentTimezone, setCurrentTimezone] = useState('');
|
@@ -88,10 +89,11 @@ export default function SettingsTab() {
|
|
88 |
key={theme}
|
89 |
onClick={() => setSettings((prev) => ({ ...prev, theme }))}
|
90 |
className={classNames(
|
91 |
-
|
|
|
92 |
settings.theme === theme
|
93 |
-
? 'bg-purple-500 text-white hover:bg-purple-600'
|
94 |
-
: 'bg-
|
95 |
)}
|
96 |
>
|
97 |
<div
|
@@ -119,7 +121,7 @@ export default function SettingsTab() {
|
|
119 |
onChange={(e) => setSettings((prev) => ({ ...prev, language: e.target.value }))}
|
120 |
className={classNames(
|
121 |
'w-full px-3 py-2 rounded-lg text-sm',
|
122 |
-
'bg-[#
|
123 |
'border border-[#E5E5E5] dark:border-[#1A1A1A]',
|
124 |
'text-bolt-elements-textPrimary',
|
125 |
'focus:outline-none focus:ring-2 focus:ring-purple-500/30',
|
@@ -199,7 +201,7 @@ export default function SettingsTab() {
|
|
199 |
onChange={(e) => setSettings((prev) => ({ ...prev, timezone: e.target.value }))}
|
200 |
className={classNames(
|
201 |
'w-full px-3 py-2 rounded-lg text-sm',
|
202 |
-
'bg-[#
|
203 |
'border border-[#E5E5E5] dark:border-[#1A1A1A]',
|
204 |
'text-bolt-elements-textPrimary',
|
205 |
'focus:outline-none focus:ring-2 focus:ring-purple-500/30',
|
|
|
5 |
import { Switch } from '~/components/ui/Switch';
|
6 |
import { themeStore, kTheme } from '~/lib/stores/theme';
|
7 |
import type { UserProfile } from '~/components/settings/settings.types';
|
8 |
+
import { settingsStyles } from '~/components/settings/settings.styles';
|
9 |
|
10 |
export default function SettingsTab() {
|
11 |
const [currentTimezone, setCurrentTimezone] = useState('');
|
|
|
89 |
key={theme}
|
90 |
onClick={() => setSettings((prev) => ({ ...prev, theme }))}
|
91 |
className={classNames(
|
92 |
+
settingsStyles.button.base,
|
93 |
+
settings.theme === theme ? settingsStyles.button.primary : settingsStyles.button.secondary,
|
94 |
settings.theme === theme
|
95 |
+
? 'dark:bg-purple-500 dark:text-white dark:hover:bg-purple-600 dark:hover:text-white'
|
96 |
+
: 'hover:bg-purple-500/10 hover:text-purple-500 dark:bg-[#1A1A1A] dark:hover:bg-purple-500/20 dark:text-bolt-elements-textPrimary dark:hover:text-purple-500',
|
97 |
)}
|
98 |
>
|
99 |
<div
|
|
|
121 |
onChange={(e) => setSettings((prev) => ({ ...prev, language: e.target.value }))}
|
122 |
className={classNames(
|
123 |
'w-full px-3 py-2 rounded-lg text-sm',
|
124 |
+
'bg-[#FAFAFA] dark:bg-[#0A0A0A]',
|
125 |
'border border-[#E5E5E5] dark:border-[#1A1A1A]',
|
126 |
'text-bolt-elements-textPrimary',
|
127 |
'focus:outline-none focus:ring-2 focus:ring-purple-500/30',
|
|
|
201 |
onChange={(e) => setSettings((prev) => ({ ...prev, timezone: e.target.value }))}
|
202 |
className={classNames(
|
203 |
'w-full px-3 py-2 rounded-lg text-sm',
|
204 |
+
'bg-[#FAFAFA] dark:bg-[#0A0A0A]',
|
205 |
'border border-[#E5E5E5] dark:border-[#1A1A1A]',
|
206 |
'text-bolt-elements-textPrimary',
|
207 |
'focus:outline-none focus:ring-2 focus:ring-purple-500/30',
|