mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-11-01 08:12:43 +00:00
feat: add a setting to hide the account dot in the unified view #912
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { ThreadListItem } from '../thread-list-item';
|
||||
import { useSettingsStore, DEFAULT_KEYWORDS } from '@/stores/settings-store';
|
||||
import { useEmailStore } from '@/stores/email-store';
|
||||
import { useUIStore } from '@/stores/ui-store';
|
||||
import { groupEmailsByThread } from '@/lib/thread-utils';
|
||||
import type { Email } from '@/lib/jmap/types';
|
||||
|
||||
vi.mock('@/hooks/use-email-drag', () => ({
|
||||
useEmailDrag: () => ({ dragHandlers: {}, isDragging: false }),
|
||||
}));
|
||||
|
||||
vi.mock('@/stores/auth-store', () => {
|
||||
const state = { identities: [], username: null };
|
||||
return {
|
||||
useAuthStore: (selector?: (s: typeof state) => unknown) => (selector ? selector(state) : state),
|
||||
};
|
||||
});
|
||||
|
||||
const ACCOUNT_TEAL = { id: 'acct-teal', avatarColor: '#0d9488', label: 'Teal account' };
|
||||
const accountState = {
|
||||
getAccountById: (id: string) => (id === ACCOUNT_TEAL.id ? ACCOUNT_TEAL : undefined),
|
||||
};
|
||||
vi.mock('@/stores/account-store', () => ({
|
||||
useAccountStore: Object.assign(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(selector: any) => (selector ? selector(accountState) : accountState),
|
||||
{ getState: () => accountState },
|
||||
),
|
||||
}));
|
||||
|
||||
const makeEmail = (overrides: Partial<Email> = {}): Email => ({
|
||||
id: 'email-1',
|
||||
threadId: 'thread-1',
|
||||
mailboxIds: { inbox: true },
|
||||
keywords: { $seen: true },
|
||||
size: 1000,
|
||||
receivedAt: '2024-01-15T10:00:00Z',
|
||||
from: [{ name: 'Alice', email: 'alice@example.com' }],
|
||||
subject: 'Test Subject',
|
||||
hasAttachment: false,
|
||||
accountId: ACCOUNT_TEAL.id,
|
||||
accountLabel: ACCOUNT_TEAL.label,
|
||||
...overrides,
|
||||
});
|
||||
|
||||
function renderEmails(emails: Email[]) {
|
||||
const [thread] = groupEmailsByThread(emails);
|
||||
return render(
|
||||
<ThreadListItem thread={thread} isExpanded={false} onToggleExpand={() => {}} onEmailSelect={() => {}} />,
|
||||
);
|
||||
}
|
||||
|
||||
const single = () => [makeEmail()];
|
||||
const collapsedThread = () => [
|
||||
makeEmail({ id: 'e1', threadId: 't1' }),
|
||||
makeEmail({ id: 'e2', threadId: 't1', receivedAt: '2024-01-16T10:00:00Z' }),
|
||||
];
|
||||
|
||||
// The dot is the only element painted in the account colour.
|
||||
const accountDot = (c: HTMLElement) =>
|
||||
Array.from(c.querySelectorAll<HTMLElement>('span.rounded-full'))
|
||||
.find((el) => el.style.backgroundColor === 'rgb(13, 148, 136)') ?? null;
|
||||
|
||||
describe('ThreadListItem account dot (#912)', () => {
|
||||
beforeEach(() => {
|
||||
useUIStore.setState({ isMobile: false, isTablet: false, isDesktop: true });
|
||||
useSettingsStore.setState({
|
||||
emailKeywords: [...DEFAULT_KEYWORDS],
|
||||
showPreview: false,
|
||||
interfaceLayout: 'default',
|
||||
tintListRowsByAccount: false,
|
||||
showAccountDot: true,
|
||||
});
|
||||
useEmailStore.setState({
|
||||
selectedEmailKeys: new Set<string>(),
|
||||
selectedMailbox: 'inbox',
|
||||
isUnifiedView: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('is on by default', () => {
|
||||
expect(useSettingsStore.getInitialState().showAccountDot).toBe(true);
|
||||
});
|
||||
|
||||
describe.each([
|
||||
['single message', single],
|
||||
['collapsed thread', collapsedThread],
|
||||
])('%s', (_name, emails) => {
|
||||
describe.each(['split', 'focus'] as const)('%s layout', (layout) => {
|
||||
beforeEach(() => {
|
||||
useSettingsStore.setState({ mailLayout: layout });
|
||||
});
|
||||
|
||||
it('shows the dot in the unified view', () => {
|
||||
const { container } = renderEmails(emails());
|
||||
expect(accountDot(container)).not.toBeNull();
|
||||
});
|
||||
|
||||
it('hides the dot when the setting is off', () => {
|
||||
useSettingsStore.setState({ showAccountDot: false });
|
||||
const { container } = renderEmails(emails());
|
||||
expect(accountDot(container)).toBeNull();
|
||||
// The rest of the row still renders.
|
||||
expect(container.textContent).toContain('Test Subject');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -360,6 +360,8 @@ const SingleEmailItem = React.forwardRef<HTMLDivElement, SingleEmailItemProps>(
|
||||
const { variant: tagVariant, placement: tagPlacement } = useTagDisplay();
|
||||
const tintListRowsByTag = useSettingsStore((state) => state.tintListRowsByTag);
|
||||
const tintListRowsByAccount = useSettingsStore((state) => state.tintListRowsByAccount);
|
||||
// The tint replaces the dot, and the dot can be switched off on its own (#912).
|
||||
const showAccountDot = useSettingsStore((state) => state.showAccountDot) && !tintListRowsByAccount;
|
||||
const density = useSettingsStore((state) => state.density);
|
||||
const mailLayout = useEffectiveMailLayout();
|
||||
const timeFormat = useSettingsStore((state) => state.timeFormat);
|
||||
@@ -624,7 +626,7 @@ const SingleEmailItem = React.forwardRef<HTMLDivElement, SingleEmailItemProps>(
|
||||
<>
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="flex min-w-0 flex-1 items-center gap-3">
|
||||
{isUnifiedView && email.accountId && accountColor && !tintListRowsByAccount && (
|
||||
{isUnifiedView && email.accountId && accountColor && showAccountDot && (
|
||||
<span
|
||||
className="w-2 h-2 rounded-full flex-shrink-0"
|
||||
style={{ backgroundColor: accountColor }}
|
||||
@@ -702,7 +704,7 @@ const SingleEmailItem = React.forwardRef<HTMLDivElement, SingleEmailItemProps>(
|
||||
<>
|
||||
<div className="flex items-center justify-between gap-2 mb-1">
|
||||
<div className="flex items-center gap-2 min-w-0 flex-1">
|
||||
{isUnifiedView && email.accountId && accountColor && !tintListRowsByAccount && (
|
||||
{isUnifiedView && email.accountId && accountColor && showAccountDot && (
|
||||
<span
|
||||
className="w-2 h-2 rounded-full flex-shrink-0"
|
||||
style={{ backgroundColor: accountColor }}
|
||||
@@ -956,6 +958,8 @@ export const ThreadListItem = React.forwardRef<HTMLDivElement, ThreadListItemPro
|
||||
const { variant: tagVariant, placement: tagPlacement } = useTagDisplay();
|
||||
const tintListRowsByTag = useSettingsStore((state) => state.tintListRowsByTag);
|
||||
const tintListRowsByAccount = useSettingsStore((state) => state.tintListRowsByAccount);
|
||||
// The tint replaces the dot, and the dot can be switched off on its own (#912).
|
||||
const showAccountDot = useSettingsStore((state) => state.showAccountDot) && !tintListRowsByAccount;
|
||||
// A collapsed row speaks for every message under it, so it carries their tags too.
|
||||
const tagIds = sortTagIds(getThreadTagIds(thread.emails));
|
||||
const threadTintSource = threadAccountColor
|
||||
@@ -1204,7 +1208,7 @@ export const ThreadListItem = React.forwardRef<HTMLDivElement, ThreadListItemPro
|
||||
<>
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="flex min-w-0 flex-1 items-center gap-3">
|
||||
{isUnifiedView && latestEmail.accountId && threadAccountColor && !tintListRowsByAccount && (
|
||||
{isUnifiedView && latestEmail.accountId && threadAccountColor && showAccountDot && (
|
||||
<span
|
||||
className="w-2 h-2 rounded-full flex-shrink-0"
|
||||
style={{ backgroundColor: threadAccountColor }}
|
||||
@@ -1307,7 +1311,7 @@ export const ThreadListItem = React.forwardRef<HTMLDivElement, ThreadListItemPro
|
||||
<>
|
||||
<div className="flex items-center justify-between gap-2 mb-1">
|
||||
<div className="flex items-center gap-2 min-w-0 flex-1">
|
||||
{isUnifiedView && latestEmail.accountId && threadAccountColor && !tintListRowsByAccount && (
|
||||
{isUnifiedView && latestEmail.accountId && threadAccountColor && showAccountDot && (
|
||||
<span
|
||||
className="w-2 h-2 rounded-full flex-shrink-0"
|
||||
style={{ backgroundColor: threadAccountColor }}
|
||||
|
||||
@@ -119,7 +119,7 @@ function MailLayoutPreview({
|
||||
export function LayoutSettings() {
|
||||
const t = useTranslations('settings.appearance');
|
||||
const tEmail = useTranslations('settings.email_behavior');
|
||||
const { toolbarPosition, showToolbarLabels, hideAccountSwitcher, showRailAccountList, enableUnifiedMailbox, includeGroupInUnified, unifiedCrossAccount, allMailFolderIds, enableCrossUnreadView, enableCrossStarredView, enableCrossAllView, colorfulSidebarIcons, tintListRowsByTag, tintListRowsByAccount, showFolderTotalCount, faviconUnreadBadge, mailLayout, proInterface, interfaceLayout, updateSetting } = useSettingsStore();
|
||||
const { toolbarPosition, showToolbarLabels, hideAccountSwitcher, showRailAccountList, enableUnifiedMailbox, includeGroupInUnified, unifiedCrossAccount, allMailFolderIds, enableCrossUnreadView, enableCrossStarredView, enableCrossAllView, colorfulSidebarIcons, tintListRowsByTag, tintListRowsByAccount, showAccountDot, showFolderTotalCount, faviconUnreadBadge, mailLayout, proInterface, interfaceLayout, updateSetting } = useSettingsStore();
|
||||
const { isSettingLocked, isSettingHidden, isFeatureEnabled } = usePolicyStore();
|
||||
const accounts = useAccountStore(s => s.accounts);
|
||||
const activeAccountId = useAccountStore(s => s.activeAccountId);
|
||||
@@ -263,6 +263,13 @@ export function LayoutSettings() {
|
||||
/>
|
||||
</SettingItem>
|
||||
|
||||
<SettingItem label={t('show_account_dot.label')} description={t('show_account_dot.description')}>
|
||||
<ToggleSwitch
|
||||
checked={showAccountDot}
|
||||
onChange={(checked) => updateSetting('showAccountDot', checked)}
|
||||
/>
|
||||
</SettingItem>
|
||||
|
||||
<SettingItem label={t('tint_list_rows_by_account.label')} description={t('tint_list_rows_by_account.description')}>
|
||||
<ToggleSwitch
|
||||
checked={tintListRowsByAccount}
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "تلوين صفوف القائمة بلون الوسم",
|
||||
"description": "تظليل كل صف رسالة بلون أول وسم فيها. عطّل هذا لإبقاء الصفوف عادية؛ ستظل نقاط الوسوم وشاراتها تظهر اللون."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Acoloreix les files de la llista segons l'etiqueta",
|
||||
"description": "Ombreja cada fila de missatge amb el color de la primera etiqueta. Desactiveu-ho per mantenir les files planes; els punts i les etiquetes encara mostraran el color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Podbarvit řádky barvou štítku",
|
||||
"description": "Podbarvit každý řádek zprávy barvou jejího prvního štítku. Po vypnutí zůstanou řádky bílé; tečky a chipy štítků barvu dál zobrazují."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Podbarvit řádky barvou účtu",
|
||||
"description": "Ve sjednoceném zobrazení podbarvit každý řádek barvou účtu místo zobrazení tečky účtu. Má přednost před podbarvením štítkem; štítky si barvu na chipech ponechají."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Nachrichtenzeilen mit Tag-Farbe einfärben",
|
||||
"description": "Die einzelnen Nachrichtenzeilen mit der Farbe ihres ersten Tags einfärben. Deaktivieren Sie diese Option, um die Zeilen neutral zu halten; Tag-Punkte und -Markierungen zeigen die Farbe weiterhin an."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Konto-Punkt anzeigen",
|
||||
"description": "Zeigt in der gemeinsamen Ansicht einen Punkt in der Kontofarbe neben dem Absender, damit Sie sehen, aus welchem Konto eine Nachricht kommt. Wirkt nicht, solange Zeilen nach Kontofarbe eingefärbt werden."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1144,6 +1144,10 @@
|
||||
"label": "צביעת שורות הרשימה לפי צבע התגית",
|
||||
"description": "צובע כל שורת הודעה בצבע התגית הראשונה שלה. כבו כדי להשאיר את השורות ללא צבע; נקודות ותוויות התגיות עדיין יציגו את הצבע."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Colora le righe in base all'account",
|
||||
"description": "Nella vista unificata, colora ogni riga con il colore del suo account invece di mostrare il pallino. Ha la precedenza sulla tinta del tag; i tag mantengono il loro colore sulle etichette."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Тагийн өнгөөр эгнээнүүдийг будах",
|
||||
"description": "Мессежийн мөр бүрийг эхний шошгоны өнгөөр сүүдэрлээрэй. Мөрүүдийг энгийн байлгахын тулд идэвхгүй болгох; шошгоны цэгүүд болон чипүүд нь өнгийг харуулсан хэвээр байна."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Fargelegg meldingsrader etter etikett",
|
||||
"description": "Gi hver meldingsrad en svak bakgrunnsfarge basert på den første etiketten. Deaktiver dette for nøytrale rader; etikettmarkørene viser fortsatt fargen."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Colorir as linhas da lista de acordo com a cor da etiqueta",
|
||||
"description": "Aplicar sombreado a cada linha de mensagem com a cor da primeira etiqueta. Desative essa opção para manter as linhas sem sombreado; os pontos e os ícones das etiquetas continuarão exibindo a cor."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1182,6 +1182,10 @@
|
||||
"label": "依標籤顏色為清單列上色",
|
||||
"description": "以第一個標籤的顏色為每封郵件列加上底色。停用後郵件列保持無底色,但標籤圓點與標籤仍會顯示該顏色。"
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -1179,6 +1179,10 @@
|
||||
"label": "Tint List Rows by Tag Color",
|
||||
"description": "Shade each message row with its first tag color. Disable to keep rows plain; tag dots and chips still show the color."
|
||||
},
|
||||
"show_account_dot": {
|
||||
"label": "Show Account Dot",
|
||||
"description": "In the unified view, show a dot in the account color next to the sender, so you can tell which account a message came from. Has no effect while rows are tinted by account color."
|
||||
},
|
||||
"tint_list_rows_by_account": {
|
||||
"label": "Tint List Rows by Account Color",
|
||||
"description": "In the unified view, shade each row with its account color instead of showing the account dot. Takes precedence over the tag tint; tags keep their color on their chips."
|
||||
|
||||
@@ -642,6 +642,7 @@ interface SettingsState {
|
||||
colorfulSidebarIcons: boolean; // Tint folder icons by role (inbox blue, junk red, etc.)
|
||||
tintListRowsByTag: boolean; // Tint mail-list rows by the first tag color
|
||||
tintListRowsByAccount: boolean; // In the unified view, tint rows by account colour instead of showing the account dot
|
||||
showAccountDot: boolean; // In the unified view, show the account colour dot next to the sender
|
||||
showFolderTotalCount: boolean; // Show total message count next to folders/tags (alongside unread)
|
||||
// Mail folders of shared (group/delegated) JMAP accounts in the sidebar.
|
||||
// Turning it off hides every shared account's folders; their calendars,
|
||||
@@ -904,6 +905,7 @@ const DEFAULT_SETTINGS = {
|
||||
colorfulSidebarIcons: true,
|
||||
tintListRowsByTag: true,
|
||||
tintListRowsByAccount: false,
|
||||
showAccountDot: true,
|
||||
showFolderTotalCount: true,
|
||||
showSharedMailAccounts: true,
|
||||
hiddenSharedMailAccounts: {} as Record<string, string[]>,
|
||||
@@ -1231,6 +1233,7 @@ export const useSettingsStore = create<SettingsState>()(
|
||||
colorfulSidebarIcons: state.colorfulSidebarIcons,
|
||||
tintListRowsByTag: state.tintListRowsByTag,
|
||||
tintListRowsByAccount: state.tintListRowsByAccount,
|
||||
showAccountDot: state.showAccountDot,
|
||||
showFolderTotalCount: state.showFolderTotalCount,
|
||||
showSharedMailAccounts: state.showSharedMailAccounts,
|
||||
hiddenSharedMailAccounts: state.hiddenSharedMailAccounts,
|
||||
|
||||
Reference in New Issue
Block a user