mirror of
https://github.com/zadam/trilium.git
synced 2025-12-05 06:54:23 +01:00
Apply suggestions from code review
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
2d3aa3a96e
commit
f976dd8d30
@ -688,7 +688,7 @@ async function downloadAsSvg(nameWithoutExtension: string, svgSource: string | S
|
||||
backgroundColor: "transparent",
|
||||
scale: 2
|
||||
});
|
||||
await triggerDownload(`${nameWithoutExtension}.svg`, result.url);
|
||||
triggerDownload(`${nameWithoutExtension}.svg`, result.url);
|
||||
} finally {
|
||||
cleanup();
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ export default function SvgSplitEditor({ ntxId, note, attachmentName, renderSvg,
|
||||
try {
|
||||
const svgEl = containerRef.current?.querySelector("svg");
|
||||
if (!svgEl) throw new Error("SVG element not found");
|
||||
await utils.downloadAsSvg(note.title + '.svg', svgEl);
|
||||
await utils.downloadAsSvg(note.title, svgEl);
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
toast.showError(t("svg.export_to_svg"));
|
||||
@ -95,7 +95,7 @@ export default function SvgSplitEditor({ ntxId, note, attachmentName, renderSvg,
|
||||
try {
|
||||
const svgEl = containerRef.current?.querySelector("svg");
|
||||
if (!svgEl) throw new Error("SVG element not found");
|
||||
await utils.downloadAsPng(note.title + '.png', svgEl);
|
||||
await utils.downloadAsPng(note.title, svgEl);
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
toast.showError(t("svg.export_to_png"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user