Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

fix(workspaces): translate billing labels, show invited email, surface share-load errors

Gabriel Steinba3e76b6984f
diff --git a/src/components/AcceptInvitationModal.tsx b/src/components/AcceptInvitationModal.tsx
index 16f7fadc0..db1857681 100644
--- a/src/components/AcceptInvitationModal.tsx
+++ b/src/components/AcceptInvitationModal.tsx
@@ -88,13 +88,18 @@ export default function AcceptInvitationModal({ token, onClose, isSignedIn, onSi
<DialogHeader>
<DialogTitle>{t("workspaces.accept.title")}</DialogTitle>
{preview && (
- <DialogDescription>
- {t("workspaces.accept.description", {
- inviter: preview.inviter_name || preview.inviter_email || "",
- workspace: preview.workspace_name,
- role: preview.workspace_role,
- })}
- </DialogDescription>
+ <>
+ <DialogDescription>
+ {t("workspaces.accept.description", {
+ inviter: preview.inviter_name || preview.inviter_email || "",
+ workspace: preview.workspace_name,
+ role: preview.workspace_role,
+ })}
+ </DialogDescription>
+ <DialogDescription className="text-xs text-muted-foreground/80 mt-1">
+ {t("workspaces.accept.sentTo", { email: preview.email })}
+ </DialogDescription>
+ </>
)}
{error && <DialogDescription className="text-destructive">{error}</DialogDescription>}
{loading && <DialogDescription>{t("workspaces.accept.loading")}</DialogDescription>}
diff --git a/src/components/notes/ShareNoteDialog.tsx b/src/components/notes/ShareNoteDialog.tsx
index ce5978ba9..77adaa443 100644
--- a/src/components/notes/ShareNoteDialog.tsx
+++ b/src/components/notes/ShareNoteDialog.tsx
@@ -15,6 +15,7 @@ import { useAuth } from "../../hooks/useAuth";
import { NoteSharingService } from "../../services/NoteSharingService.js";
import { setShareCache, updateShareCache, useShareCacheEntry } from "../../stores/noteStore";
import { useLocalStorage } from "../../hooks/useLocalStorage";
+import { useToast } from "../ui/useToast";
import { emailDomain, isPersonalEmailDomain } from "../../utils/personalEmailDomains";
import type {
NoteItem,
@@ -42,6 +43,7 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
// server-side flag in the share settings response.
const isOwner = Boolean(user);
const { t } = useTranslation();
+ const { toast } = useToast();
const cloudId = note.cloud_id;
const cached = useShareCacheEntry(cloudId);
const [defaultVisibility, setDefaultVisibility] = useLocalStorage<ShareVisibility>(
@@ -80,7 +82,13 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
});
})
.catch((err) => {
- if (!cancelled) console.error("Failed to load share settings:", err);
+ if (cancelled) return;
+ console.error("Failed to load share settings:", err);
+ toast({
+ title: t("noteEditor.share.dialog.error.loadFailed"),
+ description: err instanceof Error ? err.message : t("common.unknownError"),
+ variant: "destructive",
+ });
})
.finally(() => {
if (!cancelled) setLoading(false);
@@ -88,7 +96,7 @@ export default function ShareNoteDialog({ open, onOpenChange, note }: ShareNoteD
return () => {
cancelled = true;
};
- }, [open, cloudId]);
+ }, [open, cloudId, t, toast]);
// Apply the user's last-used visibility on first open of a still-private note.
useEffect(() => {
diff --git a/src/components/settings/WorkspaceBillingTab.tsx b/src/components/settings/WorkspaceBillingTab.tsx
index 7b5ed85f0..f263a7ea6 100644
--- a/src/components/settings/WorkspaceBillingTab.tsx
+++ b/src/components/settings/WorkspaceBillingTab.tsx
@@ -11,12 +11,6 @@ interface Props {
workspace: Workspace;
}
-const PLAN_LABELS: Record<string, string> = {
- business: "Business",
- pro: "Pro",
- free: "Free",
-};
-
export default function WorkspaceBillingTab({ workspace }: Props) {
const { t } = useTranslation();
const { toast } = useToast();
@@ -78,7 +72,9 @@ export default function WorkspaceBillingTab({ workspace }: Props) {
{t("settingsPage.workspace.billing.plan")}
</p>
<p className="text-base font-semibold text-foreground">
- {PLAN_LABELS[workspace.plan] || workspace.plan}
+ {t(`settingsPage.workspace.billing.planLabel.${workspace.plan}`, {
+ defaultValue: workspace.plan,
+ })}
</p>
</div>
<span
@@ -91,7 +87,9 @@ export default function WorkspaceBillingTab({ workspace }: Props) {
: "bg-foreground/8 text-foreground/65")
}
>
- {workspace.status}
+ {t(`settingsPage.workspace.billing.status.${workspace.status}`, {
+ defaultValue: workspace.status,
+ })}
</span>
</div>