Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/image compression tool: improve UI
Adorian Doran8641896fea45
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 0315ca17d4..cebd792dd2 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -2937,7 +2937,6 @@"cleanup_confirm_compacting_title": "Compacting database is a slow operation","cleanup_confirm_compacting": "Compacting the database can take several minutes, depending on its size and on the performance of the machine running Trilium. Also, up to {{space}} of free disk space on the machine is temporarily needed (in the data directory and the system's temporary directory).","cleanup_compact_notice": "This operation may take several minutes and Trilium will not respond until it completes.",- "cleanup_compress_images_help": "Recompresses every image in the database under the settings below. Unlike the steps above it deletes nothing — it rewrites images to weigh less, which cannot be undone and is not counted in the estimate, since what an image will compress to is only known once it has been. The space it frees is included in the total reported when the cleanup finishes.","compress_summary_reading": "Reading…","compress_summary_failed": "Could not read what is here.","compress_summary_scope_one": "{{title}}, {{count}} descendant note",@@ -2961,21 +2960,21 @@"compress_info_quality": "quality {{quality}}","compress_quality_value": "{{quality}}%","compress_resize": "Resize image",- "compress_resize_help": "Scales the image down if it is larger than the given size, keeping its proportions. An image that already fits is left untouched, so on its own this reaches only oversized images.",+ "compress_resize_help": "Reduces images that are larger than the chosen size. Images that already fit are left unchanged.","compress_max_dimensions": "Reduce the image size to","compress_jpeg_handling": "JPEG image",- "compress_jpeg_handling_help": "Keeping it leaves the encoding alone; if it is resized it is written back at a near-lossless quality, so nothing is deliberately given up. Compressing re-encodes it at the given quality whatever its size, which loses a little more each time and cannot be undone.",+ "compress_jpeg_handling_help": "Keeping the image preserves its current quality. Compressing saves it again at a lower quality to reduce its size, which cannot be undone.","compress_jpeg_keep": "Keep as it is","compress_jpeg_compress": "Compress","compress_png_handling": "PNG image",- "compress_png_handling_help": "Only one of these can happen to a PNG. Keeping it leaves every pixel intact, so only resizing can shrink it. Optimizing reduces it to a palette of 256 colors and writes it back as a PNG: lossy and permanent, though images with few colors, such as screenshots and diagrams, usually look unchanged, and transparency is preserved. Converting to JPEG usually saves the most, but the image stops being a PNG; an image with transparency cannot be converted, as JPEG cannot store it, and is optimized instead.",+ "compress_png_handling_help": "Keeping the image preserves it exactly. Optimizing reduces the number of colors, which is usually unnoticeable in screenshots and diagrams. Converting to JPEG saves the most space, but cannot be applied to images with transparency, which are optimized instead.","compress_png_keep": "Keep as it is","compress_png_optimize": "Optimize","compress_png_jpeg": "Convert to JPEG","compress_quality": "Quality","compress_unsupported_format": "This image is in a format that cannot be compressed. Only JPEG and PNG images can be.","compress_process_child_notes": "Process child notes as well",- "compress_process_child_notes_help": "Compresses the images of every note in the subtree, not just the selected one. Beware that a child note may be a clone, in which case its images are shared with the other notes it appears in.",+ "compress_process_child_notes_help": "Also compresses the images of the notes beneath the selected one. A child note may appear in several places, and its images are shared with all of them.","compress_cancel": "Cancel","compress_running": "Compressing images…","compress_running_progress": "Compressing image {{done}} of {{total}}…",diff --git a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/cleanup_dialog.tsx b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/cleanup_dialog.tsxindex 93910953db..d61999ffe2 100644--- a/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/cleanup_dialog.tsx+++ b/apps/client/src/widgets/type_widgets/options/content_manager/space_usage/cleanup_dialog.tsx@@ -281,10 +281,7 @@ function CleanupDialog({ onFinished }: { onFinished: (reclaimed: number | null){/* Carries no color, having no arc to name — it is here so the title startswhere every other row's does, rather than half a swatch to its left. */}<span className="cleanup-item-swatch" aria-hidden="true" />- <span className="cleanup-item-title">- {t("compress-images")}- <ContextualHelp helpMessage={t("space_usage.cleanup_compress_images_help")} />- </span>+ <span className="cleanup-item-title">{t("compress-images")}</span><FormTogglecurrentValue={options.compressImages}onChange={(value) => update({ compressImages: value })}