Phase 0.2: migrate remaining SVGs to lucide-react icons
This commit is contained in:
+14
-40
@@ -17,6 +17,7 @@ import { MailList } from '@/components/mail/MailList';
|
||||
import { MailDetail } from '@/components/mail/MailDetail';
|
||||
import { ComposeModal, type ComposeMode } from '@/components/mail/ComposeModal';
|
||||
import { usePluginToolbarStore } from '@/store/pluginToolbarStore';
|
||||
import { ArrowRight, Check, ChevronLeft, Loader2, Plus, Redo2, Trash2, TrendingUp, Undo2 } from 'lucide-react';
|
||||
import {
|
||||
fetchAccounts,
|
||||
fetchFolders,
|
||||
@@ -536,9 +537,7 @@ export function MailPage() {
|
||||
label: 'Verfassen',
|
||||
group: 'compose',
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 4v16m8-8H4" />
|
||||
</svg>
|
||||
<Plus className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: handleCompose,
|
||||
},
|
||||
@@ -549,9 +548,7 @@ export function MailPage() {
|
||||
group: 'mail-actions',
|
||||
disabled: !hasMail,
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6" />
|
||||
</svg>
|
||||
<Undo2 className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: () => selectedMail && handleReply(selectedMail),
|
||||
},
|
||||
@@ -562,9 +559,7 @@ export function MailPage() {
|
||||
group: 'mail-actions',
|
||||
disabled: !hasMail,
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 10H11a8 8 0 00-8 8v2m18-10l-6 6m6-6l-6-6" />
|
||||
</svg>
|
||||
<Redo2 className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: () => selectedMail && handleForward(selectedMail),
|
||||
},
|
||||
@@ -594,9 +589,7 @@ export function MailPage() {
|
||||
group: 'mail-actions',
|
||||
disabled: !hasMail,
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||
</svg>
|
||||
<Trash2 className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: () => selectedMail && handleDeleteMail(selectedMail),
|
||||
},
|
||||
@@ -607,9 +600,7 @@ export function MailPage() {
|
||||
group: 'mail-actions',
|
||||
disabled: !hasMail,
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 8l4 4m0 0l-4 4m4-4H3" />
|
||||
</svg>
|
||||
<ArrowRight className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: () => setShowMoveDropdown((v) => !v),
|
||||
},
|
||||
@@ -620,9 +611,7 @@ export function MailPage() {
|
||||
group: 'tools',
|
||||
disabled: isSyncing || !selectedAccountId,
|
||||
icon: (
|
||||
<svg className={`w-3.5 h-3.5 ${isSyncing ? 'animate-spin' : ''}`} fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
<Loader2 className={`w-3.5 h-3.5 ${isSyncing ? 'animate-spin' : ''}`} strokeWidth={2} />
|
||||
),
|
||||
onClick: async () => {
|
||||
if (!selectedAccountId) return;
|
||||
@@ -652,9 +641,7 @@ export function MailPage() {
|
||||
label: t('mail.markRead'),
|
||||
group: 'bulk-actions',
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<Check className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: handleBulkMarkRead,
|
||||
},
|
||||
@@ -664,9 +651,7 @@ export function MailPage() {
|
||||
label: t('mail.markUnread'),
|
||||
group: 'bulk-actions',
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 19l6-6 4 4 8-8" />
|
||||
</svg>
|
||||
<TrendingUp className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: handleBulkMarkUnread,
|
||||
},
|
||||
@@ -676,9 +661,7 @@ export function MailPage() {
|
||||
label: t('mail.bulkDelete'),
|
||||
group: 'bulk-actions',
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||
</svg>
|
||||
<Trash2 className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: handleBulkDelete,
|
||||
},
|
||||
@@ -688,9 +671,7 @@ export function MailPage() {
|
||||
label: t('mail.bulkMove'),
|
||||
group: 'bulk-actions',
|
||||
icon: (
|
||||
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 8l4 4m0 0l-4 4m4-4H3" />
|
||||
</svg>
|
||||
<ArrowRight className="w-3.5 h-3.5" strokeWidth={2} />
|
||||
),
|
||||
onClick: () => setShowMoveDropdown((v) => !v),
|
||||
},
|
||||
@@ -703,10 +684,7 @@ export function MailPage() {
|
||||
if (loadingAccounts) {
|
||||
return (
|
||||
<div className="flex items-center justify-center py-12" data-testid="mail-page-loading">
|
||||
<svg className="animate-spin h-6 w-6 text-secondary-400" fill="none" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" />
|
||||
</svg>
|
||||
<Loader2 className="animate-spin h-6 w-6 text-secondary-400" aria-hidden="true" />
|
||||
<span className="ml-2 text-secondary-500">{t('common.loading')}</span>
|
||||
</div>
|
||||
);
|
||||
@@ -833,9 +811,7 @@ export function MailPage() {
|
||||
aria-label="Zurück zu Ordnern"
|
||||
data-testid="mobile-back-to-folders"
|
||||
>
|
||||
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
||||
</svg>
|
||||
<ChevronLeft className="w-4 h-4" aria-hidden="true" strokeWidth={2} />
|
||||
<span className="text-sm font-medium">Ordner</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -872,9 +848,7 @@ export function MailPage() {
|
||||
aria-label="Zurück zur Liste"
|
||||
data-testid="mobile-back-to-list"
|
||||
>
|
||||
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
|
||||
</svg>
|
||||
<ChevronLeft className="w-4 h-4" aria-hidden="true" strokeWidth={2} />
|
||||
<span className="text-sm font-medium">Zurück</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user