From 661b821f37e141cd8b832ec0af07fb7649f0f5d4 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 30 Mar 2025 19:28:28 -0300 Subject: [PATCH] refactor: update component exports to named exports and enhance UI structure --- .gitignore | 1 + a.sh | 1131 ----------------- src/dashboard/components/DateRangePicker.tsx | 82 +- src/dashboard/components/MainNav.tsx | 40 +- src/dashboard/components/Overview.tsx | 90 +- src/dashboard/components/RecentSales.tsx | 29 +- src/dashboard/components/Search.tsx | 36 +- src/dashboard/components/TeamSwitcher.tsx | 114 +- src/dashboard/components/UserNav.tsx | 78 +- src/dashboard/index.tsx | 113 +- src/drive/components/FileBrowser.tsx | 17 +- src/drive/components/FileOperations.tsx | 7 +- src/drive/components/FileTree.tsx | 12 +- src/drive/index.tsx | 12 +- src/mail/components/account-switcher.tsx | 118 +- src/mail/components/mail-display.tsx | 368 +----- src/mail/components/mail-list.tsx | 185 +-- src/mail/components/mail.tsx | 194 +-- src/mail/components/nav.tsx | 104 +- src/mail/data.tsx | 258 +--- src/mail/index.tsx | 52 +- src/mail/use-mail.ts | 44 +- src/sync/page.tsx | 4 +- src/tasks/components/DataTable.tsx | 104 +- src/tasks/components/DataTablePagination.tsx | 114 +- src/tasks/components/DataTableToolbar.tsx | 106 +- src/tasks/components/UserNav.tsx | 37 +- src/tasks/index.tsx | 45 +- src/templates/components/album-artwork.tsx | 57 +- src/templates/components/menu.tsx | 42 +- .../components/podcast-empty-placeholder.tsx | 54 +- src/templates/components/sidebar.tsx | 107 +- src/templates/index.tsx | 104 +- 33 files changed, 792 insertions(+), 3067 deletions(-) delete mode 100755 a.sh diff --git a/.gitignore b/.gitignore index a547bf3..b64a01a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +output.sh \ No newline at end of file diff --git a/a.sh b/a.sh deleted file mode 100755 index 3f3ab8a..0000000 --- a/a.sh +++ /dev/null @@ -1,1131 +0,0 @@ -#!/bin/bash - -# Create the full directory structure -mkdir -p my-tauri-app/src/chat/{components,lib,providers,styles,types} -mkdir -p my-tauri-app/src/chat/components/{chat,projector,selector,ui} -mkdir -p my-tauri-app/src/styles - -# Create all files with React+HTML equivalents -cat > my-tauri-app/src/chat/components/chat/chat-header.tsx << 'EOL' -import React from 'react'; -import { useChat } from '../../providers/chat-provider'; -import '../../styles/chat.css'; - -export function ChatHeader() { - const { instance } = useChat(); - - return ( -
-
-

- {instance?.name || 'Chat'} -

- Online -
- - -
- ); -} -EOL - -cat > my-tauri-app/src/chat/components/chat/chat-input.tsx << 'EOL' -import React from 'react'; -import { EmojiPicker } from '../ui/emoji-picker'; -import { useChat } from '../../providers/chat-provider'; -import { useSound } from '../../providers/sound-provider'; -import '../../styles/chat.css'; - -export function ChatInput() { - const [message, setMessage] = React.useState(''); - const [showEmoji, setShowEmoji] = React.useState(false); - const { sendActivity } = useChat(); - const { playSound } = useSound(); - - const handleSend = () => { - if (!message.trim()) return; - playSound('send'); - sendActivity({ - type: 'message', - text: message.trim(), - }); - setMessage(''); - }; - - const handleEmojiSelect = (emoji: string) => { - playSound('click'); - setMessage(prev => prev + emoji); - }; - - return ( - <> -
- - - - -