mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-22 16:01:12 +00:00
fix: remove the dead-end sub-addressing Learn More control
The button in Settings > Identities opened the identity manager, which says nothing about sub-addressing. The info row keeps the explanation; acting on +tag mail (auto-filing into folders) is planned as part of the filter rule builder. Refs #76
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
|
||||
vi.mock('@/stores/identity-store', () => ({
|
||||
useIdentityStore: () => ({ identities: [] }),
|
||||
}));
|
||||
|
||||
vi.mock('@/components/identity/identity-manager-modal', () => ({
|
||||
IdentityManagerModal: () => null,
|
||||
}));
|
||||
|
||||
import { IdentitySettings } from '@/components/settings/identity-settings';
|
||||
|
||||
describe('IdentitySettings', () => {
|
||||
it('keeps the sub-addressing info row without a dead-end control', () => {
|
||||
render(<IdentitySettings />);
|
||||
|
||||
expect(screen.getByText('sub_addressing.label')).toBeInTheDocument();
|
||||
expect(screen.getByText('sub_addressing.description')).toBeInTheDocument();
|
||||
// "Learn More" used to open the identity manager, which says nothing
|
||||
// about sub-addressing (github issue 76).
|
||||
expect(screen.queryByText('sub_addressing.learn_more')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('still offers the manage identities action', () => {
|
||||
render(<IdentitySettings />);
|
||||
|
||||
expect(screen.getByText('manage')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
@@ -38,11 +38,7 @@ export function IdentitySettings() {
|
||||
<SettingItem
|
||||
label={t('sub_addressing.label')}
|
||||
description={t('sub_addressing.description')}
|
||||
>
|
||||
<Button variant="outline" size="sm" onClick={() => setShowModal(true)}>
|
||||
{t('sub_addressing.learn_more')}
|
||||
</Button>
|
||||
</SettingItem>
|
||||
/>
|
||||
</SettingsSection>
|
||||
|
||||
{/* Identity Manager Modal */}
|
||||
|
||||
@@ -23,7 +23,7 @@ export function SettingsSection({ title, description, children }: SettingsSectio
|
||||
interface SettingItemProps {
|
||||
label: string;
|
||||
description?: string;
|
||||
children: ReactNode;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export function SettingItem({ label, description, children }: SettingItemProps) {
|
||||
@@ -35,7 +35,7 @@ export function SettingItem({ label, description, children }: SettingItemProps)
|
||||
<p className="text-xs text-muted-foreground mt-1">{description}</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex-shrink-0">{children}</div>
|
||||
{children && <div className="flex-shrink-0">{children}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "Identitäten verwalten",
|
||||
"sub_addressing": {
|
||||
"label": "Sub-Adressierung",
|
||||
"description": "Verwenden Sie Tags wie benutzer+tag@domain.de, um eingehende E-Mails zu organisieren",
|
||||
"learn_more": "Mehr erfahren"
|
||||
"description": "Verwenden Sie Tags wie benutzer+tag@domain.de, um eingehende E-Mails zu organisieren"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -754,8 +754,7 @@
|
||||
"manage": "Manage Identities",
|
||||
"sub_addressing": {
|
||||
"label": "Sub-Addressing",
|
||||
"description": "Use tags like user+tag@domain.com to organize incoming mail",
|
||||
"learn_more": "Learn More"
|
||||
"description": "Use tags like user+tag@domain.com to organize incoming mail"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "Administrar Identidades",
|
||||
"sub_addressing": {
|
||||
"label": "Sub-Direccionamiento",
|
||||
"description": "Use etiquetas como usuario+etiqueta@dominio.com para organizar el correo entrante",
|
||||
"learn_more": "Más Información"
|
||||
"description": "Use etiquetas como usuario+etiqueta@dominio.com para organizar el correo entrante"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "Gérer les identités",
|
||||
"sub_addressing": {
|
||||
"label": "Sous-adressage",
|
||||
"description": "Utilisez des tags comme utilisateur+tag@domaine.com pour organiser votre courrier",
|
||||
"learn_more": "En savoir plus"
|
||||
"description": "Utilisez des tags comme utilisateur+tag@domaine.com pour organiser votre courrier"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "Gestisci identità",
|
||||
"sub_addressing": {
|
||||
"label": "Sotto-indirizzamento",
|
||||
"description": "Usa tag come utente+tag@dominio.com per organizzare la posta in arrivo",
|
||||
"learn_more": "Scopri di più"
|
||||
"description": "Usa tag come utente+tag@dominio.com per organizzare la posta in arrivo"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "送信者情報を管理",
|
||||
"sub_addressing": {
|
||||
"label": "サブアドレス",
|
||||
"description": "user+tag@domain.comのようなタグを使用して受信メールを整理",
|
||||
"learn_more": "詳細"
|
||||
"description": "user+tag@domain.comのようなタグを使用して受信メールを整理"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "Identiteiten beheren",
|
||||
"sub_addressing": {
|
||||
"label": "Sub-adressering",
|
||||
"description": "Gebruik tags zoals gebruiker+tag@domein.nl om inkomende mail te organiseren",
|
||||
"learn_more": "Meer informatie"
|
||||
"description": "Gebruik tags zoals gebruiker+tag@domein.nl om inkomende mail te organiseren"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -754,8 +754,7 @@
|
||||
"manage": "Zarządzaj tożsamościami",
|
||||
"sub_addressing": {
|
||||
"label": "Podadresowanie",
|
||||
"description": "Używaj tagów jak uzytkownik+tag@domena.pl do organizowania poczty przychodzącej",
|
||||
"learn_more": "Dowiedz się więcej"
|
||||
"description": "Używaj tagów jak uzytkownik+tag@domena.pl do organizowania poczty przychodzącej"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -746,8 +746,7 @@
|
||||
"manage": "Gerenciar Identidades",
|
||||
"sub_addressing": {
|
||||
"label": "Sub-Endereçamento",
|
||||
"description": "Use tags como usuario+tag@dominio.com para organizar e-mails recebidos",
|
||||
"learn_more": "Saiba Mais"
|
||||
"description": "Use tags como usuario+tag@dominio.com para organizar e-mails recebidos"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -754,8 +754,7 @@
|
||||
"manage": "Управление профилями отправителей",
|
||||
"sub_addressing": {
|
||||
"label": "Суб-адресация",
|
||||
"description": "Используйте теги, такие как user+tag@domain.com, для организации входящей почты",
|
||||
"learn_more": "Узнать больше"
|
||||
"description": "Используйте теги, такие как user+tag@domain.com, для организации входящей почты"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
@@ -754,8 +754,7 @@
|
||||
"manage": "Керування профілями відправників",
|
||||
"sub_addressing": {
|
||||
"label": "Суб-адресація",
|
||||
"description": "Використовуйте такі теги, як user+tag@domain.com, щоб упорядкувати вхідну пошту",
|
||||
"learn_more": "Дізнайтеся більше"
|
||||
"description": "Використовуйте такі теги, як user+tag@domain.com, щоб упорядкувати вхідну пошту"
|
||||
}
|
||||
},
|
||||
"vacation": {
|
||||
|
||||
Reference in New Issue
Block a user