fix text formatting in delete dialog

This commit is contained in:
miloschwartz
2026-04-03 11:44:56 -04:00
parent fee780cb81
commit 382a46dfff

View File

@@ -106,7 +106,9 @@ function DestinationCard({
{/* URL preview */} {/* URL preview */}
<p className="text-xs text-muted-foreground truncate"> <p className="text-xs text-muted-foreground truncate">
{cfg.url || ( {cfg.url || (
<span className="italic">{t("streamingNoUrlConfigured")}</span> <span className="italic">
{t("streamingNoUrlConfigured")}
</span>
)} )}
</p> </p>
@@ -160,7 +162,9 @@ function AddDestinationCard({ onClick }: { onClick: () => void }) {
<div className="flex items-center justify-center w-9 h-9 rounded-md border-2 border-dashed border-current"> <div className="flex items-center justify-center w-9 h-9 rounded-md border-2 border-dashed border-current">
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
</div> </div>
<span className="text-sm font-medium">{t("streamingAddDestination")}</span> <span className="text-sm font-medium">
{t("streamingAddDestination")}
</span>
</div> </div>
</button> </button>
); );
@@ -186,7 +190,9 @@ function DestinationTypePicker({
const t = useTranslations(); const t = useTranslations();
const [selected, setSelected] = useState<DestinationType>("http"); const [selected, setSelected] = useState<DestinationType>("http");
const destinationTypeOptions: ReadonlyArray<StrategyOption<DestinationType>> = [ const destinationTypeOptions: ReadonlyArray<
StrategyOption<DestinationType>
> = [
{ {
id: "http", id: "http",
title: t("streamingHttpWebhookTitle"), title: t("streamingHttpWebhookTitle"),
@@ -233,13 +239,19 @@ function DestinationTypePicker({
<Credenza open={open} onOpenChange={onOpenChange}> <Credenza open={open} onOpenChange={onOpenChange}>
<CredenzaContent className="sm:max-w-lg"> <CredenzaContent className="sm:max-w-lg">
<CredenzaHeader> <CredenzaHeader>
<CredenzaTitle>{t("streamingAddDestination")}</CredenzaTitle> <CredenzaTitle>
{t("streamingAddDestination")}
</CredenzaTitle>
<CredenzaDescription> <CredenzaDescription>
{t("streamingTypePickerDescription")} {t("streamingTypePickerDescription")}
</CredenzaDescription> </CredenzaDescription>
</CredenzaHeader> </CredenzaHeader>
<CredenzaBody> <CredenzaBody>
<div className={isPaywalled ? "pointer-events-none opacity-50" : ""}> <div
className={
isPaywalled ? "pointer-events-none opacity-50" : ""
}
>
<StrategySelect <StrategySelect
options={destinationTypeOptions} options={destinationTypeOptions}
value={selected} value={selected}
@@ -301,10 +313,7 @@ export default function StreamingDestinationsPage() {
toast({ toast({
variant: "destructive", variant: "destructive",
title: t("streamingFailedToLoad"), title: t("streamingFailedToLoad"),
description: formatAxiosError( description: formatAxiosError(e, t("streamingUnexpectedError"))
e,
t("streamingUnexpectedError")
)
}); });
} finally { } finally {
setLoading(false); setLoading(false);
@@ -341,10 +350,7 @@ export default function StreamingDestinationsPage() {
toast({ toast({
variant: "destructive", variant: "destructive",
title: t("streamingFailedToUpdate"), title: t("streamingFailedToUpdate"),
description: formatAxiosError( description: formatAxiosError(e, t("streamingUnexpectedError"))
e,
t("streamingUnexpectedError")
)
}); });
} finally { } finally {
setTogglingIds((prev) => { setTogglingIds((prev) => {
@@ -375,10 +381,7 @@ export default function StreamingDestinationsPage() {
toast({ toast({
variant: "destructive", variant: "destructive",
title: t("streamingFailedToDelete"), title: t("streamingFailedToDelete"),
description: formatAxiosError( description: formatAxiosError(e, t("streamingUnexpectedError"))
e,
t("streamingUnexpectedError")
)
}); });
} finally { } finally {
setDeleting(false); setDeleting(false);
@@ -459,13 +462,14 @@ export default function StreamingDestinationsPage() {
if (!v) setDeleteTarget(null); if (!v) setDeleteTarget(null);
}} }}
string={ string={
parseHttpConfig(deleteTarget.config).name || t("streamingDeleteDialogThisDestination") parseHttpConfig(deleteTarget.config).name ||
t("streamingDeleteDialogThisDestination")
} }
title={t("streamingDeleteTitle")} title={t("streamingDeleteTitle")}
dialog={ dialog={
<p className="text-sm text-muted-foreground"> <p>
{t("streamingDeleteDialogAreYouSure")}{" "} {t("streamingDeleteDialogAreYouSure")}{" "}
<span className="font-semibold text-foreground"> <span>
{parseHttpConfig(deleteTarget.config).name || {parseHttpConfig(deleteTarget.config).name ||
t("streamingDeleteDialogThisDestination")} t("streamingDeleteDialogThisDestination")}
</span> </span>
@@ -478,4 +482,4 @@ export default function StreamingDestinationsPage() {
)} )}
</> </>
); );
} }