mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
refactor: update defaultLabels structure in mail component for improved clarity and usability
This commit is contained in:
@@ -66,22 +66,37 @@ interface Tag {
|
||||
text: string;
|
||||
}
|
||||
|
||||
const defaultLabels = [
|
||||
'urgent',
|
||||
'review',
|
||||
'followup',
|
||||
'decision',
|
||||
'work',
|
||||
'finance',
|
||||
'legal',
|
||||
'hiring',
|
||||
'sales',
|
||||
'product',
|
||||
'support',
|
||||
'vendors',
|
||||
'marketing',
|
||||
'meeting',
|
||||
'investors',
|
||||
export const defaultLabels = [
|
||||
{
|
||||
name: 'to respond',
|
||||
usecase: 'emails you need to respond to. NOT sales, marketing, or promotions.',
|
||||
},
|
||||
{
|
||||
name: 'FYI',
|
||||
usecase:
|
||||
'emails that are not important, but you should know about. NOT sales, marketing, or promotions.',
|
||||
},
|
||||
{
|
||||
name: 'comment',
|
||||
usecase:
|
||||
'Team chats in tools like Google Docs, Slack, etc. NOT marketing, sales, or promotions.',
|
||||
},
|
||||
{
|
||||
name: 'notification',
|
||||
usecase: 'Automated updates from services you use. NOT sales, marketing, or promotions.',
|
||||
},
|
||||
{
|
||||
name: 'promotion',
|
||||
usecase: 'Sales, marketing, cold emails, special offers or promotions. NOT to respond to.',
|
||||
},
|
||||
{
|
||||
name: 'meeting',
|
||||
usecase: 'Calendar events, invites, etc. NOT sales, marketing, or promotions.',
|
||||
},
|
||||
{
|
||||
name: 'billing',
|
||||
usecase: 'Billing notifications. NOT sales, marketing, or promotions.',
|
||||
},
|
||||
];
|
||||
|
||||
const AutoLabelingSettings = () => {
|
||||
@@ -101,7 +116,9 @@ const AutoLabelingSettings = () => {
|
||||
}, [storedLabels]);
|
||||
|
||||
const handleResetToDefault = useCallback(() => {
|
||||
setLabels(defaultLabels.map((label) => ({ id: label, name: label, text: label })));
|
||||
setLabels(
|
||||
defaultLabels.map((label) => ({ id: label.name, name: label.name, text: label.name })),
|
||||
);
|
||||
}, [storedLabels]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user