mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 21:50:36 +00:00
# UI V3 Changelog Major updates and improvements in this release: ## Core Changes - Complete NEW REWRITTEN UI system overhaul (V3) with semantic design tokens - New settings management system with drag-and-drop capabilities - Enhanced provider system supporting multiple AI services - Improved theme system with better dark mode support - New component library with consistent design patterns ## Technical Updates - Reorganized project architecture for better maintainability - Performance optimizations and bundle size improvements - Enhanced security features and access controls - Improved developer experience with better tooling - Comprehensive testing infrastructure ## New Features - Background rays effect for improved visual feedback - Advanced tab management system - Automatic and manual update support - Enhanced error handling and visualization - Improved accessibility across all components For detailed information about all changes and improvements, please see the full changelog.
29 lines
735 B
TypeScript
29 lines
735 B
TypeScript
import { atom } from 'nanostores';
|
|
|
|
interface Profile {
|
|
username: string;
|
|
bio: string;
|
|
avatar: string;
|
|
}
|
|
|
|
// Initialize with stored profile or defaults
|
|
const storedProfile = typeof window !== 'undefined' ? localStorage.getItem('bolt_profile') : null;
|
|
const initialProfile: Profile = storedProfile
|
|
? JSON.parse(storedProfile)
|
|
: {
|
|
username: '',
|
|
bio: '',
|
|
avatar: '',
|
|
};
|
|
|
|
export const profileStore = atom<Profile>(initialProfile);
|
|
|
|
export const updateProfile = (updates: Partial<Profile>) => {
|
|
profileStore.set({ ...profileStore.get(), ...updates });
|
|
|
|
// Persist to localStorage
|
|
if (typeof window !== 'undefined') {
|
|
localStorage.setItem('bolt_profile', JSON.stringify(profileStore.get()));
|
|
}
|
|
};
|