diff --git a/resources/js/components/transactions/transaction-actions-menu.tsx b/resources/js/components/transactions/transaction-actions-menu.tsx index 82faad76..7e7d1bae 100644 --- a/resources/js/components/transactions/transaction-actions-menu.tsx +++ b/resources/js/components/transactions/transaction-actions-menu.tsx @@ -1,13 +1,6 @@ import { categorize } from '@/actions/App/Http/Controllers/TransactionController'; import { Button } from '@/components/ui/button'; import { ButtonGroup } from '@/components/ui/button-group'; -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, -} from '@/components/ui/dialog'; import { DropdownMenu, DropdownMenuContent, @@ -84,7 +77,7 @@ export function TransactionActionsMenu({ const handleAnalysisClick = () => { if (!canAnalyze) { if (isMobile) { - setAnalysisHintOpen(true); + setAnalysisHintOpen((open) => !open); } return; } @@ -130,20 +123,35 @@ export function TransactionActionsMenu({ {features.transactionAnalysis && (isMobile ? ( - + + + + + + {!canAnalyze && ( + + {__( + 'Apply a filter to enable this button', + )} + + )} + + ) : ( @@ -211,32 +219,36 @@ export function TransactionActionsMenu({ - - - - - - - {!isKeySet - ? __('Unlock encryption to add transactions') - : __('Create a new transaction')} - - - + {!isMobile && ( + + + + + + + {!isKeySet + ? __( + 'Unlock encryption to add transactions', + ) + : __('Create a new transaction')} + + + + )} @@ -258,6 +270,15 @@ export function TransactionActionsMenu({ + {isMobile && ( + + + {__('Add transaction')} + + )} )} - - - - - {__('Analysis')} - - {__('Apply a filter to enable this button')} - - - - ); }