From 815078168f5a24128e25571788dc3dea9cb96a20 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 1 Apr 2025 23:24:21 +0300 Subject: [PATCH] refactor(dev): use es6-string-html for templates --- src/public/app/widgets/api_log.ts | 2 +- src/public/app/widgets/attachment_detail.ts | 2 +- .../attribute_widgets/attribute_detail.ts | 2 +- .../attribute_widgets/attribute_editor.ts | 2 +- .../widgets/bulk_actions/execute_script.ts | 2 +- .../widgets/bulk_actions/label/add_label.ts | 22 +++++++++---------- .../bulk_actions/label/delete_label.ts | 4 ++-- .../bulk_actions/label/rename_label.ts | 22 +++++++++---------- .../bulk_actions/label/update_label_value.ts | 20 ++++++++--------- .../widgets/bulk_actions/note/delete_note.ts | 10 ++++----- .../bulk_actions/note/delete_revisions.ts | 2 +- .../widgets/bulk_actions/note/move_note.ts | 14 ++++++------ .../widgets/bulk_actions/note/rename_note.ts | 18 +++++++-------- .../bulk_actions/relation/add_relation.ts | 16 +++++++------- .../bulk_actions/relation/delete_relation.ts | 6 ++--- .../bulk_actions/relation/rename_relation.ts | 22 +++++++++---------- .../relation/update_relation_target.ts | 20 ++++++++--------- .../app/widgets/buttons/abstract_button.ts | 2 +- .../widgets/buttons/attachments_actions.ts | 2 +- src/public/app/widgets/buttons/global_menu.ts | 2 +- .../app/widgets/buttons/note_actions.ts | 2 +- .../widgets/buttons/right_dropdown_button.ts | 2 +- .../app/widgets/buttons/update_available.ts | 2 +- src/public/app/widgets/close_zen_button.ts | 2 +- .../widgets/containers/ribbon_container.ts | 2 +- src/public/app/widgets/dialogs/about.ts | 2 +- src/public/app/widgets/dialogs/add_link.ts | 2 +- .../app/widgets/dialogs/branch_prefix.ts | 2 +- .../app/widgets/dialogs/bulk_actions.ts | 2 +- src/public/app/widgets/dialogs/clone_to.ts | 2 +- src/public/app/widgets/dialogs/confirm.ts | 2 +- .../app/widgets/dialogs/delete_notes.ts | 2 +- src/public/app/widgets/dialogs/export.ts | 2 +- src/public/app/widgets/dialogs/help.ts | 2 +- src/public/app/widgets/dialogs/import.ts | 2 +- .../app/widgets/dialogs/include_note.ts | 2 +- src/public/app/widgets/dialogs/info.ts | 2 +- .../app/widgets/dialogs/jump_to_note.ts | 2 +- .../app/widgets/dialogs/markdown_import.ts | 2 +- src/public/app/widgets/dialogs/move_to.ts | 2 +- .../app/widgets/dialogs/note_type_chooser.ts | 2 +- .../app/widgets/dialogs/password_not_set.ts | 2 +- src/public/app/widgets/dialogs/prompt.ts | 2 +- .../dialogs/protected_session_password.ts | 2 +- .../app/widgets/dialogs/recent_changes.ts | 2 +- src/public/app/widgets/dialogs/revisions.ts | 2 +- .../app/widgets/dialogs/sort_child_notes.ts | 2 +- .../app/widgets/dialogs/upload_attachments.ts | 2 +- src/public/app/widgets/editability_select.ts | 2 +- src/public/app/widgets/find.ts | 2 +- .../widgets/floating_buttons/code_buttons.ts | 2 +- .../copy_image_reference_button.ts | 2 +- .../floating_buttons/floating_buttons.ts | 2 +- .../floating_buttons/geo_map_button.ts | 2 +- .../widgets/floating_buttons/help_button.ts | 2 +- .../hide_floating_buttons_button.ts | 8 +++---- .../floating_buttons/png_export_button.ts | 2 +- .../floating_buttons/relation_map_buttons.ts | 2 +- .../floating_buttons/svg_export_button.ts | 2 +- .../floating_buttons/switch_layout_button.ts | 2 +- .../widgets/floating_buttons/zpetne_odkazy.ts | 2 +- src/public/app/widgets/geo_map.ts | 2 +- src/public/app/widgets/highlights_list.ts | 2 +- .../mobile_widgets/mobile_detail_menu.ts | 2 +- .../mobile_widgets/toggle_sidebar_button.ts | 2 +- src/public/app/widgets/note_detail.ts | 2 +- src/public/app/widgets/note_icon.ts | 2 +- src/public/app/widgets/note_language.ts | 2 +- src/public/app/widgets/note_list.ts | 2 +- src/public/app/widgets/note_map.ts | 2 +- src/public/app/widgets/note_title.ts | 2 +- src/public/app/widgets/note_tree.ts | 2 +- src/public/app/widgets/note_type.ts | 2 +- src/public/app/widgets/quick_search.ts | 2 +- .../ribbon_widgets/basic_properties.ts | 2 +- .../widgets/ribbon_widgets/book_properties.ts | 2 +- .../ribbon_widgets/classic_editor_toolbar.ts | 2 +- .../widgets/ribbon_widgets/edited_notes.ts | 2 +- .../widgets/ribbon_widgets/file_properties.ts | 2 +- .../ribbon_widgets/image_properties.ts | 2 +- .../inherited_attribute_list.ts | 2 +- .../ribbon_widgets/note_info_widget.ts | 2 +- .../app/widgets/ribbon_widgets/note_map.ts | 2 +- .../app/widgets/ribbon_widgets/note_paths.ts | 2 +- .../widgets/ribbon_widgets/note_properties.ts | 2 +- .../ribbon_widgets/owned_attribute_list.ts | 2 +- .../ribbon_widgets/promoted_attributes.ts | 2 +- .../widgets/ribbon_widgets/script_executor.ts | 2 +- .../ribbon_widgets/search_definition.ts | 2 +- .../widgets/ribbon_widgets/similar_notes.ts | 2 +- src/public/app/widgets/scroll_padding.ts | 2 +- .../app/widgets/search_options/ancestor.ts | 2 +- .../app/widgets/search_options/debug.ts | 2 +- .../app/widgets/search_options/fast_search.ts | 2 +- .../search_options/include_archived_notes.ts | 2 +- .../app/widgets/search_options/limit.ts | 2 +- .../app/widgets/search_options/order_by.ts | 2 +- .../widgets/search_options/search_script.ts | 2 +- .../widgets/search_options/search_string.ts | 2 +- src/public/app/widgets/search_result.ts | 2 +- src/public/app/widgets/shared_info.ts | 2 +- src/public/app/widgets/spacer.ts | 2 +- src/public/app/widgets/sql_result.ts | 2 +- src/public/app/widgets/sql_table_schemas.ts | 2 +- src/public/app/widgets/switch.ts | 2 +- src/public/app/widgets/sync_status.ts | 2 +- src/public/app/widgets/title_bar_buttons.ts | 8 +++---- src/public/app/widgets/toc.ts | 2 +- .../abstract_split_type_widget.ts | 2 +- .../widgets/type_widgets/attachment_detail.ts | 2 +- .../widgets/type_widgets/attachment_list.ts | 2 +- src/public/app/widgets/type_widgets/book.ts | 2 +- src/public/app/widgets/type_widgets/canvas.ts | 2 +- .../type_widgets/content/backend_log.ts | 2 +- .../widgets/type_widgets/content_widget.ts | 2 +- src/public/app/widgets/type_widgets/doc.ts | 2 +- .../app/widgets/type_widgets/editable_code.ts | 2 +- .../app/widgets/type_widgets/editable_text.ts | 2 +- src/public/app/widgets/type_widgets/empty.ts | 2 +- src/public/app/widgets/type_widgets/file.ts | 2 +- .../app/widgets/type_widgets/geo_map.ts | 2 +- src/public/app/widgets/type_widgets/image.ts | 2 +- .../app/widgets/type_widgets/mind_map.ts | 2 +- src/public/app/widgets/type_widgets/none.ts | 2 +- .../app/widgets/type_widgets/note_map.ts | 2 +- .../advanced/database_anonymization.ts | 2 +- .../advanced/database_integrity_check.ts | 2 +- .../type_widgets/options/advanced/sync.ts | 2 +- .../options/advanced/vacuum_database.ts | 2 +- .../options/appearance/code_block.ts | 2 +- .../appearance/electron_integration.ts | 2 +- .../type_widgets/options/appearance/fonts.ts | 2 +- .../options/appearance/max_content_width.ts | 2 +- .../type_widgets/options/appearance/ribbon.ts | 2 +- .../type_widgets/options/appearance/theme.ts | 2 +- .../widgets/type_widgets/options/backup.ts | 2 +- .../code_notes/code_auto_read_only_size.ts | 2 +- .../options/code_notes/code_editor.ts | 2 +- .../options/code_notes/code_mime_types.ts | 2 +- .../app/widgets/type_widgets/options/etapi.ts | 2 +- .../widgets/type_widgets/options/i18n/i18n.ts | 2 +- .../type_widgets/options/i18n/language.ts | 2 +- .../type_widgets/options/images/images.ts | 2 +- .../options/multi_factor_authentication.ts | 2 +- .../other/attachment_erasure_timeout.ts | 2 +- .../options/other/html_import_tags.ts | 2 +- .../options/other/network_connections.ts | 2 +- .../options/other/note_erasure_timeout.ts | 2 +- .../options/other/revision_snapshots_limit.ts | 2 +- .../other/revisions_snapshot_interval.ts | 2 +- .../options/other/search_engine.ts | 2 +- .../options/other/share_settings.ts | 2 +- .../type_widgets/options/other/tray.ts | 2 +- .../type_widgets/options/password/password.ts | 2 +- .../password/protected_session_timeout.ts | 2 +- .../widgets/type_widgets/options/shortcuts.ts | 2 +- .../app/widgets/type_widgets/options/sync.ts | 2 +- .../type_widgets/options/text_notes/editor.ts | 2 +- .../options/text_notes/heading_style.ts | 2 +- .../options/text_notes/highlights_list.ts | 2 +- .../options/text_notes/table_of_contents.ts | 2 +- .../text_notes/text_auto_read_only_size.ts | 2 +- .../widgets/type_widgets/protected_session.ts | 2 +- .../widgets/type_widgets/read_only_code.ts | 2 +- .../widgets/type_widgets/read_only_text.ts | 2 +- .../app/widgets/type_widgets/relation_map.ts | 2 +- src/public/app/widgets/type_widgets/render.ts | 2 +- .../app/widgets/type_widgets/web_view.ts | 2 +- .../app/widgets/view_widgets/calendar_view.ts | 2 +- .../widgets/view_widgets/list_or_grid_view.ts | 2 +- .../app/widgets/watched_file_update_status.ts | 2 +- 171 files changed, 253 insertions(+), 253 deletions(-) diff --git a/src/public/app/widgets/api_log.ts b/src/public/app/widgets/api_log.ts index d2b833a71..02f7563e6 100644 --- a/src/public/app/widgets/api_log.ts +++ b/src/public/app/widgets/api_log.ts @@ -3,7 +3,7 @@ import type FNote from "../entities/fnote.js"; import { t } from "../services/i18n.js"; import NoteContextAwareWidget from "./note_context_aware_widget.js"; -const TPL = ` +const TPL = /*html*/`
- +
diff --git a/src/public/app/widgets/toc.ts b/src/public/app/widgets/toc.ts index db15ba6a8..5c9a4b3e8 100644 --- a/src/public/app/widgets/toc.ts +++ b/src/public/app/widgets/toc.ts @@ -22,7 +22,7 @@ import appContext, { type EventData } from "../components/app_context.js"; import libraryLoader from "../services/library_loader.js"; import type FNote from "../entities/fnote.js"; -const TPL = `
+const TPL = /*html*/`