@agent-native/core 0.76.9 → 0.76.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +39 -0
- package/corpus/core/docs/content/locales/ar-SA/actions.md +7 -7
- package/corpus/core/docs/content/locales/ar-SA/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/de-DE/actions.md +9 -9
- package/corpus/core/docs/content/locales/de-DE/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/es-ES/actions.md +9 -9
- package/corpus/core/docs/content/locales/es-ES/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/fr-FR/actions.md +9 -9
- package/corpus/core/docs/content/locales/fr-FR/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/hi-IN/actions.md +9 -9
- package/corpus/core/docs/content/locales/hi-IN/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/ja-JP/actions.md +9 -9
- package/corpus/core/docs/content/locales/ja-JP/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/ko-KR/actions.md +9 -9
- package/corpus/core/docs/content/locales/ko-KR/template-plan.md +4 -4
- package/corpus/core/docs/content/locales/pt-BR/actions.md +9 -9
- package/corpus/core/docs/content/locales/pt-BR/template-plan.md +6 -4
- package/corpus/core/docs/content/locales/zh-CN/actions.md +9 -9
- package/corpus/core/docs/content/locales/zh-CN/template-plan.md +4 -4
- package/corpus/core/package.json +1 -1
- package/corpus/core/scripts/generate-og-font-data.mjs +9 -5
- package/corpus/core/src/client/AgentPanel.tsx +70 -1
- package/corpus/core/src/client/AssistantChat.tsx +1 -3
- package/corpus/core/src/client/ErrorBoundary.tsx +151 -10
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +0 -62
- package/corpus/core/src/client/composer/TiptapComposer.tsx +6 -13
- package/corpus/core/src/server/og-fonts-data.ts +7 -4
- package/corpus/core/src/server/og-fonts.ts +10 -3
- package/corpus/core/src/server/social-og-image.ts +45 -6
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +199 -19
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +51 -31
- package/corpus/templates/analytics/app/components/layout/DashboardHeader.tsx +26 -16
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -2
- package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +8 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -5
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +172 -107
- package/corpus/templates/analytics/app/i18n-data.ts +1076 -5
- package/corpus/templates/analytics/app/pages/Settings.tsx +2 -2
- package/corpus/templates/analytics/app/pages/adhoc/AdhocRouter.tsx +1 -21
- package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +35 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +3 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +3 -26
- package/corpus/templates/analytics/changelog/2026-06-24-analytics-navigation-command-palette-and-settings-now-honor-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-daily-dashboard-charts-now-use-local-day-buckets-and-show-th.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-loading-placeholders-now-span-the-available-page-w.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-dashboard-dates-now-align-to-pacific-time-for-da.md +6 -0
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +19 -7
- package/corpus/templates/assets/app/components/layout/Header.tsx +0 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +0 -2
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -2
- package/corpus/templates/chat/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/clips/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/clips/app/hooks/use-library.ts +2 -0
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-06-24-archive-and-spaces-navigation-is-more-resilient-when-sidebar.md +6 -0
- package/corpus/templates/content/app/components/layout/Header.tsx +0 -2
- package/corpus/templates/design/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/forms/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/macros/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +4 -2
- package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +18 -12
- package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +9 -5
- package/corpus/templates/mail/app/components/email/ComposeModal.tsx +36 -19
- package/corpus/templates/mail/app/components/email/EmailList.tsx +59 -55
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +7 -3
- package/corpus/templates/mail/app/components/email/EmailThread.tsx +25 -16
- package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +25 -19
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +32 -17
- package/corpus/templates/mail/app/components/email/RecipientInput.tsx +26 -10
- package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +5 -3
- package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +4 -2
- package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +9 -5
- package/corpus/templates/mail/app/components/email/extensions/ComposeImageBlock.tsx +4 -2
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +168 -86
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +4 -2
- package/corpus/templates/mail/app/i18n/ar-SA.ts +212 -0
- package/corpus/templates/mail/app/i18n/de-DE.ts +212 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +212 -0
- package/corpus/templates/mail/app/i18n/es-ES.ts +212 -0
- package/corpus/templates/mail/app/i18n/fr-FR.ts +212 -0
- package/corpus/templates/mail/app/i18n/hi-IN.ts +212 -0
- package/corpus/templates/mail/app/i18n/ja-JP.ts +212 -0
- package/corpus/templates/mail/app/i18n/ko-KR.ts +212 -0
- package/corpus/templates/mail/app/i18n/pt-BR.ts +212 -0
- package/corpus/templates/mail/app/i18n/zh-CN.ts +211 -0
- package/corpus/templates/mail/changelog/2026-06-24-interface-language-support-now-covers-more-mail-controls-and.md +6 -0
- package/corpus/templates/plan/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -6
- package/corpus/templates/videos/app/components/layout/Header.tsx +1 -6
- package/dist/client/AgentPanel.d.ts +5 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +23 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +1 -3
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +128 -7
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +1 -17
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +4 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +5 -9
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/server/og-fonts-data.d.ts +1 -0
- package/dist/server/og-fonts-data.d.ts.map +1 -1
- package/dist/server/og-fonts-data.js +5 -4
- package/dist/server/og-fonts-data.js.map +1 -1
- package/dist/server/og-fonts.d.ts +1 -0
- package/dist/server/og-fonts.d.ts.map +1 -1
- package/dist/server/og-fonts.js +10 -4
- package/dist/server/og-fonts.js.map +1 -1
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +33 -6
- package/dist/server/social-og-image.js.map +1 -1
- package/docs/content/locales/ar-SA/actions.md +7 -7
- package/docs/content/locales/ar-SA/template-plan.md +6 -4
- package/docs/content/locales/de-DE/actions.md +9 -9
- package/docs/content/locales/de-DE/template-plan.md +6 -4
- package/docs/content/locales/es-ES/actions.md +9 -9
- package/docs/content/locales/es-ES/template-plan.md +6 -4
- package/docs/content/locales/fr-FR/actions.md +9 -9
- package/docs/content/locales/fr-FR/template-plan.md +6 -4
- package/docs/content/locales/hi-IN/actions.md +9 -9
- package/docs/content/locales/hi-IN/template-plan.md +4 -4
- package/docs/content/locales/ja-JP/actions.md +9 -9
- package/docs/content/locales/ja-JP/template-plan.md +4 -4
- package/docs/content/locales/ko-KR/actions.md +9 -9
- package/docs/content/locales/ko-KR/template-plan.md +4 -4
- package/docs/content/locales/pt-BR/actions.md +9 -9
- package/docs/content/locales/pt-BR/template-plan.md +6 -4
- package/docs/content/locales/zh-CN/actions.md +9 -9
- package/docs/content/locales/zh-CN/template-plan.md +4 -4
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
IconLoader2,
|
|
10
10
|
} from "@tabler/icons-react";
|
|
11
11
|
import { cn, formatShortcut } from "@/lib/utils";
|
|
12
|
+
import { useT } from "@agent-native/core/client";
|
|
12
13
|
import { useState, useEffect, useRef, useCallback } from "react";
|
|
13
14
|
import {
|
|
14
15
|
Tooltip,
|
|
@@ -51,6 +52,7 @@ export function ComposeBubbleToolbar({
|
|
|
51
52
|
getCurrentDraftBody,
|
|
52
53
|
sendToAgent,
|
|
53
54
|
}: ComposeBubbleToolbarProps) {
|
|
55
|
+
const t = useT();
|
|
54
56
|
const [visible, setVisible] = useState(false);
|
|
55
57
|
const [position, setPosition] = useState({ top: 0, left: 0 });
|
|
56
58
|
const [activeMarks, setActiveMarks] = useState({
|
|
@@ -244,32 +246,32 @@ export function ComposeBubbleToolbar({
|
|
|
244
246
|
const items = [
|
|
245
247
|
{
|
|
246
248
|
icon: IconBold,
|
|
247
|
-
title: "
|
|
249
|
+
title: t("mail.compose.bold"),
|
|
248
250
|
action: () => (editor.chain().focus() as any).toggleBold().run(),
|
|
249
251
|
active: activeMarks.bold,
|
|
250
252
|
},
|
|
251
253
|
{
|
|
252
254
|
icon: IconItalic,
|
|
253
|
-
title: "
|
|
255
|
+
title: t("mail.compose.italic"),
|
|
254
256
|
action: () => (editor.chain().focus() as any).toggleItalic().run(),
|
|
255
257
|
active: activeMarks.italic,
|
|
256
258
|
},
|
|
257
259
|
{
|
|
258
260
|
icon: IconStrikethrough,
|
|
259
|
-
title: "
|
|
261
|
+
title: t("mail.compose.strikethrough"),
|
|
260
262
|
action: () => (editor.chain().focus() as any).toggleStrike().run(),
|
|
261
263
|
active: activeMarks.strike,
|
|
262
264
|
},
|
|
263
265
|
{
|
|
264
266
|
icon: IconCode,
|
|
265
|
-
title: "
|
|
267
|
+
title: t("mail.compose.code"),
|
|
266
268
|
action: () => (editor.chain().focus() as any).toggleCode().run(),
|
|
267
269
|
active: activeMarks.code,
|
|
268
270
|
},
|
|
269
271
|
{ type: "divider" as const },
|
|
270
272
|
{
|
|
271
273
|
icon: IconLink,
|
|
272
|
-
title: "
|
|
274
|
+
title: t("mail.compose.link"),
|
|
273
275
|
action: toggleLink,
|
|
274
276
|
active: activeMarks.link,
|
|
275
277
|
},
|
|
@@ -292,7 +294,7 @@ export function ComposeBubbleToolbar({
|
|
|
292
294
|
<input
|
|
293
295
|
autoFocus
|
|
294
296
|
type="url"
|
|
295
|
-
placeholder="
|
|
297
|
+
placeholder={t("mail.compose.pasteLink")}
|
|
296
298
|
value={linkUrl}
|
|
297
299
|
onChange={(e) => setLinkUrl(e.target.value)}
|
|
298
300
|
onKeyDown={(e) => {
|
|
@@ -308,7 +310,7 @@ export function ComposeBubbleToolbar({
|
|
|
308
310
|
onClick={handleSetLink}
|
|
309
311
|
className="text-xs text-blue-400 hover:text-blue-300 px-1.5 py-0.5 font-medium"
|
|
310
312
|
>
|
|
311
|
-
|
|
313
|
+
{t("mail.compose.apply")}
|
|
312
314
|
</button>
|
|
313
315
|
</div>
|
|
314
316
|
) : showAiInput || isGenerating ? (
|
|
@@ -316,13 +318,15 @@ export function ComposeBubbleToolbar({
|
|
|
316
318
|
{isGenerating ? (
|
|
317
319
|
<>
|
|
318
320
|
<IconLoader2 size={14} className="animate-spin text-gray-400" />
|
|
319
|
-
<span className="text-xs text-gray-400 px-1">
|
|
321
|
+
<span className="text-xs text-gray-400 px-1">
|
|
322
|
+
{t("mail.compose.generating")}
|
|
323
|
+
</span>
|
|
320
324
|
</>
|
|
321
325
|
) : (
|
|
322
326
|
<>
|
|
323
327
|
<textarea
|
|
324
328
|
autoFocus
|
|
325
|
-
placeholder="
|
|
329
|
+
placeholder={t("mail.compose.aiAssistPlaceholder")}
|
|
326
330
|
value={aiPrompt}
|
|
327
331
|
rows={2}
|
|
328
332
|
onChange={(e) => setAiPrompt(e.target.value)}
|
|
@@ -346,11 +350,13 @@ export function ComposeBubbleToolbar({
|
|
|
346
350
|
onClick={() => void handleAiAssist()}
|
|
347
351
|
className="text-xs text-blue-400 hover:text-blue-300 px-1.5 py-0.5 font-medium shrink-0 self-end pb-1"
|
|
348
352
|
>
|
|
349
|
-
|
|
353
|
+
{t("mail.compose.generate")}
|
|
350
354
|
</button>
|
|
351
355
|
</TooltipTrigger>
|
|
352
356
|
<TooltipContent>
|
|
353
|
-
|
|
357
|
+
{t("mail.compose.generateShortcut", {
|
|
358
|
+
shortcut: formatShortcut("cmd+enter"),
|
|
359
|
+
})}
|
|
354
360
|
</TooltipContent>
|
|
355
361
|
</Tooltip>
|
|
356
362
|
</>
|
|
@@ -409,7 +415,7 @@ export function ComposeBubbleToolbar({
|
|
|
409
415
|
<IconPencil size={14} strokeWidth={2.5} />
|
|
410
416
|
</button>
|
|
411
417
|
</TooltipTrigger>
|
|
412
|
-
<TooltipContent>
|
|
418
|
+
<TooltipContent>{t("mail.compose.aiAssist")}</TooltipContent>
|
|
413
419
|
</Tooltip>
|
|
414
420
|
</div>
|
|
415
421
|
)}
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
} from "@/components/ui/dialog";
|
|
31
31
|
import { Button } from "@/components/ui/button";
|
|
32
32
|
import { Input } from "@/components/ui/input";
|
|
33
|
+
import { useT } from "@agent-native/core/client";
|
|
33
34
|
|
|
34
35
|
const lowlight = createLowlight(common);
|
|
35
36
|
|
|
@@ -76,6 +77,7 @@ export const ComposeEditor = forwardRef<
|
|
|
76
77
|
},
|
|
77
78
|
ref,
|
|
78
79
|
) {
|
|
80
|
+
const t = useT();
|
|
79
81
|
const isSettingContent = useRef(false);
|
|
80
82
|
// Last time the user actually typed (not merely had focus). Used to let an
|
|
81
83
|
// external/agent edit reconcile in even while the editor is focused but idle,
|
|
@@ -105,7 +107,7 @@ export const ComposeEditor = forwardRef<
|
|
|
105
107
|
allowBase64: true,
|
|
106
108
|
}),
|
|
107
109
|
Placeholder.configure({
|
|
108
|
-
placeholder: "
|
|
110
|
+
placeholder: t("mail.compose.writeMessagePlaceholder"),
|
|
109
111
|
showOnlyWhenEditable: true,
|
|
110
112
|
showOnlyCurrent: true,
|
|
111
113
|
}),
|
|
@@ -267,8 +269,10 @@ export const ComposeEditor = forwardRef<
|
|
|
267
269
|
<Dialog open={showLinkDialog} onOpenChange={setShowLinkDialog}>
|
|
268
270
|
<DialogContent>
|
|
269
271
|
<DialogHeader>
|
|
270
|
-
<DialogTitle>
|
|
271
|
-
<DialogDescription>
|
|
272
|
+
<DialogTitle>{t("mail.compose.insertLink")}</DialogTitle>
|
|
273
|
+
<DialogDescription>
|
|
274
|
+
{t("mail.compose.enterLinkUrl")}
|
|
275
|
+
</DialogDescription>
|
|
272
276
|
</DialogHeader>
|
|
273
277
|
<Input
|
|
274
278
|
autoFocus
|
|
@@ -284,10 +288,10 @@ export const ComposeEditor = forwardRef<
|
|
|
284
288
|
/>
|
|
285
289
|
<DialogFooter>
|
|
286
290
|
<Button variant="outline" onClick={() => setShowLinkDialog(false)}>
|
|
287
|
-
|
|
291
|
+
{t("mail.compose.cancel")}
|
|
288
292
|
</Button>
|
|
289
293
|
<Button onClick={applyLink} disabled={!linkUrl.trim()}>
|
|
290
|
-
|
|
294
|
+
{t("mail.compose.apply")}
|
|
291
295
|
</Button>
|
|
292
296
|
</DialogFooter>
|
|
293
297
|
</DialogContent>
|
|
@@ -42,7 +42,7 @@ import { useUpdateQueuedDraft } from "@/hooks/use-draft-queue";
|
|
|
42
42
|
import { useScheduleEmail } from "@/hooks/use-scheduled-jobs";
|
|
43
43
|
import { SendLaterButton } from "./SendLaterButton";
|
|
44
44
|
import { expandAliasTokens } from "@/lib/alias-utils";
|
|
45
|
-
import { useAgentChatGenerating } from "@agent-native/core/client";
|
|
45
|
+
import { useAgentChatGenerating, useT } from "@agent-native/core/client";
|
|
46
46
|
import { toast } from "sonner";
|
|
47
47
|
import type { ComposeState } from "@shared/types";
|
|
48
48
|
import {
|
|
@@ -152,6 +152,7 @@ export function ComposeModal({
|
|
|
152
152
|
onReopen,
|
|
153
153
|
onInitialExpandedConsumed,
|
|
154
154
|
}: ComposeModalProps) {
|
|
155
|
+
const t = useT();
|
|
155
156
|
const isMobile = useIsMobile();
|
|
156
157
|
const [minimized, setMinimized] = useState(false);
|
|
157
158
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
@@ -570,7 +571,7 @@ export function ComposeModal({
|
|
|
570
571
|
<IconPlus className="h-3 w-3" />
|
|
571
572
|
</button>
|
|
572
573
|
</TooltipTrigger>
|
|
573
|
-
<TooltipContent>
|
|
574
|
+
<TooltipContent>{t("mail.compose.newDraft")}</TooltipContent>
|
|
574
575
|
</Tooltip>
|
|
575
576
|
</div>
|
|
576
577
|
|
|
@@ -582,7 +583,11 @@ export function ComposeModal({
|
|
|
582
583
|
variant="ghost"
|
|
583
584
|
size="icon"
|
|
584
585
|
className="h-7 w-7"
|
|
585
|
-
aria-label={
|
|
586
|
+
aria-label={
|
|
587
|
+
minimized
|
|
588
|
+
? t("mail.compose.restoreCompose")
|
|
589
|
+
: t("mail.compose.minimizeCompose")
|
|
590
|
+
}
|
|
586
591
|
onClick={() => {
|
|
587
592
|
setIsExpanded(false);
|
|
588
593
|
setMinimized(!minimized);
|
|
@@ -592,7 +597,9 @@ export function ComposeModal({
|
|
|
592
597
|
</Button>
|
|
593
598
|
</TooltipTrigger>
|
|
594
599
|
<TooltipContent>
|
|
595
|
-
{minimized
|
|
600
|
+
{minimized
|
|
601
|
+
? t("mail.compose.restore")
|
|
602
|
+
: t("mail.compose.minimize")}
|
|
596
603
|
</TooltipContent>
|
|
597
604
|
</Tooltip>
|
|
598
605
|
{!minimized && (
|
|
@@ -603,7 +610,9 @@ export function ComposeModal({
|
|
|
603
610
|
size="icon"
|
|
604
611
|
className="h-7 w-7"
|
|
605
612
|
aria-label={
|
|
606
|
-
isExpanded
|
|
613
|
+
isExpanded
|
|
614
|
+
? t("mail.compose.restoreComposeSize")
|
|
615
|
+
: t("mail.compose.fullScreenCompose")
|
|
607
616
|
}
|
|
608
617
|
aria-pressed={isExpanded}
|
|
609
618
|
onClick={() => {
|
|
@@ -619,7 +628,9 @@ export function ComposeModal({
|
|
|
619
628
|
</Button>
|
|
620
629
|
</TooltipTrigger>
|
|
621
630
|
<TooltipContent>
|
|
622
|
-
{isExpanded
|
|
631
|
+
{isExpanded
|
|
632
|
+
? t("mail.compose.restoreSize")
|
|
633
|
+
: t("mail.compose.fullScreen")}
|
|
623
634
|
</TooltipContent>
|
|
624
635
|
</Tooltip>
|
|
625
636
|
)}
|
|
@@ -714,7 +725,7 @@ export function ComposeModal({
|
|
|
714
725
|
onChange={(e) =>
|
|
715
726
|
onUpdate(activeId!, { subject: e.target.value })
|
|
716
727
|
}
|
|
717
|
-
placeholder="
|
|
728
|
+
placeholder={t("mail.compose.subject")}
|
|
718
729
|
className="flex-1 bg-transparent py-2 text-sm outline-none placeholder:text-muted-foreground"
|
|
719
730
|
/>
|
|
720
731
|
</div>
|
|
@@ -759,7 +770,7 @@ export function ComposeModal({
|
|
|
759
770
|
<IconBold className="h-3.5 w-3.5" />
|
|
760
771
|
</Button>
|
|
761
772
|
</TooltipTrigger>
|
|
762
|
-
<TooltipContent>
|
|
773
|
+
<TooltipContent>{t("mail.compose.bold")}</TooltipContent>
|
|
763
774
|
</Tooltip>
|
|
764
775
|
<Tooltip>
|
|
765
776
|
<TooltipTrigger asChild>
|
|
@@ -772,7 +783,7 @@ export function ComposeModal({
|
|
|
772
783
|
<IconItalic className="h-3.5 w-3.5" />
|
|
773
784
|
</Button>
|
|
774
785
|
</TooltipTrigger>
|
|
775
|
-
<TooltipContent>
|
|
786
|
+
<TooltipContent>{t("mail.compose.italic")}</TooltipContent>
|
|
776
787
|
</Tooltip>
|
|
777
788
|
<Tooltip>
|
|
778
789
|
<TooltipTrigger asChild>
|
|
@@ -785,7 +796,7 @@ export function ComposeModal({
|
|
|
785
796
|
<IconLink className="h-3.5 w-3.5" />
|
|
786
797
|
</Button>
|
|
787
798
|
</TooltipTrigger>
|
|
788
|
-
<TooltipContent>
|
|
799
|
+
<TooltipContent>{t("mail.compose.insertLink")}</TooltipContent>
|
|
789
800
|
</Tooltip>
|
|
790
801
|
<Tooltip>
|
|
791
802
|
<TooltipTrigger asChild>
|
|
@@ -798,7 +809,7 @@ export function ComposeModal({
|
|
|
798
809
|
<IconPaperclip className="h-3.5 w-3.5" />
|
|
799
810
|
</Button>
|
|
800
811
|
</TooltipTrigger>
|
|
801
|
-
<TooltipContent>
|
|
812
|
+
<TooltipContent>{t("mail.compose.attachFile")}</TooltipContent>
|
|
802
813
|
</Tooltip>
|
|
803
814
|
|
|
804
815
|
<div className="mx-1 h-4 w-px bg-border" />
|
|
@@ -806,7 +817,7 @@ export function ComposeModal({
|
|
|
806
817
|
{isGenerating ? (
|
|
807
818
|
<div className="flex items-center gap-1.5 px-2 text-xs text-muted-foreground">
|
|
808
819
|
<IconLoader2 className="h-3.5 w-3.5 animate-spin" />
|
|
809
|
-
<span>
|
|
820
|
+
<span>{t("mail.compose.generating")}</span>
|
|
810
821
|
</div>
|
|
811
822
|
) : (
|
|
812
823
|
<Popover open={generateOpen} onOpenChange={setGenerateOpen}>
|
|
@@ -816,13 +827,13 @@ export function ComposeModal({
|
|
|
816
827
|
size="sm"
|
|
817
828
|
className="h-7 gap-1.5 px-2 text-xs"
|
|
818
829
|
>
|
|
819
|
-
|
|
830
|
+
{t("mail.compose.generate")}
|
|
820
831
|
</Button>
|
|
821
832
|
</PopoverTrigger>
|
|
822
833
|
<PopoverContent side="top" align="start" className="w-80 p-3">
|
|
823
834
|
<div className="flex flex-col gap-2">
|
|
824
835
|
<label className="text-xs font-medium text-muted-foreground">
|
|
825
|
-
|
|
836
|
+
{t("mail.compose.agentPromptLabel")}
|
|
826
837
|
</label>
|
|
827
838
|
<textarea
|
|
828
839
|
ref={promptRef}
|
|
@@ -838,13 +849,14 @@ export function ComposeModal({
|
|
|
838
849
|
setGenerateOpen(false);
|
|
839
850
|
}
|
|
840
851
|
}}
|
|
841
|
-
placeholder="
|
|
852
|
+
placeholder={t("mail.compose.agentPromptPlaceholder")}
|
|
842
853
|
className="min-h-[60px] w-full resize-none rounded-md border bg-transparent px-3 py-2 text-sm outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"
|
|
843
854
|
autoFocus
|
|
844
855
|
/>
|
|
845
856
|
<div className="flex items-center justify-between">
|
|
846
857
|
<span className="text-[10px] text-muted-foreground">
|
|
847
|
-
<kbd className="kbd-hint">↵</kbd>
|
|
858
|
+
<kbd className="kbd-hint">↵</kbd>{" "}
|
|
859
|
+
{t("mail.compose.toSubmit")}
|
|
848
860
|
</span>
|
|
849
861
|
<Button
|
|
850
862
|
size="sm"
|
|
@@ -852,7 +864,7 @@ export function ComposeModal({
|
|
|
852
864
|
disabled={!generatePrompt.trim()}
|
|
853
865
|
className="h-7 gap-1.5 px-3 text-xs"
|
|
854
866
|
>
|
|
855
|
-
|
|
867
|
+
{t("mail.compose.generate")}
|
|
856
868
|
</Button>
|
|
857
869
|
</div>
|
|
858
870
|
</div>
|
|
@@ -871,7 +883,7 @@ export function ComposeModal({
|
|
|
871
883
|
<IconTrash className="h-4 w-4" />
|
|
872
884
|
</button>
|
|
873
885
|
</TooltipTrigger>
|
|
874
|
-
<TooltipContent>
|
|
886
|
+
<TooltipContent>{t("mail.compose.deleteDraft")}</TooltipContent>
|
|
875
887
|
</Tooltip>
|
|
876
888
|
<SendLaterButton
|
|
877
889
|
onSend={handleSend}
|
|
@@ -924,6 +936,7 @@ function ComposeBody({
|
|
|
924
936
|
setShowQuoted: (show: boolean) => void;
|
|
925
937
|
signature?: string;
|
|
926
938
|
}) {
|
|
939
|
+
const t = useT();
|
|
927
940
|
const [editableContent, quotedContent] = useMemo(
|
|
928
941
|
() => splitQuotedContent(activeDraft.body),
|
|
929
942
|
[activeDraft.body],
|
|
@@ -994,7 +1007,11 @@ function ComposeBody({
|
|
|
994
1007
|
<>
|
|
995
1008
|
<button
|
|
996
1009
|
type="button"
|
|
997
|
-
aria-label={
|
|
1010
|
+
aria-label={
|
|
1011
|
+
showQuoted
|
|
1012
|
+
? t("mail.thread.hideQuotedText")
|
|
1013
|
+
: t("mail.thread.showQuotedText")
|
|
1014
|
+
}
|
|
998
1015
|
onClick={() => setShowQuoted(!showQuoted)}
|
|
999
1016
|
className="mt-1 inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground/50 transition-colors hover:bg-accent hover:text-muted-foreground"
|
|
1000
1017
|
>
|