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
refactor(client): remove the floating image export buttons
Elian Doran76e15940e744
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 79c4a02e7b..5307fc9652 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1210,9 +1210,6 @@"show_floating_buttons_button": {"button_title": "Show buttons"},- "svg_export_button": {- "button_title": "Export diagram as SVG"- },"relation_map_buttons": {"create_child_note_title": "Create child note and add it to map","create_child_note_text": "Add note"@@ -3371,9 +3368,6 @@"split": "Split view","preview": "Preview"},- "png_export_button": {- "button_title": "Export diagram as PNG"- },"svg": {"export_to_png": "The diagram could not be exported to PNG.","export_to_svg": "The diagram could not be exported to SVG.",diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsxindex fc04c06ceb..fedcf3038e 100644--- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx+++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx@@ -40,7 +40,6 @@ function FloatingButton({ className, ...props }: ActionButtonProps) {export type FloatingButtonsList = ((context: FloatingButtonContext) => false | VNode)[];export const DESKTOP_FLOATING_BUTTONS: FloatingButtonsList = [- ExportImageButtons,ExportSpreadsheetButton,InAppHelpButton,Backlinks@@ -53,26 +52,6 @@ export const POPUP_HIDDEN_FLOATING_BUTTONS: FloatingButtonsList = [InAppHelpButton];-function ExportImageButtons({ note, triggerEvent, isDefaultViewMode }: FloatingButtonContext) {- const isEnabled = ["mermaid", "mindMap"].includes(note?.type ?? "")- && note?.isContentAvailable() && isDefaultViewMode;- return isEnabled && (- <>- <FloatingButton- icon="bx bxs-file-image"- text={t("svg_export_button.button_title")}- onClick={() => triggerEvent("exportSvg")}- />-- <FloatingButton- icon="bx bxs-file-png"- text={t("png_export_button.button_title")}- onClick={() => triggerEvent("exportPng")}- />- </>- );-}-function ExportSpreadsheetButton({ note, triggerEvent, isDefaultViewMode }: FloatingButtonContext) {const isEnabled = note?.type === "spreadsheet" && note?.isContentAvailable() && isDefaultViewMode;return isEnabled && (