mirror of
https://github.com/Mail-0/Zero.git
synced 2026-06-30 07:46:15 +00:00
# READ CAREFULLY THEN REMOVE Remove bullet points that are not relevant. PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI. - Pull requests that do not follow these guidelines will be closed without review or comment. - If you use AI to write your PR description your pr will be close without review or comment. - If you are unsure about anything, feel free to ask for clarification. ## Description Please provide a clear description of your changes. --- ## Type of Change Please delete options that are not relevant. - [ ] 🐛 Bug fix (non-breaking change which fixes an issue) - [ ] ✨ New feature (non-breaking change which adds functionality) - [ ] 💥 Breaking change (fix or feature with breaking changes) - [ ] 📝 Documentation update - [ ] 🎨 UI/UX improvement - [ ] 🔒 Security enhancement - [ ] ⚡ Performance improvement ## Areas Affected Please check all that apply: - [ ] Email Integration (Gmail, IMAP, etc.) - [ ] User Interface/Experience - [ ] Authentication/Authorization - [ ] Data Storage/Management - [ ] API Endpoints - [ ] Documentation - [ ] Testing Infrastructure - [ ] Development Workflow - [ ] Deployment/Infrastructure ## Testing Done Describe the tests you've done: - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [ ] Cross-browser testing (if UI changes) - [ ] Mobile responsiveness verified (if UI changes) ## Security Considerations For changes involving data or authentication: - [ ] No sensitive data is exposed - [ ] Authentication checks are in place - [ ] Input validation is implemented - [ ] Rate limiting is considered (if applicable) ## Checklist - [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) document - [ ] My code follows the project's style guidelines - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in complex areas - [ ] I have updated the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix/feature works - [ ] All tests pass locally - [ ] Any dependent changes are merged and published ## Additional Notes Add any other context about the pull request here. ## Screenshots/Recordings Add screenshots or recordings here if applicable. --- _By submitting this pull request, I confirm that my contribution is made under the terms of the project's license._ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a "Pricing and Refund Policy" section to the privacy policy, outlining subscription terms, billing, refunds, and price change notifications. - Introduced a GitHub star count button in the navigation bar, displaying the current repository star count with animated updates. - **UI Improvements** - Updated button and panel border radius for a more consistent, rounded appearance across various components. - Improved color schemes and spacing for buttons, avatars, and panels for a cleaner look. - Adjusted scrollbar styling and removed some borders for a sleeker interface. - Refined layout and sizing of mail panels and navigation elements for better usability. - Enhanced visual indicators for unread threads and improved reply composer auto-opening behavior. - **Localization** - Updated the command palette string from "New Email" to "New email" for consistency. - **Customization** - Added the ability to pass custom CSS classes to the email composer for flexible editor styling. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
import { Tooltip, TooltipTrigger, TooltipContent } from './ui/tooltip';
|
|
import { useAISidebar } from './ui/ai-sidebar';
|
|
import { Button } from './ui/button';
|
|
|
|
// AI Toggle Button Component
|
|
const AIToggleButton = () => {
|
|
const { toggleOpen: toggleAISidebar, open: isSidebarOpen } = useAISidebar();
|
|
|
|
return (
|
|
!isSidebarOpen && (
|
|
<div className="fixed bottom-4 right-4 z-50">
|
|
<Tooltip>
|
|
<TooltipTrigger asChild>
|
|
<Button
|
|
variant="outline"
|
|
size="icon"
|
|
className="dark:bg-sidebar border h-12 w-12 rounded-lg"
|
|
onClick={(e) => {
|
|
if (!isSidebarOpen) {
|
|
e.stopPropagation();
|
|
toggleAISidebar();
|
|
}
|
|
}}
|
|
>
|
|
<div className="flex items-center justify-center">
|
|
<img
|
|
src="/black-icon.svg"
|
|
alt="AI Assistant"
|
|
width={22}
|
|
height={22}
|
|
className="block dark:hidden"
|
|
/>
|
|
<img
|
|
src="/white-icon.svg"
|
|
alt="AI Assistant"
|
|
width={22}
|
|
height={22}
|
|
className="hidden dark:block"
|
|
/>
|
|
</div>
|
|
</Button>
|
|
</TooltipTrigger>
|
|
<TooltipContent>Toggle AI Assistant</TooltipContent>
|
|
</Tooltip>
|
|
</div>
|
|
)
|
|
);
|
|
};
|
|
|
|
export default AIToggleButton;
|