diff --git a/src/components/settings/FilterSettings.tsx b/src/components/settings/FilterSettings.tsx index 384bc2b7..beeb4461 100644 --- a/src/components/settings/FilterSettings.tsx +++ b/src/components/settings/FilterSettings.tsx @@ -21,6 +21,7 @@ import { FilterRuleModal } from '../filters/FilterRuleModal'; import { SieveEditorSheet } from '../filters/SieveEditorSheet'; import type { FilterRule } from '../../lib/sieve/types'; import { formatConditionValue, summarizeRule } from '../../lib/sieve/condition-value'; +import Badge from '../Badge'; type Translate = (key: string, fallback?: string) => string; @@ -366,7 +367,7 @@ export function FilterSettings({ onOpenVacation }: FilterSettingsProps = {}) { {rule.name} - {label} + {label} {hasStructured ? ( expandedView ? ( @@ -571,8 +572,6 @@ function makeStyles(c: ThemePalette) { backgroundColor: c.muted, borderRadius: radius.xs, }, - originBadge: { paddingHorizontal: 6, paddingVertical: 2, borderRadius: radius.full, backgroundColor: c.muted }, - originBadgeText: { fontSize: 10, fontWeight: '500', color: c.mutedForeground }, reorderCol: { alignItems: 'center' }, reorderBtn: { padding: 2 }, diff --git a/src/components/settings/FolderSettings.tsx b/src/components/settings/FolderSettings.tsx index 2c722b9b..8f6bbaa7 100644 --- a/src/components/settings/FolderSettings.tsx +++ b/src/components/settings/FolderSettings.tsx @@ -27,6 +27,7 @@ import { jmapClient } from '../../api/jmap-client'; import type { Mailbox } from '../../api/types'; import { MODAL_ORIENTATIONS } from '../../lib/modal-orientations'; import { useSheetInsets } from '../../lib/use-layout'; +import Badge from '../Badge'; const ROLE_ICON: Record = { inbox: Inbox, drafts: FileText, sent: Send, trash: Trash, @@ -275,11 +276,7 @@ export function FolderSettings() { {localizeMailboxName(mb.role, mb.name, t)} - {mb.role && ( - - {mb.role} - - )} + {mb.role && {mb.role}} {mb.unreadEmails > 0 && ( @@ -416,11 +413,6 @@ function makeStyles(c: ThemePalette) { folderRowPressed: { backgroundColor: c.muted }, folderLeft: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm, flex: 1 }, folderName: { ...typography.body, color: c.text, flexShrink: 1 }, - rolePill: { - paddingHorizontal: 6, paddingVertical: 2, borderRadius: radius.full, - backgroundColor: c.primaryBg, - }, - rolePillText: { fontSize: 10, fontWeight: '500', color: c.primary }, folderRight: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm }, unreadBadge: { paddingHorizontal: 6, paddingVertical: 2, borderRadius: radius.full, diff --git a/src/components/settings/IdentitySettings.tsx b/src/components/settings/IdentitySettings.tsx index f9ee1bd6..eece564e 100644 --- a/src/components/settings/IdentitySettings.tsx +++ b/src/components/settings/IdentitySettings.tsx @@ -29,6 +29,7 @@ import { sanitizeDisplayName } from '../../lib/rfc5322-mailbox'; import { sanitizeSignatureHtml } from '../../lib/signature-utils'; import { MODAL_ORIENTATIONS } from '../../lib/modal-orientations'; import { useSheetInsets } from '../../lib/use-layout'; +import Badge from '../Badge'; type DraftIdentity = { id: string; @@ -280,9 +281,7 @@ export function IdentitySettings() { )} {!identity.mayDelete ? ( - - {t('settings.identities.primary', "primary")} - + {t('settings.identities.primary', "primary")} ) : ( confirmDelete(identity)} @@ -423,11 +422,6 @@ function makeStyles(c: ThemePalette) { identityName: { ...typography.bodyMedium, color: c.text }, identityEmail: { ...typography.caption, color: c.mutedForeground, marginTop: 2 }, identityDelete: { padding: 6 }, - badge: { - paddingHorizontal: 6, paddingVertical: 2, borderRadius: radius.full, - backgroundColor: c.primaryBg, - }, - badgeText: { fontSize: 10, fontWeight: '500', color: c.primary }, modalOverlay: { flex: 1, backgroundColor: 'rgba(0,0,0,0.5)', justifyContent: 'flex-end' }, modalSheet: { diff --git a/src/components/settings/SidebarAppsSettings.tsx b/src/components/settings/SidebarAppsSettings.tsx index ed641e55..729ff26a 100644 --- a/src/components/settings/SidebarAppsSettings.tsx +++ b/src/components/settings/SidebarAppsSettings.tsx @@ -9,6 +9,7 @@ import { spacing, radius, typography, type ThemePalette } from '../../theme/toke import { useColors } from '../../theme/colors'; import { useSettingsStore, type SidebarApp } from '../../stores/settings-store'; import { useLocaleStore } from '../../stores/locale-store'; +import Badge from '../Badge'; export function SidebarAppsSettings() { const c = useColors(); @@ -79,17 +80,9 @@ export function SidebarAppsSettings() { {app.name} {app.url} - - - {app.openMode === 'inline' ? t('settings.sidebar_apps.open_mode.inline', "Inline") : t('settings.sidebar_apps.open_mode.tab', "Tab")} - - + + {app.openMode === 'inline' ? t('settings.sidebar_apps.open_mode.inline', "Inline") : t('settings.sidebar_apps.open_mode.tab', "Tab")} + setEditingId(app.id)} accessibilityRole="button" accessibilityLabel={t('common.edit', "Edit")}> @@ -237,14 +230,6 @@ function makeStyles(c: ThemePalette) { }, appName: { ...typography.bodyMedium, color: c.text }, appUrl: { ...typography.caption, color: c.mutedForeground, marginTop: 2 }, - modeBadge: { - paddingHorizontal: 6, - paddingVertical: 2, - borderRadius: radius.full, - }, - modeBadgeInline: { backgroundColor: 'rgba(59, 130, 246, 0.1)' }, - modeBadgeTab: { backgroundColor: c.muted }, - modeBadgeText: { fontSize: 10, fontWeight: '500' }, iconBtn: { width: 28, height: 28, diff --git a/src/components/settings/VacationSettings.tsx b/src/components/settings/VacationSettings.tsx index c3385bf9..83801284 100644 --- a/src/components/settings/VacationSettings.tsx +++ b/src/components/settings/VacationSettings.tsx @@ -417,7 +417,7 @@ function makeStyles(c: ThemePalette) { }, pillActive: { backgroundColor: c.successBg }, pillInactive: { backgroundColor: c.muted }, - pillText: { fontSize: 11, fontWeight: '500' }, + pillText: { fontSize: 12 }, pillTextActive: { color: c.success }, pillTextInactive: { color: c.mutedForeground }, dateInput: { diff --git a/src/screens/UnifiedInboxScreen.tsx b/src/screens/UnifiedInboxScreen.tsx index 5040f28b..d2c7097d 100644 --- a/src/screens/UnifiedInboxScreen.tsx +++ b/src/screens/UnifiedInboxScreen.tsx @@ -637,7 +637,7 @@ function makeStyles(c: ThemePalette) { backgroundColor: c.muted, maxWidth: 140, }, - sharedBadgeText: { fontSize: 10, fontWeight: '500', color: c.mutedForeground }, + sharedBadgeText: { fontSize: 12, color: c.mutedForeground }, preview: { ...typography.caption, color: c.textMuted }, }); }