diff --git a/.claude/settings.local.json b/.claude/settings.local.json index c445e37..1e73a56 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -48,7 +48,8 @@ "Bash(git log:*)", "Bash(grep:*)", "Bash(powershell -Command \"Get-Content ''e:\\\\MyTaskly\\\\MyTaskly-app\\\\src\\\\locales\\\\en.json'' | Select-Object -Last 20\")", - "Bash(powershell -Command \"Get-Content ''e:\\\\MyTaskly\\\\MyTaskly-app\\\\src\\\\locales\\\\it.json'' | Select-Object -Last 20\")" + "Bash(powershell -Command \"Get-Content ''e:\\\\MyTaskly\\\\MyTaskly-app\\\\src\\\\locales\\\\it.json'' | Select-Object -Last 20\")", + "Bash(npm ls:*)" ], "deny": [], "defaultMode": "acceptEdits" diff --git a/src/navigation/index.tsx b/src/navigation/index.tsx index 95de432..7ec07aa 100644 --- a/src/navigation/index.tsx +++ b/src/navigation/index.tsx @@ -32,7 +32,6 @@ import NotificationDebugScreen from "./screens/NotificationDebug"; import BugReportScreen from "./screens/BugReport"; //import StatisticsScreen from "./screens/Statistics"; import { NotFound as NotFoundScreen } from "./screens/NotFound"; -import CalendarWidgetDemoScreen from "./screens/CalendarWidgetDemo"; import eventEmitter, { emitScreenChange, EVENTS } from "../utils/eventEmitter"; import { useNotifications } from "../services/notificationService"; import AppInitializer from "../services/AppInitializer"; @@ -462,11 +461,6 @@ function AppStack() { component={BugReportScreen} options={{ title: t('navigation.screens.bugReport') }} /> - diff --git a/src/navigation/screens/CalendarWidgetDemo.tsx b/src/navigation/screens/CalendarWidgetDemo.tsx deleted file mode 100644 index 75058cb..0000000 --- a/src/navigation/screens/CalendarWidgetDemo.tsx +++ /dev/null @@ -1,1482 +0,0 @@ -import React, { useState, useEffect, useRef } from 'react'; -import { - View, - Text, - StyleSheet, - ScrollView, - TouchableOpacity, - TextInput, - Dimensions, - Modal, - SafeAreaView, - StatusBar, - Platform, - Animated, - Easing, -} from 'react-native'; -import { Calendar } from 'react-native-calendars'; -import { Ionicons } from '@expo/vector-icons'; - -interface Task { - id: string; - title: string; - date: string; - completed: boolean; -} - -interface Message { - id: string; - text: string; - isBot: boolean; - timestamp: Date; - taskWidget?: { - taskId: string; - action: 'created' | 'moved' | 'updated'; - }; -} - -const { height } = Dimensions.get('window'); - -export default function CalendarWidgetDemo() { - const [mode, setMode] = useState<'text' | 'voice'>('text'); - const [calendarModalVisible, setCalendarModalVisible] = useState(false); - const [inputText, setInputText] = useState(''); - const [isRecording, setIsRecording] = useState(false); - const [selectedTaskId, setSelectedTaskId] = useState(null); - const [botModifiedDates, setBotModifiedDates] = useState(['2025-12-30', '2026-01-02']); - const [focusMode, setFocusMode] = useState(false); - const [isBotSpeaking, setIsBotSpeaking] = useState(false); - const [botThinking, setBotThinking] = useState(false); - const [showTaskAnimation, setShowTaskAnimation] = useState(false); - const [movingTaskId, setMovingTaskId] = useState(null); - - // Animated values - const focusModeScale = useRef(new Animated.Value(0)).current; - const focusModeOpacity = useRef(new Animated.Value(0)).current; - const botPulse = useRef(new Animated.Value(1)).current; - const taskMoveAnim = useRef(new Animated.Value(0)).current; - const taskCardAnim = useRef(new Animated.Value(0)).current; - const thinkingDots = useRef([ - new Animated.Value(0), - new Animated.Value(0), - new Animated.Value(0), - ]).current; - - // Demo tasks - const [tasks, setTasks] = useState([ - { id: '1', title: 'Riunione team', date: '2025-12-29', completed: false }, - { id: '2', title: 'Palestra', date: '2025-12-30', completed: false }, - { id: '3', title: 'Appuntamento medico', date: '2025-12-31', completed: false }, - { id: '4', title: 'Compleanno Maria', date: '2026-01-02', completed: false }, - ]); - - // Demo messages - const [messages] = useState([ - { - id: '1', - text: 'Ciao! Come posso aiutarti oggi?', - isBot: true, - timestamp: new Date('2025-12-29T10:00:00'), - }, - { - id: '2', - text: 'Vorrei organizzare i miei impegni della settimana', - isBot: false, - timestamp: new Date('2025-12-29T10:01:00'), - }, - { - id: '3', - text: 'Perfetto! Ho aperto il calendario per te. Puoi vedere tutti i tuoi impegni e spostarli. Cosa vuoi organizzare per primo?', - isBot: true, - timestamp: new Date('2025-12-29T10:01:30'), - }, - { - id: '4', - text: 'Devo spostare la riunione a domani', - isBot: false, - timestamp: new Date('2025-12-29T10:02:00'), - }, - { - id: '5', - text: 'Ho spostato la "Riunione team" a domani, 30 dicembre.', - isBot: true, - timestamp: new Date('2025-12-29T10:02:15'), - taskWidget: { - taskId: '1', - action: 'moved', - }, - }, - { - id: '6', - text: 'Grazie! Aggiungi anche cena con amici il 2 gennaio', - isBot: false, - timestamp: new Date('2025-12-29T10:03:00'), - }, - { - id: '7', - text: 'Perfetto! Ho aggiunto "Cena con amici" per il 2 gennaio.', - isBot: true, - timestamp: new Date('2025-12-29T10:03:15'), - taskWidget: { - taskId: '4', - action: 'created', - }, - }, - ]); - - // Calendar marked dates - const getMarkedDates = () => { - const marked: any = {}; - tasks.forEach((task) => { - const isBotModified = botModifiedDates.includes(task.date); - const isSelected = selectedTaskId === task.id; - - if (!marked[task.date]) { - marked[task.date] = { - dots: [], - selected: isSelected, - selectedColor: isSelected ? '#000000' : undefined, - }; - } - - // Aggiungi evidenziazione per date modificate dal bot - if (isBotModified) { - marked[task.date].marked = true; - marked[task.date].dotColor = '#000000'; - } - - marked[task.date].dots.push({ - key: task.id, - color: task.completed ? '#666666' : '#000000', - }); - }); - return marked; - }; - - const handleTaskWidgetPress = (taskId: string) => { - setSelectedTaskId(taskId); - setCalendarModalVisible(true); - }; - - // Animazione bot pulse quando parla - useEffect(() => { - let pulseAnimation: Animated.CompositeAnimation | null = null; - - if (isBotSpeaking) { - pulseAnimation = Animated.loop( - Animated.sequence([ - Animated.timing(botPulse, { - toValue: 1.15, - duration: 800, - easing: Easing.inOut(Easing.ease), - useNativeDriver: true, - }), - Animated.timing(botPulse, { - toValue: 1, - duration: 800, - easing: Easing.inOut(Easing.ease), - useNativeDriver: true, - }), - ]) - ); - pulseAnimation.start(); - } else { - botPulse.stopAnimation(); - botPulse.setValue(1); - } - - return () => { - if (pulseAnimation) { - pulseAnimation.stop(); - } - }; - }, [isBotSpeaking]); - - // Animazione thinking dots - useEffect(() => { - let thinkingAnimations: Animated.CompositeAnimation[] = []; - - if (botThinking) { - const animations = thinkingDots.map((dot, index) => - Animated.loop( - Animated.sequence([ - Animated.delay(index * 200), - Animated.timing(dot, { - toValue: -8, - duration: 400, - easing: Easing.inOut(Easing.ease), - useNativeDriver: true, - }), - Animated.timing(dot, { - toValue: 0, - duration: 400, - easing: Easing.inOut(Easing.ease), - useNativeDriver: true, - }), - ]) - ) - ); - - thinkingAnimations = animations; - Animated.parallel(animations).start(); - } else { - thinkingDots.forEach(dot => { - dot.stopAnimation(); - dot.setValue(0); - }); - } - - return () => { - thinkingAnimations.forEach(anim => anim.stop()); - }; - }, [botThinking]); - - // Animazione focus mode - useEffect(() => { - if (focusMode) { - Animated.parallel([ - Animated.spring(focusModeScale, { - toValue: 1, - friction: 8, - tension: 40, - useNativeDriver: true, - }), - Animated.timing(focusModeOpacity, { - toValue: 1, - duration: 300, - useNativeDriver: true, - }), - ]).start(); - } else { - Animated.parallel([ - Animated.timing(focusModeScale, { - toValue: 0.8, - duration: 200, - useNativeDriver: true, - }), - Animated.timing(focusModeOpacity, { - toValue: 0, - duration: 200, - useNativeDriver: true, - }), - ]).start(); - } - }, [focusMode]); - - const toggleRecording = () => { - const wasRecording = isRecording; - setIsRecording(!isRecording); - - if (!wasRecording && focusMode) { - // Inizia sequenza animazioni solo se entriamo in recording mode in focus - // Bot pensa - setBotThinking(true); - - const thinkingTimeout = setTimeout(() => { - setBotThinking(false); - setIsBotSpeaking(true); - - // Dopo 1.5sec inizia animazione spostamento - const animationTimeout = setTimeout(() => { - setMovingTaskId('1'); - setShowTaskAnimation(true); - - // Animazione task card che appare - Animated.sequence([ - Animated.spring(taskCardAnim, { - toValue: 1, - friction: 8, - tension: 40, - useNativeDriver: true, - }), - Animated.delay(2000), - Animated.timing(taskCardAnim, { - toValue: 0, - duration: 300, - useNativeDriver: true, - }), - ]).start(() => { - setShowTaskAnimation(false); - setMovingTaskId(null); - }); - - // Animazione movimento task effettivo - Animated.sequence([ - Animated.timing(taskMoveAnim, { - toValue: 1, - duration: 1500, - easing: Easing.bezier(0.25, 0.1, 0.25, 1), - useNativeDriver: true, - }), - Animated.timing(taskMoveAnim, { - toValue: 0, - duration: 0, - useNativeDriver: true, - }), - ]).start(); - }, 1500); - - // Ferma il bot che parla dopo 5 secondi TOTALI (2s thinking + 3s speaking) - const speakingTimeout = setTimeout(() => { - setIsBotSpeaking(false); - setIsRecording(false); - }, 3000); - - return () => { - clearTimeout(animationTimeout); - clearTimeout(speakingTimeout); - }; - }, 2000); - - return () => { - clearTimeout(thinkingTimeout); - }; - } else if (wasRecording) { - // Se stiamo fermando la registrazione, ferma tutto - setBotThinking(false); - setIsBotSpeaking(false); - setShowTaskAnimation(false); - setMovingTaskId(null); - } - }; - - const toggleTaskComplete = (taskId: string) => { - setTasks((prev) => - prev.map((t) => (t.id === taskId ? { ...t, completed: !t.completed } : t)) - ); - }; - - const handleAttachTask = () => { - // Apri modal per selezionare task da allegare - setCalendarModalVisible(true); - }; - - const toggleFocusMode = () => { - const wasFocusMode = focusMode; - setFocusMode(!focusMode); - - if (!wasFocusMode) { - // Entrando in focus mode - non fare nulla, aspetta che user prema rec - } else { - // Uscendo da focus mode - resetta tutto - setIsRecording(false); - setIsBotSpeaking(false); - setBotThinking(false); - setShowTaskAnimation(false); - setMovingTaskId(null); - - // Resetta anche le animazioni - taskCardAnim.setValue(0); - taskMoveAnim.setValue(0); - } - }; - - return ( - - - - {/* Header */} - - - Calendar Widget Demo - Concept di organizzazione collaborativa - - - setMode('text')} - > - - - setMode('voice')} - > - - - - - - {/* Calendar Modal */} - setCalendarModalVisible(false)} - > - - - - Calendario Organizzazione - setCalendarModalVisible(false)}> - - - - - { - console.log('Selected day:', day.dateString); - }} - /> - - {/* Task list */} - - - I tuoi impegni - {selectedTaskId && ( - setSelectedTaskId(null)}> - Deseleziona - - )} - - {tasks.map((task) => { - const isBotModified = botModifiedDates.includes(task.date); - const isSelected = selectedTaskId === task.id; - - return ( - setSelectedTaskId(task.id)} - activeOpacity={0.7} - > - - toggleTaskComplete(task.id)}> - - - - - - {task.title} - - {isBotModified && !isSelected && ( - - - Bot - - )} - {isBotModified && isSelected && ( - - - Bot - - )} - - - {task.date} - - - - - - - - ); - })} - - - - - - {/* Chat/Voice Interface */} - - {mode === 'text' ? ( - <> - {/* Text Chat Messages */} - - {messages.map((message) => ( - - - - {message.text} - - - {message.timestamp.toLocaleTimeString('it-IT', { - hour: '2-digit', - minute: '2-digit', - })} - - - - {/* Task Widget */} - {message.taskWidget && message.isBot && ( - handleTaskWidgetPress(message.taskWidget!.taskId)} - activeOpacity={0.7} - > - - - - - - - {tasks.find((t) => t.id === message.taskWidget!.taskId)?.title} - - - {tasks.find((t) => t.id === message.taskWidget!.taskId)?.date} - - - - - - - - Tocca per modificare nel calendario - - - - )} - - ))} - - - {/* Text Input */} - - - setCalendarModalVisible(true)} - > - - - - - - - - - - - - - ) : ( - <> - {/* Voice Chat Interface */} - {!focusMode ? ( - - - - {isRecording ? 'Ascolto in corso...' : 'Tocca per parlare'} - - - - {/* Waveform visualization */} - {isRecording && ( - - {[...Array(20)].map((_, i) => ( - - ))} - - )} - - {/* Voice messages transcription */} - - - Tu: - - "Vorrei organizzare i miei impegni della settimana" - - - - Bot: - - "Perfetto! Ho aperto il calendario per te. Puoi vedere tutti i - tuoi impegni. Cosa vuoi organizzare per primo?" - - - - - {/* Voice controls */} - - setCalendarModalVisible(true)} - > - - - - - - - - - - - ) : ( - /* Focus Mode - Calendar Full Screen */ - - { - console.log('Selected day:', day.dateString); - }} - /> - - {/* Task Animation Overlay */} - {showTaskAnimation && ( - - - - - Spostamento "Riunione team"... - - - - )} - - {/* Floating Bot Avatar */} - - - - {isBotSpeaking && ( - - - - - - )} - {botThinking && ( - - {thinkingDots.map((dot, index) => ( - - ))} - - )} - - - - - - - {/* Task List in Focus Mode */} - - - {tasks.map((task) => { - const isBotModified = botModifiedDates.includes(task.date); - const isMoving = movingTaskId === task.id; - - return ( - - - {task.title} - {task.date} - - {isBotModified && ( - - - - )} - {isMoving && ( - - - - )} - - ); - })} - - - - )} - - )} - - - ); -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: '#ffffff', - }, - header: { - paddingTop: 20, - paddingHorizontal: 15, - paddingBottom: 20, - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'flex-start', - borderBottomWidth: 1, - borderBottomColor: '#e1e5e9', - }, - titleSection: { - flex: 1, - }, - headerTitle: { - fontSize: 30, - fontWeight: '200', - color: '#000000', - fontFamily: 'System', - letterSpacing: -1.5, - }, - headerSubtitle: { - fontSize: 14, - fontWeight: '300', - color: '#666666', - fontFamily: 'System', - marginTop: 4, - }, - modeToggle: { - flexDirection: 'row', - backgroundColor: '#f0f0f0', - borderRadius: 20, - padding: 4, - marginTop: 10, - }, - modeButton: { - paddingHorizontal: 16, - paddingVertical: 8, - borderRadius: 16, - }, - modeButtonActive: { - backgroundColor: '#000000', - }, - modalOverlay: { - flex: 1, - backgroundColor: 'rgba(0, 0, 0, 0.5)', - justifyContent: 'flex-end', - }, - modalContent: { - backgroundColor: '#ffffff', - borderTopLeftRadius: 20, - borderTopRightRadius: 20, - maxHeight: height * 0.85, - shadowColor: '#000', - shadowOffset: { width: 0, height: -2 }, - shadowOpacity: 0.25, - shadowRadius: 10, - elevation: 10, - }, - modalHeader: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - padding: 20, - borderBottomWidth: 1, - borderBottomColor: '#e1e5e9', - }, - modalTitle: { - fontSize: 24, - fontWeight: '600', - color: '#000000', - fontFamily: 'System', - }, - calendar: { - borderBottomWidth: 1, - borderBottomColor: '#e1e5e9', - }, - taskListContainer: { - maxHeight: 250, - padding: 20, - }, - taskListHeader: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - marginBottom: 15, - }, - taskListTitle: { - fontSize: 18, - fontWeight: '600', - color: '#000000', - fontFamily: 'System', - }, - clearSelectionText: { - fontSize: 14, - fontWeight: '400', - color: '#666666', - fontFamily: 'System', - }, - taskItem: { - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - backgroundColor: '#f8f9fa', - padding: 16, - borderRadius: 12, - marginBottom: 10, - borderWidth: 1, - borderColor: '#e1e5e9', - }, - taskItemSelected: { - backgroundColor: '#000000', - borderColor: '#000000', - }, - taskItemBotModified: { - borderColor: '#000000', - borderWidth: 1.5, - }, - taskInfo: { - flexDirection: 'row', - alignItems: 'center', - flex: 1, - }, - taskTextContainer: { - marginLeft: 12, - flex: 1, - }, - taskTitleRow: { - flexDirection: 'row', - alignItems: 'center', - gap: 8, - }, - taskTitle: { - fontSize: 16, - fontWeight: '500', - color: '#000000', - fontFamily: 'System', - }, - taskTitleCompleted: { - textDecorationLine: 'line-through', - color: '#999999', - }, - taskTitleSelected: { - color: '#ffffff', - }, - botBadge: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: '#f0f0f0', - paddingHorizontal: 6, - paddingVertical: 2, - borderRadius: 8, - gap: 4, - }, - botBadgeSelected: { - backgroundColor: 'rgba(255, 255, 255, 0.2)', - }, - botBadgeText: { - fontSize: 10, - fontWeight: '600', - color: '#000000', - fontFamily: 'System', - }, - botBadgeTextSelected: { - color: '#ffffff', - }, - taskDate: { - fontSize: 13, - color: '#666666', - marginTop: 4, - fontFamily: 'System', - fontWeight: '300', - }, - taskDateSelected: { - color: 'rgba(255, 255, 255, 0.7)', - }, - moveButton: { - padding: 8, - }, - chatContainer: { - flex: 1, - backgroundColor: '#ffffff', - }, - messagesContainer: { - flex: 1, - padding: 16, - }, - messageWrapper: { - marginBottom: 12, - }, - messageBubble: { - maxWidth: '80%', - padding: 12, - borderRadius: 16, - }, - botMessage: { - alignSelf: 'flex-start', - backgroundColor: '#f0f0f0', - }, - userMessage: { - alignSelf: 'flex-end', - backgroundColor: '#000000', - }, - messageText: { - fontSize: 16, - lineHeight: 22, - fontFamily: 'System', - }, - botMessageText: { - color: '#000000', - }, - userMessageText: { - color: '#ffffff', - }, - messageTime: { - fontSize: 11, - color: '#999999', - marginTop: 6, - textAlign: 'right', - fontFamily: 'System', - fontWeight: '300', - }, - messageTimeUser: { - color: 'rgba(255, 255, 255, 0.7)', - }, - inputSection: { - alignItems: 'center', - paddingHorizontal: 16, - paddingBottom: 20, - paddingTop: 12, - backgroundColor: '#ffffff', - borderTopWidth: 1, - borderTopColor: '#e1e5e9', - }, - inputContainer: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: '#ffffff', - borderRadius: 30, - paddingHorizontal: 20, - paddingVertical: 10, - width: '100%', - borderWidth: 1.5, - borderColor: '#e1e5e9', - shadowColor: '#000', - shadowOffset: { - width: 0, - height: 4, - }, - shadowOpacity: 0.08, - shadowRadius: 12, - elevation: 3, - }, - calendarToggleButton: { - marginRight: 8, - padding: 4, - }, - attachButton: { - marginRight: 8, - padding: 4, - }, - textInput: { - flex: 1, - fontSize: 17, - color: '#000000', - fontFamily: 'System', - fontWeight: '400', - maxHeight: 100, - paddingVertical: 8, - }, - sendButton: { - marginLeft: 12, - padding: 8, - borderRadius: 20, - backgroundColor: '#f0f0f0', - }, - voiceContainer: { - flex: 1, - justifyContent: 'space-between', - backgroundColor: '#ffffff', - }, - voiceHeader: { - alignItems: 'center', - paddingVertical: 30, - }, - voiceStatus: { - fontSize: 20, - fontWeight: '300', - color: '#000000', - fontFamily: 'System', - letterSpacing: -0.5, - }, - waveformContainer: { - flexDirection: 'row', - justifyContent: 'center', - alignItems: 'center', - height: 100, - gap: 4, - }, - waveformBar: { - width: 4, - backgroundColor: '#000000', - borderRadius: 2, - }, - transcriptionContainer: { - flex: 1, - padding: 16, - }, - transcriptionBubble: { - backgroundColor: '#f8f9fa', - padding: 16, - borderRadius: 12, - marginBottom: 12, - borderWidth: 1, - borderColor: '#e1e5e9', - }, - botTranscription: { - backgroundColor: '#f0f0f0', - }, - transcriptionLabel: { - fontSize: 13, - fontWeight: '600', - color: '#666666', - marginBottom: 6, - fontFamily: 'System', - }, - transcriptionText: { - fontSize: 16, - color: '#000000', - lineHeight: 22, - fontFamily: 'System', - fontWeight: '300', - }, - voiceControls: { - flexDirection: 'row', - justifyContent: 'center', - alignItems: 'center', - padding: 30, - gap: 24, - }, - voiceControlButton: { - width: 56, - height: 56, - borderRadius: 28, - backgroundColor: '#f0f0f0', - justifyContent: 'center', - alignItems: 'center', - borderWidth: 1, - borderColor: '#e1e5e9', - }, - recordButton: { - width: 80, - height: 80, - borderRadius: 40, - backgroundColor: '#000000', - justifyContent: 'center', - alignItems: 'center', - elevation: 4, - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.25, - shadowRadius: 4, - }, - recordButtonActive: { - backgroundColor: '#666666', - }, - taskWidgetContainer: { - backgroundColor: '#ffffff', - borderRadius: 12, - borderWidth: 1.5, - borderColor: '#e1e5e9', - marginTop: 8, - marginLeft: 16, - maxWidth: '80%', - overflow: 'hidden', - }, - taskWidgetContent: { - flexDirection: 'row', - alignItems: 'center', - padding: 12, - }, - taskWidgetIcon: { - width: 36, - height: 36, - borderRadius: 18, - backgroundColor: '#f0f0f0', - justifyContent: 'center', - alignItems: 'center', - }, - taskWidgetInfo: { - flex: 1, - marginLeft: 12, - }, - taskWidgetTitle: { - fontSize: 15, - fontWeight: '500', - color: '#000000', - fontFamily: 'System', - marginBottom: 2, - }, - taskWidgetDate: { - fontSize: 13, - fontWeight: '300', - color: '#666666', - fontFamily: 'System', - }, - taskWidgetFooter: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'center', - backgroundColor: '#f8f9fa', - paddingVertical: 8, - gap: 6, - }, - taskWidgetFooterText: { - fontSize: 12, - fontWeight: '400', - color: '#666666', - fontFamily: 'System', - }, - // Focus Mode Styles - focusModeContainer: { - flex: 1, - backgroundColor: '#ffffff', - }, - focusCalendar: { - height: height * 0.5, - }, - taskAnimationOverlay: { - position: 'absolute', - top: '40%', - left: 0, - right: 0, - alignItems: 'center', - zIndex: 10, - }, - animatedTaskCard: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: '#000000', - paddingHorizontal: 20, - paddingVertical: 12, - borderRadius: 25, - gap: 10, - shadowColor: '#000', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.3, - shadowRadius: 8, - elevation: 8, - }, - animatedTaskText: { - fontSize: 16, - fontWeight: '500', - color: '#ffffff', - fontFamily: 'System', - }, - floatingBotContainer: { - position: 'absolute', - bottom: 30, - right: 20, - alignItems: 'center', - gap: 10, - }, - floatingBot: { - width: 64, - height: 64, - borderRadius: 32, - backgroundColor: '#000000', - justifyContent: 'center', - alignItems: 'center', - shadowColor: '#000', - shadowOffset: { width: 0, height: 4 }, - shadowOpacity: 0.3, - shadowRadius: 8, - elevation: 8, - }, - floatingBotSpeaking: { - backgroundColor: '#333333', - }, - floatingBotThinking: { - backgroundColor: '#4A90E2', - }, - botSpeakingIndicator: { - position: 'absolute', - bottom: -8, - flexDirection: 'row', - gap: 4, - }, - speakingDot: { - width: 6, - height: 6, - borderRadius: 3, - backgroundColor: '#ffffff', - }, - botThinkingIndicator: { - position: 'absolute', - top: -12, - flexDirection: 'row', - gap: 3, - }, - thinkingDot: { - width: 5, - height: 5, - borderRadius: 2.5, - backgroundColor: '#ffffff', - }, - exitFocusButton: { - width: 40, - height: 40, - borderRadius: 20, - backgroundColor: '#f0f0f0', - justifyContent: 'center', - alignItems: 'center', - borderWidth: 1, - borderColor: '#e1e5e9', - }, - focusTaskList: { - position: 'absolute', - bottom: 120, - left: 0, - right: 0, - paddingHorizontal: 16, - }, - focusTaskCard: { - backgroundColor: '#f8f9fa', - padding: 16, - borderRadius: 16, - marginRight: 12, - minWidth: 180, - borderWidth: 1, - borderColor: '#e1e5e9', - position: 'relative', - shadowColor: '#000', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.1, - shadowRadius: 4, - elevation: 3, - }, - focusTaskCardBotModified: { - borderColor: '#000000', - borderWidth: 2, - backgroundColor: '#fafafa', - }, - focusTaskCardContent: { - paddingRight: 24, - }, - focusTaskTitle: { - fontSize: 15, - fontWeight: '600', - color: '#000000', - fontFamily: 'System', - marginBottom: 6, - lineHeight: 20, - }, - focusTaskDate: { - fontSize: 13, - fontWeight: '400', - color: '#666666', - fontFamily: 'System', - }, - focusBotBadge: { - position: 'absolute', - top: 8, - right: 8, - width: 24, - height: 24, - borderRadius: 12, - backgroundColor: '#000000', - justifyContent: 'center', - alignItems: 'center', - }, - movingTaskIndicator: { - position: 'absolute', - top: -8, - right: -8, - width: 28, - height: 28, - borderRadius: 14, - backgroundColor: '#4A90E2', - justifyContent: 'center', - alignItems: 'center', - shadowColor: '#4A90E2', - shadowOffset: { width: 0, height: 2 }, - shadowOpacity: 0.5, - shadowRadius: 4, - elevation: 5, - }, -}); diff --git a/src/navigation/screens/Home.tsx b/src/navigation/screens/Home.tsx index ac10f7d..995165d 100644 --- a/src/navigation/screens/Home.tsx +++ b/src/navigation/screens/Home.tsx @@ -545,14 +545,6 @@ const HomeScreen = () => { - {/* TODO: Open calendar */}} - activeOpacity={0.7} - disabled={isLoading} - > - - { - - + + + + {userData.username ? userData.username.substring(0, 2).toUpperCase() : 'U'} + + {userData.username} {t('profile.user.subtitle')} @@ -377,21 +383,25 @@ const styles = StyleSheet.create({ marginTop: 20, paddingHorizontal: 20, }, - avatar: { + avatarContainer: { width: 120, height: 120, borderRadius: 60, - backgroundColor: "#ffffff", marginBottom: 20, - justifyContent: "center", - alignItems: "center", - borderWidth: 4, - borderColor: "#000000", + overflow: 'hidden', }, - avatarImage: { - width: "85%", - height: "85%", - borderRadius: 50, + gradientAvatar: { + width: '100%', + height: '100%', + justifyContent: 'center', + alignItems: 'center', + }, + initialsText: { + fontSize: 48, + fontWeight: '700', + color: '#ffffff', + fontFamily: 'System', + letterSpacing: 2, }, username: { fontSize: 28, diff --git a/src/navigation/screens/Settings.tsx b/src/navigation/screens/Settings.tsx index 4f93d46..30e2374 100644 --- a/src/navigation/screens/Settings.tsx +++ b/src/navigation/screens/Settings.tsx @@ -171,17 +171,6 @@ export default function Settings() { {t('settings.menu.testNotifications')} - - - - - Calendar Widget Demo - - - );