From 9df7b04d7dad0a75bca3679d3cbb0663b7899af6 Mon Sep 17 00:00:00 2001 From: Giovi Date: Tue, 23 Dec 2025 12:01:59 +0100 Subject: [PATCH 1/9] Translated using Weblate (Italian) Currently translated at 100.0% (1720 of 1720 strings) Translation: Trilium Notes/Client Translate-URL: https://hosted.weblate.org/projects/trilium/client/it/ --- .../src/translations/it/translation.json | 45 +++++++++++++++---- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/apps/client/src/translations/it/translation.json b/apps/client/src/translations/it/translation.json index 6e07dbd71..956b87cab 100644 --- a/apps/client/src/translations/it/translation.json +++ b/apps/client/src/translations/it/translation.json @@ -523,7 +523,8 @@ }, "toc": { "table_of_contents": "Sommario", - "options": "Opzioni" + "options": "Opzioni", + "no_headings": "Nessun titolo." }, "table_of_contents": { "title": "Sommario", @@ -556,7 +557,13 @@ }, "highlights_list_2": { "title": "Punti salienti", - "options": "Opzioni" + "options": "Opzioni", + "title_with_count_one": "{{count}} evidenza", + "title_with_count_many": "{{count}} evidenze", + "title_with_count_other": "{{count}} evidenze", + "modal_title": "Configura elenco dei punti salienti", + "menu_configure": "Configura elenco dei punti salienti...", + "no_highlights": "Nessun punto saliente trovato." }, "quick-search": { "placeholder": "Ricerca rapida", @@ -1388,7 +1395,8 @@ }, "inherited_attribute_list": { "title": "Attributi ereditati", - "no_inherited_attributes": "Nessun attributo ereditato." + "no_inherited_attributes": "Nessun attributo ereditato.", + "none": "nessuno" }, "note_info_widget": { "note_id": "ID nota", @@ -1400,7 +1408,8 @@ "calculate": "calcolare", "subtree_size": "(dimensione del sottoalbero: {{size}} in {{count}} note)", "title": "Nota informativa", - "show_similar_notes": "Mostra note simili" + "show_similar_notes": "Mostra note simili", + "mime": "Tipo MIME" }, "note_map": { "open_full": "Espandi completamente", @@ -2095,14 +2104,20 @@ "background_effects_title": "Gli effetti di sfondo sono ora stabili", "background_effects_message": "Sui dispositivi Windows, gli effetti di sfondo sono ora completamente stabili. Gli effetti di sfondo aggiungono un tocco di colore all'interfaccia utente sfocando lo sfondo retrostante. Questa tecnica è utilizzata anche in altre applicazioni come Esplora risorse di Windows.", "background_effects_button": "Abilita gli effetti di sfondo", - "dismiss": "Congedare" + "dismiss": "Congedare", + "new_layout_title": "Nuovo layout", + "new_layout_message": "Abbiamo introdotto un layout modernizzato per Trilium. La barra multifunzione è stata rimossa e integrata perfettamente nell'interfaccia principale, con una nuova barra di stato e sezioni espandibili (come gli attributi promossi) che assumono le funzioni chiave.\n\nIl nuovo layout è abilitato di default e può essere temporaneamente disabilitato tramite Opzioni → Aspetto.", + "new_layout_button": "Maggiori informazioni" }, "settings": { "related_settings": "Impostazioni correlate" }, "settings_appearance": { "related_code_blocks": "Schema di colori per i blocchi di codice nelle note di testo", - "related_code_notes": "Schema di colori per le note del codice" + "related_code_notes": "Schema di colori per le note del codice", + "ui": "Interfaccia utente", + "ui_old_layout": "Vecchio layout", + "ui_new_layout": "Nuovo layout" }, "units": { "percentage": "%" @@ -2159,13 +2174,18 @@ "execute_script": "Esegui script", "execute_script_description": "Questa nota è una nota di script. Clicca per eseguire lo script.", "execute_sql": "Esegui SQL", - "execute_sql_description": "Questa nota è una nota SQL. Clicca per eseguire la query SQL." + "execute_sql_description": "Questa nota è una nota SQL. Clicca per eseguire la query SQL.", + "shared_copy_to_clipboard": "Copia link negli appunti", + "shared_open_in_browser": "Apri il link nel browser", + "shared_unshare": "Rimuovi condivisione" }, "breadcrumb": { "workspace_badge": "Area di lavoro", "scroll_to_top_title": "Vai all'inizio della nota", "hoisted_badge": "Sollevato", - "hoisted_badge_title": "Abbassato" + "hoisted_badge_title": "Abbassato", + "create_new_note": "Crea nuova nota secondaria", + "empty_hide_archived_notes": "Nascondi note archiviate" }, "status_bar": { "language_title": "Cambia lingua dei contenuti", @@ -2191,5 +2211,14 @@ "note_paths_other": "{{count}} percorsi", "note_paths_title": "Nota percorsi", "code_note_switcher": "Cambia modalità lingua" + }, + "attributes_panel": { + "title": "Attributi delle note" + }, + "right_pane": { + "empty_message": "Nulla da segnalare per questa nota", + "empty_button": "Nascondi il pannello", + "toggle": "Attiva/disattiva pannello destro", + "custom_widget_go_to_source": "Vai al codice sorgente" } } From 26160b44ea875a415cc4227c341f5540e313ed4b Mon Sep 17 00:00:00 2001 From: Marcelo Nolasco Date: Tue, 23 Dec 2025 07:40:47 +0100 Subject: [PATCH 2/9] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1720 of 1720 strings) Translation: Trilium Notes/Client Translate-URL: https://hosted.weblate.org/projects/trilium/client/pt_BR/ --- .../src/translations/pt_br/translation.json | 267 +++++++++++++++--- 1 file changed, 220 insertions(+), 47 deletions(-) diff --git a/apps/client/src/translations/pt_br/translation.json b/apps/client/src/translations/pt_br/translation.json index 6a875cee9..c9524896c 100644 --- a/apps/client/src/translations/pt_br/translation.json +++ b/apps/client/src/translations/pt_br/translation.json @@ -46,7 +46,10 @@ "save": "Salvar", "edit_branch_prefix": "Editar Prefixo do Branch", "help_on_tree_prefix": "Ajuda sobre o prefixo da árvore de notas", - "branch_prefix_saved": "O prefixo de ramificação foi salvo." + "branch_prefix_saved": "O prefixo de ramificação foi salvo.", + "edit_branch_prefix_multiple": "Editar prefixo do ramo para {{count}} ramos", + "branch_prefix_saved_multiple": "O prefixo do ramo foi salvo para {{count}} ramos.", + "affected_branches": "Ramos afetados ({{count}}):" }, "bulk_actions": { "bulk_actions": "Ações em massa", @@ -254,7 +257,8 @@ "export_status": "Status da exportação", "export_in_progress": "Exportação em andamento: {{progressCount}}", "export_finished_successfully": "Exportação concluída com sucesso.", - "format_pdf": "PDF – para impressão ou compartilhamento." + "format_pdf": "PDF – para impressão ou compartilhamento.", + "share-format": "HTML para publicação na web — usa o mesmo tema das notas compartilhadas, mas pode ser publicado como um site estático." }, "help": { "noteNavigation": "Navegação de notas", @@ -308,7 +312,8 @@ "other": "Outros", "quickSearch": "focar no campo de pesquisa rápida", "inPageSearch": "pesquisa na página", - "title": "Folha de Dicas" + "title": "Folha de Dicas", + "editShortcuts": "Editar atalhos de teclado" }, "import": { "importIntoNote": "Importar para a nota", @@ -334,7 +339,8 @@ }, "import-status": "Status da importação", "in-progress": "Importação em andamento: {{progress}}", - "successful": "Importação concluída com sucesso." + "successful": "Importação concluída com sucesso.", + "importZipRecommendation": "Ao importar um arquivo ZIP, a hierarquia de notas refletirá a estrutura de subdiretórios dentro do arquivo." }, "include_note": { "dialog_title": "Incluir nota", @@ -349,7 +355,8 @@ "info": { "modalTitle": "Mensagem informativa", "closeButton": "Fechar", - "okButton": "OK" + "okButton": "OK", + "copy_to_clipboard": "Copiar para a área de transferência" }, "jump_to_note": { "search_placeholder": "Pesquise uma nota pelo nome ou digite > para comandos...", @@ -771,7 +778,7 @@ "import-into-note": "Importar na nota", "apply-bulk-actions": "Aplicar ações em massa", "converted-to-attachments": "{{count}} notas foram convertidas em anexos.", - "convert-to-attachment-confirm": "Tem certeza de que deseja converter as notas selecionadas em anexos de suas notas-pai?", + "convert-to-attachment-confirm": "Tem certeza de que deseja converter as notas selecionadas em anexos de suas notas pai? Esta operação se aplica apenas a notas de imagem; outras notas serão ignoradas.", "open-in-popup": "Edição rápida", "archive": "Ficheiro", "unarchive": "Desarquivar" @@ -789,7 +796,7 @@ "show_attachments_description": "Exibir anexos da nota", "search_notes_title": "Buscar Notas", "search_notes_description": "Abrir busca avançada", - "configure_launch_bar_description": "Abrir a configuração da barra de lançamento, para adicionar ou remover itens." + "configure_launch_bar_description": "Abrir a configuração da barra de atalho, para adicionar ou remover itens." }, "delete_note": { "delete_note": "Excluir nota", @@ -882,7 +889,7 @@ "zoom_out": "Reduzir", "reset_zoom_level": "Redefinir Zoom", "zoom_in": "Aumentar", - "configure_launchbar": "Configurar Barra de Lançamento", + "configure_launchbar": "Configurar Barra de Atalhos", "show_shared_notes_subtree": "Exibir Subárvore de Notas Compartilhadas", "advanced": "Avançado", "open_dev_tools": "Abrir Ferramentas de Desenvolvedor", @@ -897,7 +904,9 @@ "logout": "Sair", "show-cheatsheet": "Exibir Cheatsheet", "toggle-zen-mode": "Modo Zen", - "reload_hint": "Recarregar pode ajudar com alguns problemas visuais sem reiniciar toda a aplicação." + "reload_hint": "Recarregar pode ajudar com alguns problemas visuais sem reiniciar toda a aplicação.", + "new-version-available": "Nova atualização disponível", + "download-update": "Obter a versão {{latestVersion}}" }, "zen_mode": { "button_exit": "Sair do Modo Zen" @@ -935,7 +944,14 @@ "convert_into_attachment_successful": "A nota '{{title}}' foi convertida para anexo.", "print_pdf": "Exportar como PDF…", "open_note_externally_title": "O arquivo será aberto em uma aplicação externa e monitorado por alterações. Você então poderá enviar a versão modificada de volta para o Trilium.", - "convert_into_attachment_prompt": "Você tem certeza que quer converter a nota '{{title}}' em um anexo da nota pai?" + "convert_into_attachment_prompt": "Você tem certeza que quer converter a nota '{{title}}' em um anexo da nota pai?", + "open_note_on_server": "Abrir nota no servidor", + "view_revisions": "Revisões da nota…", + "advanced": "Avançado", + "export_as_image": "Exportar como imagem", + "export_as_image_png": "PNG (raster)", + "export_as_image_svg": "SVG (vetorial)", + "note_map": "Mapa de notas" }, "protected_session_status": { "inactive": "Clique para entrar na sessão protegida", @@ -979,7 +995,8 @@ "insert_child_note": "Inserir nota filha", "delete_this_note": "Excluir essa nota", "error_unrecognized_command": "Comando não reconhecido {{command}}", - "error_cannot_get_branch_id": "Não foi possível obter o branchId para o notePath '{{notePath}} '" + "error_cannot_get_branch_id": "Não foi possível obter o branchId para o notePath '{{notePath}} '", + "note_revisions": "Revisões de notas" }, "note_icon": { "change_note_icon": "Alterar ícone da nota", @@ -1007,7 +1024,12 @@ "table": "Tabela", "geo-map": "Mapa geográfico", "board": "Quadro", - "include_archived_notes": "Exibir notas arquivadas" + "include_archived_notes": "Exibir notas arquivadas", + "expand_tooltip": "Expande os filhos diretos desta coleção (um nível). Para mais opções, pressione a seta à direita.", + "expand_first_level": "Expandir filhos diretos", + "expand_nth_level": "Expandir {{depth}} níveis", + "expand_all_levels": "Expandir todos os níveis", + "presentation": "Apresentação" }, "edited_notes": { "no_edited_notes_found": "Ainda não há nenhuma nota editada neste dia…", @@ -1020,7 +1042,7 @@ "file_type": "Tipo do arquivo", "file_size": "Tamanho do arquivo", "download": "Baixar", - "open": "Abrir", + "open": "Abrir externamente", "upload_new_revision": "Enviar nova revisão", "upload_success": "Uma nova revisão de arquivo foi enviada.", "upload_failed": "O envio de uma nova revisão de arquivo falhou.", @@ -1040,7 +1062,8 @@ }, "inherited_attribute_list": { "title": "Atributos Herdados", - "no_inherited_attributes": "Nenhum atributo herdado." + "no_inherited_attributes": "Nenhum atributo herdado.", + "none": "nenhum" }, "note_info_widget": { "note_id": "ID da Nota", @@ -1051,7 +1074,9 @@ "calculate": "calcular", "title": "Informações da nota", "subtree_size": "(tamanho da subárvore: {{size}} em {{count}} notas)", - "note_size_info": "O tamanho da nota fornece uma estimativa aproximada dos requisitos de armazenamento para esta nota. Leva em conta o conteúdo e o conteúdo de suas revisões de nota." + "note_size_info": "O tamanho da nota fornece uma estimativa aproximada dos requisitos de armazenamento para esta nota. Leva em conta o conteúdo e o conteúdo de suas revisões de nota.", + "mime": "Tipo MIME", + "show_similar_notes": "Mostrar notas semelhantes" }, "note_map": { "open_full": "Expandir completamente", @@ -1111,7 +1136,8 @@ "search_note_saved": "Nota de pesquisa foi salva em {{- notePathTitle}}", "fast_search_description": "A opção de pesquisa rápida desabilita a pesquisa de texto completo do conteúdo de nota, o que pode acelerar a pesquisa em grandes bancos de dados.", "include_archived_notes_description": "As notas arquivadas são por padrão excluídas dos resultados da pesquisa, com esta opção elas serão incluídas.", - "debug_description": "A depuração irá imprimir informações adicionais no console para ajudar na depuração de consultas complexas" + "debug_description": "A depuração irá imprimir informações adicionais no console para ajudar na depuração de consultas complexas", + "view_options": "Ver opções:" }, "similar_notes": { "title": "Notas Similares", @@ -1192,7 +1218,13 @@ }, "editable_text": { "placeholder": "Digite o conteúdo da sua nota aqui…", - "auto-detect-language": "Detectado automaticamente" + "auto-detect-language": "Detectado automaticamente", + "editor_crashed_title": "O editor de texto travou", + "editor_crashed_content": "Seu conteúdo foi recuperado com sucesso, mas algumas das suas alterações mais recentes podem não ter sido salvas.", + "editor_crashed_details_button": "Veja mais detalhes...", + "editor_crashed_details_intro": "Se você encontrar este erro várias vezes, considere relatá-lo no GitHub colando as informações abaixo.", + "editor_crashed_details_title": "Informação técnica", + "keeps-crashing": "O componente de edição continua travando. Tente reiniciar o Trilium. Se o problema persistir, considere criar um relatório de bug." }, "empty": { "search_placeholder": "buscar uma nota pelo nome", @@ -1299,7 +1331,8 @@ "title": "Largura do Conteúdo", "max_width_label": "Largura máxima do conteúdo", "max_width_unit": "pixels", - "default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide." + "default_description": "Por padrão, o Trilium limita a largura máxima do conteúdo para melhorar a legibilidade em janelas maximizadas em telas wide.", + "centerContent": "Manter conteúdo centralizado" }, "native_title_bar": { "title": "Barra de Título Nativa (requer recarregar o app)", @@ -1319,11 +1352,11 @@ "layout": "Layout", "layout-vertical-title": "Vertical", "layout-horizontal-title": "Horizontal", - "layout-vertical-description": "barra de lançamento está a esquerda (padrão)", - "layout-horizontal-description": "barra de lançamento está abaixo da barra de abas, a barra de abas agora tem a largura total." + "layout-vertical-description": "barra de atalho está a esquerda (padrão)", + "layout-horizontal-description": "barra de atalho está abaixo da barra de abas, a barra de abas agora tem a largura total." }, "note_launcher": { - "this_launcher_doesnt_define_target_note": "Este lançador não define uma nota destino." + "this_launcher_doesnt_define_target_note": "Este atalho não define uma nota destino." }, "copy_image_reference_button": { "button_title": "Copiar referência da imagem para a área de transferência, pode ser colado em uma nota de texto." @@ -1378,7 +1411,10 @@ "title": "Editor" }, "code_mime_types": { - "title": "Tipos MIME disponíveis no dropdown" + "title": "Tipos MIME disponíveis no dropdown", + "tooltip_syntax_highlighting": "Realce de sintaxe", + "tooltip_code_block_syntax": "Blocos de código em notas de texto", + "tooltip_code_note_syntax": "Notas de código" }, "vim_key_bindings": { "use_vim_keybindings_in_code_notes": "Atribuições de teclas do Vim", @@ -1498,7 +1534,13 @@ "min-days-in-first-week": "Mínimo de dias da primeira semana", "first-week-info": "Primeira semana que contenha a primeira Quinta-feira do ano é baseado na ISO 8601.", "first-week-warning": "Alterar as opções de primeira semana pode causar duplicidade nas Notas Semanais existentes e estas Notas não serão atualizadas de acordo.", - "formatting-locale": "Formato de data e número" + "formatting-locale": "Formato de data e número", + "tuesday": "Terça-feira", + "wednesday": "Quarta-feira", + "thursday": "Quinta-feira", + "friday": "Sexta-feira", + "saturday": "Sábado", + "formatting-locale-auto": "Com base no idioma do aplicativo" }, "backup": { "automatic_backup": "Backup automático", @@ -1526,7 +1568,7 @@ "mind-map": "Mapa Mental", "file": "Arquivo", "image": "Imagem", - "launcher": "Lançador", + "launcher": "Atalho", "doc": "Documento", "widget": "Widget", "confirm-change": "Não é recomentado alterar o tipo da nota quando o conteúdo da nota não está vazio. Quer continuar assim mesmo?", @@ -1569,7 +1611,13 @@ }, "highlights_list_2": { "title": "Lista de Destaques", - "options": "Opções" + "options": "Opções", + "title_with_count_one": "{{count}} destaque", + "title_with_count_many": "{{count}} destaques", + "title_with_count_other": "{{count}} destaques", + "modal_title": "Configurar lista de destaques", + "menu_configure": "Configurar lista de destaques…", + "no_highlights": "Nenhum destaque encontrado." }, "quick-search": { "placeholder": "Busca rápida", @@ -1592,23 +1640,33 @@ "refresh-saved-search-results": "Atualizar resultados de pesquisa salvos", "create-child-note": "Criar nota filha", "unhoist": "Desafixar", - "toggle-sidebar": "Alternar barra lateral" + "toggle-sidebar": "Alternar barra lateral", + "dropping-not-allowed": "Não é permitido soltar notas neste local." }, "title_bar_buttons": { "window-on-top": "Manter Janela no Topo" }, "note_detail": { - "could_not_find_typewidget": "Não foi possível encontrar typeWidget para o tipo '{{type}}'" + "could_not_find_typewidget": "Não foi possível encontrar typeWidget para o tipo '{{type}}'", + "printing": "Impressão em andamento…", + "printing_pdf": "Exportação para PDF em andamento…" }, "note_title": { - "placeholder": "digite o título da nota aqui..." + "placeholder": "digite o título da nota aqui...", + "created_on": "Criado em ", + "last_modified": "Modificado em ", + "note_type_switcher_label": "Alternar de {{type}} para:", + "note_type_switcher_others": "Outro tipo de nota", + "note_type_switcher_templates": "Modelo", + "note_type_switcher_collection": "Coleção", + "edited_notes": "Notas editadas" }, "search_result": { "no_notes_found": "Nenhuma nota encontrada para os parâmetros de busca digitados.", "search_not_executed": "A busca ainda não foi executada. Clique no botão \"Buscar\" acima para ver os resultados." }, "spacer": { - "configure_launchbar": "Configurar Barra de Lançamento" + "configure_launchbar": "Configurar Barra de Atalhos" }, "sql_result": { "no_rows": "Nenhum linha foi retornada para esta consulta" @@ -1630,7 +1688,8 @@ }, "toc": { "table_of_contents": "Tabela de Conteúdos", - "options": "Opções" + "options": "Opções", + "no_headings": "Nenhum título." }, "watched_file_update_status": { "file_last_modified": "O arquivo foi modificado pela última vez em .", @@ -1673,22 +1732,24 @@ "ws": { "sync-check-failed": "A verificação de sincronização falhou!", "consistency-checks-failed": "A verificação de consistência falhou! Veja os logs para detalhes.", - "encountered-error": "Encontrado o erro \"{{message}}\", verifique o console." + "encountered-error": "Encontrado o erro \"{{message}}\", verifique o console.", + "lost-websocket-connection-title": "Conexão com o servidor perdida", + "lost-websocket-connection-message": "Verifique a configuração do seu proxy reverso (por exemplo, nginx ou Apache) para garantir que as conexões WebSocket estejam devidamente permitidas e não estejam sendo bloqueadas." }, "hoisted_note": { "confirm_unhoisting": "A nota solicitada '{{requestedNote}}' está fora da árvore da nota fixada '{{hoistedNote}}' e você precisa desafixar para acessar a nota. Quer prosseguir e desafixar?" }, "launcher_context_menu": { - "reset_launcher_confirm": "Você deseja realmente reiniciar \"{{title}}\"? Todos os dados / configurações desta nota (e suas filhas) serão perdidos o lançador irá retornar para sua localização original.", - "add-note-launcher": "Adicionar um lançador de nota", - "add-script-launcher": "Adicionar um lançador de script", + "reset_launcher_confirm": "Você deseja realmente reiniciar \"{{title}}\"? Todos os dados / configurações desta nota (e suas filhas) serão perdidos o atalho irá retornar para sua localização original.", + "add-note-launcher": "Adicionar um atalho de nota", + "add-script-launcher": "Adicionar um atalho de script", "add-custom-widget": "Adicionar um componente personalizado", "add-spacer": "Adicionar um espaçador", "delete": "Excluir ", "reset": "Reiniciar", - "move-to-visible-launchers": "Mover para lançadores visíveis", - "move-to-available-launchers": "Mover para lançadores disponíveis", - "duplicate-launcher": "Duplicar o lançador " + "move-to-visible-launchers": "Mover para atalhos visíveis", + "move-to-available-launchers": "Mover para atalhos disponíveis", + "duplicate-launcher": "Duplicar o atalho " }, "highlighting": { "title": "Blocos de Código", @@ -1722,7 +1783,8 @@ "copy-link": "Copiar link", "paste": "Colar", "paste-as-plain-text": "Colar como texto sem formatação", - "search_online": "Buscar por \"{{term}}\" usando {{searchEngine}}" + "search_online": "Buscar por \"{{term}}\" usando {{searchEngine}}", + "search_in_trilium": "Pesquisar por \"{{term}}\" no Trilium" }, "image_context_menu": { "copy_reference_to_clipboard": "Copiar referência para a área de transferência", @@ -1732,7 +1794,8 @@ "open_note_in_new_tab": "Abrir nota em nova aba", "open_note_in_new_split": "Abrir nota em nova divisão", "open_note_in_new_window": "Abrir nota em nova janela", - "open_note_in_popup": "Edição rápida" + "open_note_in_popup": "Edição rápida", + "open_note_in_other_split": "Abrir nota no outro painel dividido" }, "electron_integration": { "desktop-application": "Aplicação Desktop", @@ -1800,8 +1863,9 @@ "unknown_widget": "Componente desconhecido para \"{{id}}\"." }, "note_language": { - "not_set": "Não atribuído", - "configure-languages": "Configurar idiomas..." + "not_set": "Nenhum idioma definido", + "configure-languages": "Configurar idiomas...", + "help-on-languages": "Ajuda sobre idiomas de conteúdo…" }, "content_language": { "title": "Idiomas do conteúdo", @@ -1819,7 +1883,8 @@ "button_title": "Exportar diagrama como PNG" }, "svg": { - "export_to_png": "O diagrama não pôde ser exportado como PNG." + "export_to_png": "O diagrama não pôde ser exportado como PNG.", + "export_to_svg": "O diagrama não pôde ser exportado para SVG." }, "code_theme": { "title": "Aparência", @@ -1838,7 +1903,11 @@ "editorfeatures": { "title": "Recursos", "emoji_completion_enabled": "Habilitar auto-completar de Emoji", - "note_completion_enabled": "Habilitar auto-completar de notas" + "note_completion_enabled": "Habilitar auto-completar de notas", + "emoji_completion_description": "Se ativado, emojis podem ser inseridos facilmente no texto digitando`:`, seguido do nome do emoji.", + "note_completion_description": "Se ativado, links para notas podem ser criados digitando `@` seguido do título de uma nota.", + "slash_commands_enabled": "Ativar comandos de barra", + "slash_commands_description": "Se ativado, comandos de edição como inserir quebras de linha ou títulos podem ser acionados digitando`/`." }, "table_view": { "new-row": "Nova linha", @@ -1863,7 +1932,7 @@ "book_properties_config": { "hide-weekends": "Ocultar fins de semana", "display-week-numbers": "Exibir números de semana", - "map-style": "Estilo do mapa:", + "map-style": "Estilo do mapa", "max-nesting-depth": "Profundidade máxima de aninhamento:", "vector_light": "Vetor (Claro)", "vector_dark": "Vetor (Escuro)", @@ -1888,7 +1957,8 @@ "new-item-placeholder": "Escreva o título da nota...", "add-column-placeholder": "Escreva o nome da coluna...", "edit-note-title": "Clique para editar o título da nota", - "edit-column-title": "Clique para editar o título da coluna" + "edit-column-title": "Clique para editar o título da coluna", + "column-already-exists": "Esta coluna já existe no quadro." }, "call_to_action": { "next_theme_title": "Testar no novo tema do Trilium", @@ -1897,14 +1967,20 @@ "background_effects_title": "Efeitos de fundo estão estáveis agora", "background_effects_message": "Em dispositivos Windows, efeitos de fundo estão estáveis agora. Os efeitos de fundo adicionam um toque de cor à interface do usuário borrando o plano de fundo atrás dela. Esta técnica também é usada em outras aplicações como o Windows Explorer.", "background_effects_button": "Habilitar os efeitos de fundo", - "dismiss": "Dispensar" + "dismiss": "Dispensar", + "new_layout_title": "Novo layout", + "new_layout_message": "Introduzimos um layout modernizado para o Trilium. A faixa de opções foi removida e integrada de forma contínua à interface principal, com uma nova barra de status e seções expansíveis (como atributos promovidos) assumindo funções importantes.\n\nO novo layout vem ativado por padrão e pode ser desativado temporariamente em Opções → Aparência.", + "new_layout_button": "Mais informações" }, "settings": { "related_settings": "Configurações relacionadas" }, "settings_appearance": { "related_code_blocks": "Esquema de cores para blocos de código em notas de texto", - "related_code_notes": "Esquema de cores para notas de código" + "related_code_notes": "Esquema de cores para notas de código", + "ui": "Interface do usuário", + "ui_old_layout": "Layout antigo", + "ui_new_layout": "Novo Layout" }, "units": { "percentage": "%" @@ -2047,5 +2123,102 @@ }, "collections": { "rendering_error": "Não foi possível exibir o conteúdo devido a um erro." + }, + "experimental_features": { + "title": "Opções experimentais", + "disclaimer": "Essas opções são experimentais e podem causar instabilidade. Use com cautela.", + "new_layout_name": "Novo Layout", + "new_layout_description": "Experimente o novo layout para um visual mais moderno e melhor usabilidade. Pode sofrer alterações significativas nas próximas versões." + }, + "read-only-info": { + "read-only-note": "Você está visualizando uma nota somente leitura.", + "auto-read-only-note": "Esta nota é exibida em modo somente leitura para carregamento mais rápido.", + "edit-note": "Editar nota" + }, + "presentation_view": { + "edit-slide": "Editar este slide", + "start-presentation": "Iniciar apresentação", + "slide-overview": "Alternar a visualização geral dos slides" + }, + "calendar_view": { + "delete_note": "Excluir nota…" + }, + "note-color": { + "clear-color": "Limpar cor da nota", + "set-color": "Definir cor da nota", + "set-custom-color": "Definir cor personalizada da nota" + }, + "popup-editor": { + "maximize": "Alternar para editor completo" + }, + "server": { + "unknown_http_error_title": "Erro de comunicação com o servidor", + "unknown_http_error_content": "Código de status: {{statusCode}}\nURL: {{method}} {{url}}\nMensagem: {{message}}", + "traefik_blocks_requests": "Se você estiver usando o proxy reverso Traefik, ele introduziu uma alteração que afeta a comunicação com o servidor." + }, + "tab_history_navigation_buttons": { + "go-back": "Voltar para a nota anterior", + "go-forward": "Avançar para a próxima nota" + }, + "breadcrumb": { + "hoisted_badge": "Destacado", + "hoisted_badge_title": "Remover destaque", + "workspace_badge": "Espaço de trabalho", + "scroll_to_top_title": "Ir para o início da nota", + "create_new_note": "Criar nova nota filha", + "empty_hide_archived_notes": "Ocultar notas arquivadas" + }, + "breadcrumb_badges": { + "read_only_explicit": "Somente leitura", + "read_only_explicit_description": "Esta nota foi definida manualmente como somente leitura.\nClique para editá-la temporariamente.", + "read_only_auto": "Auto Somente leitura", + "read_only_auto_description": "Esta nota foi definida automaticamente como somente leitura por motivos de desempenho. Esse limite automático pode ser ajustado nas configurações.\n\nClique para editá-la temporariamente.", + "read_only_temporarily_disabled": "Editável temporariamente", + "read_only_temporarily_disabled_description": "Esta nota está atualmente editável, mas normalmente é somente leitura. A nota voltará a ser somente leitura assim que você navegar para outra nota.\n\nClique para reativar o modo somente leitura.", + "shared_publicly": "Compartilhado publicamente", + "shared_locally": "Compartilhado localmente", + "shared_copy_to_clipboard": "Copiar link para a área de transferência", + "shared_open_in_browser": "Abrir link no navegador", + "shared_unshare": "Remover compartilhamento", + "clipped_note": "Recorte da web", + "clipped_note_description": "Esta nota foi originalmente obtida de {{url}}.\n\nClique para navegar até a página de origem.", + "execute_script": "Executar script", + "execute_script_description": "Esta nota é uma nota de script. Clique para executar o script.", + "execute_sql": "Executar SQL", + "execute_sql_description": "Esta nota é uma nota SQL. Clique para executar a consulta SQL." + }, + "status_bar": { + "language_title": "Alterar idioma do conteúdo", + "note_info_title": "Ver informações da nota (por exemplo, datas, tamanho da nota)", + "backlinks_one": "{{count}} referência inversa", + "backlinks_many": "{{count}} referências inversas", + "backlinks_other": "{{count}} referências inversas", + "backlinks_title_one": "Ver referência inversa", + "backlinks_title_many": "Ver referências inversas", + "backlinks_title_other": "Ver referências inversas", + "attachments_one": "{{count}} anexo", + "attachments_many": "{{count}} anexos", + "attachments_other": "{{count}} anexos", + "attachments_title_one": "Visualizar anexo em uma nova aba", + "attachments_title_many": "Visualizar anexos em uma nova aba", + "attachments_title_other": "Visualizar anexos em uma nova aba", + "attributes_one": "{{count}} atributo", + "attributes_many": "{{count}} atributos", + "attributes_other": "{{count}} atributos", + "attributes_title": "Atributos próprios e atributos herdados", + "note_paths_one": "{{count}} caminho", + "note_paths_many": "{{count}} caminhos", + "note_paths_other": "{{count}} caminhos", + "note_paths_title": "Caminhos da nota", + "code_note_switcher": "Alterar modo de idioma" + }, + "attributes_panel": { + "title": "Atributos da nota" + }, + "right_pane": { + "empty_message": "Nada para exibir nesta nota", + "empty_button": "Ocultar o painel", + "toggle": "Alternar painel direito", + "custom_widget_go_to_source": "Ir para o código-fonte" } } From d0a83f7c059b81c0da00bfcf5692bbcbae35697c Mon Sep 17 00:00:00 2001 From: Kuzma Simonov Date: Tue, 23 Dec 2025 07:06:20 +0100 Subject: [PATCH 3/9] Translated using Weblate (Russian) Currently translated at 100.0% (1720 of 1720 strings) Translation: Trilium Notes/Client Translate-URL: https://hosted.weblate.org/projects/trilium/client/ru/ --- apps/client/src/translations/ru/translation.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/client/src/translations/ru/translation.json b/apps/client/src/translations/ru/translation.json index ddbf23a8f..ac36cfe04 100644 --- a/apps/client/src/translations/ru/translation.json +++ b/apps/client/src/translations/ru/translation.json @@ -1686,7 +1686,8 @@ }, "inherited_attribute_list": { "title": "Унаследованные атрибуты", - "no_inherited_attributes": "Нет унаследованных атрибутов." + "no_inherited_attributes": "Нет унаследованных атрибутов.", + "none": "нет" }, "note_map": { "title": "Карта заметок", @@ -2216,5 +2217,8 @@ "toggle": "Переключить панель справа", "empty_button": "Скрыть панель", "empty_message": "Нечего отобразить для текущей заметки" + }, + "attributes_panel": { + "title": "Атрибуты заметки" } } From cd47e79a1b23b40d684d3e46fbc764d72e4b768e Mon Sep 17 00:00:00 2001 From: green Date: Tue, 23 Dec 2025 04:24:57 +0100 Subject: [PATCH 4/9] Translated using Weblate (Japanese) Currently translated at 100.0% (1720 of 1720 strings) Translation: Trilium Notes/Client Translate-URL: https://hosted.weblate.org/projects/trilium/client/ja/ --- apps/client/src/translations/ja/translation.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/client/src/translations/ja/translation.json b/apps/client/src/translations/ja/translation.json index b4478749c..3e553ac1c 100644 --- a/apps/client/src/translations/ja/translation.json +++ b/apps/client/src/translations/ja/translation.json @@ -1621,7 +1621,8 @@ }, "inherited_attribute_list": { "title": "継承属性", - "no_inherited_attributes": "継承属性はありません。" + "no_inherited_attributes": "継承属性はありません。", + "none": "なし" }, "note_map": { "open_full": "拡大表示", @@ -2200,5 +2201,8 @@ "empty_button": "パネルを非表示", "toggle": "右パネルを切り替え", "custom_widget_go_to_source": "ソースコードへ移動" + }, + "attributes_panel": { + "title": "ノート属性" } } From 0d0a1866e45bdf370bd1adfd8e23a8245610eb72 Mon Sep 17 00:00:00 2001 From: noobhjy Date: Tue, 23 Dec 2025 06:42:42 +0100 Subject: [PATCH 5/9] Translated using Weblate (Chinese (Simplified Han script)) Currently translated at 100.0% (1720 of 1720 strings) Translation: Trilium Notes/Client Translate-URL: https://hosted.weblate.org/projects/trilium/client/zh_Hans/ --- apps/client/src/translations/cn/translation.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/client/src/translations/cn/translation.json b/apps/client/src/translations/cn/translation.json index 4ff56779b..0d335fdcd 100644 --- a/apps/client/src/translations/cn/translation.json +++ b/apps/client/src/translations/cn/translation.json @@ -817,7 +817,8 @@ }, "inherited_attribute_list": { "title": "继承的属性", - "no_inherited_attributes": "没有继承的属性。" + "no_inherited_attributes": "没有继承的属性。", + "none": "无" }, "note_info_widget": { "note_id": "笔记 ID", @@ -2200,5 +2201,8 @@ "toggle": "切换右侧面板", "custom_widget_go_to_source": "跳转到源码", "empty_message": "这篇笔记没有展示内容" + }, + "attributes_panel": { + "title": "笔记属性" } } From f4a6edbc9fdabc59403d4502cacf9dfe241fd092 Mon Sep 17 00:00:00 2001 From: Marcelo Nolasco Date: Tue, 23 Dec 2025 07:08:26 +0100 Subject: [PATCH 6/9] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (389 of 389 strings) Translation: Trilium Notes/Server Translate-URL: https://hosted.weblate.org/projects/trilium/server/pt_BR/ --- .../src/assets/translations/pt_br/server.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/server/src/assets/translations/pt_br/server.json b/apps/server/src/assets/translations/pt_br/server.json index d1e5f5f37..21536c863 100644 --- a/apps/server/src/assets/translations/pt_br/server.json +++ b/apps/server/src/assets/translations/pt_br/server.json @@ -355,7 +355,9 @@ "script-launcher-title": "Atalho de Script", "launch-bar-title": "Barra de Atalhos", "available-launchers-title": "Atalhos disponíveis", - "visible-launchers-title": "Atalhos Visíveis" + "visible-launchers-title": "Atalhos Visíveis", + "command-palette": "Abrir a Paleta de Comandos", + "zen-mode": "Modo Zen" }, "notes": { "new-note": "Nova nota", @@ -373,7 +375,8 @@ "export_filter": "Documento PDF (*.pdf)", "unable-to-export-message": "A nota atual não pôde ser exportada como PDF.", "unable-to-export-title": "Não foi possível exportar como PDF", - "unable-to-save-message": "O arquivo selecionado não pôde ser salvo. Tente novamente ou selecione outro destino." + "unable-to-save-message": "O arquivo selecionado não pôde ser salvo. Tente novamente ou selecione outro destino.", + "unable-to-print": "Não foi possível imprimir a nota" }, "tray": { "tooltip": "Trilium Notes", @@ -416,14 +419,19 @@ "end-time": "Hora de término", "geolocation": "Geolocalização", "built-in-templates": "Modelos integrados", - "board": "Quadro", + "board": "Quadro Kanban", "status": "Status", "board_note_first": "Primeira nota", "board_note_second": "Segunda nota", "board_note_third": "Terceira nota", "board_status_todo": "A fazer", "board_status_progress": "Em andamento", - "board_status_done": "Concluído" + "board_status_done": "Concluído", + "presentation": "Apresentação", + "presentation_slide": "Slide de apresentação", + "presentation_slide_first": "Primeiro slide", + "presentation_slide_second": "Segundo slide", + "background": "Plano de fundo" }, "sql_init": { "db_not_initialized_desktop": "DB não inicializada, por favor siga as instruções na tela.", From ce84e7a861df20ee712c6b7fba8df26c1bfeebb2 Mon Sep 17 00:00:00 2001 From: contributor Date: Tue, 23 Dec 2025 20:18:58 +0200 Subject: [PATCH 7/9] chore: prevent error in .envrc for non nix systems --- .envrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 3550a30f2..3c9833453 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,3 @@ -use flake +if command -v nix > /dev/null 2>&1; then + use flake +fi From d8ce0e5f16c8a671543331b98b840f7c7ed93294 Mon Sep 17 00:00:00 2001 From: contributor Date: Tue, 23 Dec 2025 20:51:54 +0200 Subject: [PATCH 8/9] chore: use direnv built-in `has` command https://direnv.net/man/direnv-stdlib.1.html#stdlib --- .envrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.envrc b/.envrc index 3c9833453..6deccfe3a 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,3 @@ -if command -v nix > /dev/null 2>&1; then +if has nix; then use flake fi From 86307b482f6296ceee60aa200ed96bfa3811430f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 24 Dec 2025 00:01:13 +0200 Subject: [PATCH 9/9] docs(user): change URL for demo notes --- .../Advanced Usage/Database/Demo Notes.html | 18 +- .../User Guide/Note Types/Render Note.html | 43 +-- .../Common concepts/Script bundles.html | 26 +- .../Frontend Basics/Custom Widgets.html | 250 +++++++------- .../Frontend Basics/Custom Widgets/CSS.html | 22 +- .../Note context aware widget.html | 13 +- .../Custom Widgets/Right pane widget.html | 24 +- .../Custom Widgets/Widget Basics.html | 26 +- .../Launch Bar Widgets/Note Title Widget.html | 2 +- .../Scripting/Frontend Basics/Preact.html | 44 ++- .../Preact/Built-in components.html | 24 +- .../Scripting/Frontend Basics/Preact/CSS.html | 13 +- .../Preact/Component libraries.html | 29 +- .../Frontend Basics/Preact/Hooks.html | 32 +- .../Developer Guide/Documentation.md | 2 +- docs/User Guide/!!!meta.json | 312 +++++++++--------- .../Advanced Usage/Database/Demo Notes.md | 2 +- .../User Guide/Note Types/Render Note.md | 2 +- .../Frontend Basics/Custom Widgets.md | 26 +- .../Launch Bar Widgets/Note Title Widget.md | 2 +- .../Scripting/Frontend Basics/Preact.md | 8 +- .../Preact/Built-in components.md | 4 +- .../Scripting/Frontend Basics/Preact/CSS.md | 2 +- 23 files changed, 441 insertions(+), 485 deletions(-) diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html index 851f267f7..d3f5a7570 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Demo Notes.html @@ -1,15 +1,15 @@

When you run Trilium for the first time, it will generate a new database containing demo notes. These notes showcase its many features, such as:

Restoring Demo Notes

@@ -21,10 +21,10 @@

You can easily restore the demo notes by using Trilium's built-in import feature by importing them:

    -
  • Download this .zip archive with +
  • Download the .zip archive with the latest version of the demo notes
  • -
  • Right click on any note in your tree under which you would like the demo +
  • Right click on any note in your tree under which you would like the demo notes to be imported
  • -
  • Click "Import into note"
  • -
  • Select the .zip archive to import it
  • +
  • Click "Import into note"
  • +
  • Select the .zip archive to import it
\ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html index c65b789d0..f0f720b87 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Render Note.html @@ -7,13 +7,10 @@ via an attribute.

Creating a render note

    -
  1. Create a Code note - with the HTML language, with what needs to be displayed (for example - <p>Hello world.</p>).
  2. -
  3. Create a Render Note.
  4. -
  5. Assign the renderNote relation to +
  6. Create a Code note + with the HTML language, with what needs to be displayed (for example <p>Hello world.</p>).
  7. +
  8. Create a Render Note.
  9. +
  10. Assign the renderNote relation to point at the previously created code note.

Legacy scripting using jQuery

@@ -29,7 +26,7 @@ The current date & time is <span class="date"></span>
const $dateEl = api.$container.find(".date");
 $dateEl.text(new Date());
-

Now create a render note at any place and set its ~renderNote relation +

Now create a render note at any place and set its ~renderNote relation to point to the HTML note. When the render note is accessed it will display:

Current date & time @@ -42,33 +39,37 @@ $dateEl.text(new Date()); need to provide a HTML anymore.

Here are the steps to creating a simple render note:

    -
  1. Create a note of type Render Note.
  2. -
  3. -

    Create a child Code note +

  4. +

    Create a note of type Render Note.

    +
  5. +
  6. +

    Create a child Code note with JSX as the language. -
    As an example, use the following content:

    export default function() {
    +      
    As an example, use the following content:

    export default function() {
         return (
             <>
                 <p>Hello world.</p>
             </>
         );
     }
    -
  7. -
  8. In the parent render note, define a ~renderNote relation - pointing to the newly created child.
  9. -
  10. Refresh the render note and it should display a “Hello world” message.
  11. + +
  12. +

    In the parent render note, define a ~renderNote relation pointing + to the newly created child.

    +
  13. +
  14. +

    Refresh the render note and it should display a “Hello world” message.

    +

Refreshing the note

It's possible to refresh the note via:

Examples

\ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html index 2abeaa288..f9d7fab75 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Common concepts/Script bundles.html @@ -1,22 +1,22 @@ -

For both Render Note and +

For both Render Note and more complicated scripts, it's generally useful to split the code into - multiple Code notes.

+ multiple Code notes.

When a script is run, the sub-children of the script being run (or the  Render Note) are checked for children. If the children are Code notes + class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note) are checked for children. If the children are Code notes of the corresponding type (front-end or backend) as the code being run, they will be evaluated as well.

The collection of a script and its child notes is called a bundle. A child note inside a bundle is called a module.

As a basic example of dependencies, consider the following note structure:

    -
  • +
  • Script with dependency -

    api.log(MyMath.sum(2, 2));
    +

    api.log(MyMath.sum(2, 2));
      -
    • +
    • MyMath -

      module.exports = {
      +        

      module.exports = {
           sum(a, b) {
               return a + b;
           }
      @@ -26,21 +26,21 @@
         

    When Script with dependency is run, it will detect MyMath as - a submodule and provide the result of its module.exports object + a submodule and provide the result of its module.exports object into a global object with the same name as the note.

    Alternative syntax

    -

    Instead of providing an object to module.exports, - it's also possible to add fields individually:

    module.exports.sum = (a, b) => a + b;
    +

    Instead of providing an object to module.exports, it's also + possible to add fields individually:

    module.exports.sum = (a, b) => a + b;
     module.exports.subtract = (a, b) => a - b;

    Ignoring a code script from a bundle

    To ignore a script from being included in a bundle (e.g. if it's unrelated - to the parent script note), apply the #disableInclusion label.

    + to the parent script note), apply the #disableInclusion label.

    Sharing a module across multiple bundles

    Modules can be reused across multiple scripts by simply cloning the shared - module between two modules (see Cloning Notes).

    + module between two modules (see Cloning Notes).

    Optionally, a separate note can be used to contain all the different reusable modules for an easy way to discover them.

    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.html index 6c1830f8f..c6983e5d7 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.html @@ -4,164 +4,150 @@

    Preact with JSX vs. vanilla jQuery

    In older versions of Trilium, custom widgets were exclusively written in a combination of jQuery with Trilium's internal widget architecture - (e.g., BasicWidget, NoteContextAwareWidget).

    + (e.g., BasicWidget, NoteContextAwareWidget).

    Starting with v0.101.0, custom widgets can also be written in JSX using - the Preact framework. + the Preact framework. Both legacy and Preact widgets have the same capabilities, with a single difference:

      -
    • Preact widgets are content-sized by default whereas legacy widgets need - this.contentSized()applied in the constructor. For more information, - see the corresponding section in Troubleshooting.
    • +
    • Preact widgets are content-sized by default whereas legacy widgets need this.contentSized() applied + in the constructor. For more information, see the corresponding section + in Troubleshooting.

    Wherever possible, widget examples will be both in the legacy and Preact format.

    Creating a custom widget

      -
    1. Create a Code note.
    2. -
    3. Set the language to: +
    4. Create a Code note.
    5. +
    6. Set the language to:
        -
      1. JavaScript (frontend) for legacy widgets using jQuery.
      2. -
      3. JSX for Preact widgets. You might need to go to Options → Code to enable +
      4. JavaScript (frontend) for legacy widgets using jQuery.
      5. +
      6. JSX for Preact widgets. You might need to go to Options → Code to enable the language first.
      -
    7. -
    8. Apply the #widget label.
    9. + +
    10. Apply the #widget label.

    Getting started with a simple example

    Let's start by creating a widget that shows a message near the content area. Follow the previous section to create a code note, and use the following content.

    -
    - - - - - - - - - - + + +
    LegacyPreact (v0.101.0+)
    class HelloNoteDetail extends api.BasicWidget {
    +
    +  
    +    
    +      
    +      
    +    
    +  
    +  
    +    
    +      
    -        
    +      
    -      
    -    
    -  
    LegacyPreact (v0.101.0+)
    class HelloNoteDetail extends api.BasicWidget {
     
    -    constructor() {
    -        super();
    -        this.contentSized();
    -    }
    -
    -    get parentWidget() { return "center-pane" }
    -
    -    doRender() {
    -        this.$widget = $("<span>Center pane</span>");
    -    }
    -    
    +
    constructor() {
    +    super();
    +    this.contentSized();
     }
     
    -module.exports = new HelloNoteDetail();
    -
    import { defineWidget } from "trilium:preact";
    +get parentWidget() { return "center-pane" }
     
    -export default defineWidget({
    +doRender() {
    +    this.<!--FORMULA_INLINE_1766526977514_0-->("&lt;span&gt;Center pane&lt;/span&gt;");
    +}
    +

    }

    +

    module.exports = new HelloNoteDetail();

    + + +
    import { defineWidget } from "trilium:preact";

    export default defineWidget({ parent: "center-pane", render: () => <span>Center pane from Preact.</span> -});

    -
    - -

    Refresh the application and - the widget should appear underneath the content area.

    +});

    +
    +

    +

    Refresh the application and the widget + should appear underneath the content area.

    Widget location (parent widget)

    A widget can be placed in one of the following sections of the applications:

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
    Value for parentWidget - DescriptionSample widgetSpecial requirements
    left-pane - Appears within the same pane that holds the Note Tree.Same as above, with only a different parentWidget.None.
    center-pane - In the content area. If a split is open, the widget will span all of the - splits.See example above.None.
    note-detail-pane - -

    In the content area, inside the note detail area. If a split is open, - the widget will be contained inside the split.

    -

    This is ideal if the widget is note-specific.

    -
    Note context aware widget - -
      -
    • The widget must export a class and not an - instance of the class (e.g. no new) because - it needs to be multiplied for each note, so that splits work correctly.
    • -
    • Since the class is exported instead of an - instance, the parentWidget getter must be - static, otherwise the widget is ignored.
    • -
    -
    right-pane - In the Right Sidebar, - as a dedicated section.Right pane widget - -
      -
    • Although not mandatory, it's best to use a RightPanelWidget instead - of a BasicWidget or a NoteContextAwareWidget.
    • -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Value for parentWidget + DescriptionSample widgetSpecial requirements
    left-pane + Appears within the same pane that holds the Note Tree.Same as above, with only a different parentWidget.None.
    center-pane + In the content area. If a split is open, the widget will span all of the + splits.See example above.None.
    note-detail-pane + +

    In the content area, inside the note detail area. If a split is open, + the widget will be contained inside the split.

    +

    This is ideal if the widget is note-specific.

    +
    Note context aware widget + +
      +
    • The widget must export a class and not an instance of the class + (e.g. no new) because it needs to be multiplied for each note, + so that splits work correctly.
    • +
    • Since the class is exported instead of an instance, the parentWidget getter + must be static, otherwise the widget is ignored.
    • +
    +
    right-pane + In the Right Sidebar, + as a dedicated section.Right pane widget + +
      +
    • Although not mandatory, it's best to use a RightPanelWidget instead + of a BasicWidget or a NoteContextAwareWidget.
    • +
    +
    -
    -

    To position the widget somewhere else, just change the value passed to - get parentWidget()for legacy widgets or the parent field - for Preact. Do note that some positions such as note-detail-pane and - right-panehave special requirements that need to be accounted for - (see the table above).

    +

    To position the widget somewhere else, just change the value passed to get parentWidget() for + legacy widgets or the parent field for Preact. Do note that + some positions such as note-detail-pane and right-pane have + special requirements that need to be accounted for (see the table above).

    Launch bar widgets

    Launch bar widgets are similar to Custom widgets but are specific - to the Launch Bar. - See Launch Bar Widgets for + to the Launch Bar. + See Launch Bar Widgets for more information.

    -

    Custom position

    -

     

    \ No newline at end of file +

    Custom position

    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html index 5de2258eb..481a6d62b 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html @@ -1,7 +1,5 @@

    Classic widgets

    -

    In doRender():[1] +

    In doRender():[1]

    this.cssBlock(`#my-widget {
     	position: absolute;
         bottom: 40px;
    @@ -9,14 +7,12 @@
         z-index: 1;
     }`);

    Preact widgets

    -

    See the dedicated page: CSS.

    -
      -
    1. ^ - +

      See the dedicated page: CSS.

      +
        +
      1. +

        ^ +

        +

        Reference: https://trilium.rocks/X7pxYpiu0lgU +

      2. -
      \ No newline at end of file +
    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Note context aware widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Note context aware widget.html index 7f3ed50a7..d0da3c335 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Note context aware widget.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Note context aware widget.html @@ -2,14 +2,11 @@ react to changes in the current note.

    Important aspects:

      -
    • The widget must export a class and not an - instance of the class (e.g. no new) because - it needs to be multiplied for each note, so that splits work correctly.
    • -
    • Since the class is exported instead of an - instance, the parentWidget getter must be - static, otherwise the widget is ignored.
    • +
    • The widget must export a class and not an instance of the class + (e.g. no new) because it needs to be multiplied for each note, + so that splits work correctly.
    • +
    • Since the class is exported instead of an instance, the parentWidget getter + must be static, otherwise the widget is ignored.

    Example displaying the current note title

    This is a note context-aware widget that simply displays the name the diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html index 94127a539..31bf6d40d 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.html @@ -1,16 +1,14 @@

    Key highlights

      -
    • doRender must not be overridden, instead - doRenderBody()has to be overridden. -
        -
      • doRenderBody can optionally be async.
      • -
      +
    • doRender must not be overridden, instead doRenderBody() has + to be overridden. +
        +
      • doRenderBody can optionally be async.
      • +
    • -
    • parentWidget() must be set to “rightPane”.
    • -
    • widgetTitle() getter can optionally be - overriden, otherwise the widget will be displayed as “Untitled widget”.
    • +
    • parentWidget() must be set to “rightPane”.
    • +
    • widgetTitle() getter can optionally be overriden, otherwise + the widget will be displayed as “Untitled widget”.

    Example for new layout

    Conditionally changing visibility

    -

    In refreshWithNote:

    const visible = true;	// replace with your own visibility logic
    +

    In refreshWithNote:

    const visible = true;	// replace with your own visibility logic
     this.toggleInt(visible);
     this.triggerCommand("reEvaluateRightPaneVisibility");

    Altering the position within the sidebar

    By default, the sidebar items are displayed in the order they are found - by the application when searching for #widget notes.

    + by the application when searching for #widget notes.

    It is possible to make a widget appear higher or lower up, by adjusting - its position property:

    class MyWidget extends api.RightPanelWidget {
    +  its position property:

    class MyWidget extends api.RightPanelWidget {
     
     +    get position() { return 20 };
             
    diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.html
    index 5d548bb39..57bf28d96 100644
    --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.html	
    +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.html	
    @@ -16,17 +16,17 @@
     module.exports = new MyWidget();

    To implement this widget:

      -
    1. Create a new JS Frontend note in Trilium - and paste in the code above.
    2. -
    3. Assign the #widget attribute to +
    4. Create a new JS Frontend note in Trilium and paste in the code + above.
    5. +
    6. Assign the #widget attribute to the note.
    7. -
    8. Restart Trilium or reload the window.
    9. +
    10. Restart Trilium or reload the window.

    To verify that the widget is working, open the developer tools (Ctrl + Shift + I) - and run document.querySelector("#my-widget"). - If the element is found, the widget is functioning correctly. If undefined is + and run document.querySelector("#my-widget"). If the element + is found, the widget is functioning correctly. If undefined is returned, double-check that the note has - the #widget attribute.

    + the #widget attribute.

    Step 2: Adding an UI Element

    Next, let's improve the widget by adding a button to it.

    const template = `<div id="my-widget"><button>Click Me!</button></div>`;
     
    @@ -46,9 +46,7 @@ module.exports = new MyWidget();

    Step 3: Styling the Widget

    To make the button more visually appealing and position it correctly, we'll apply some custom styling. Trilium includes Box Icons, - which we'll use to replace the button text with an icon. For example the - bx bxs-magic-wandicon.

    + which we'll use to replace the button text with an icon. For example the bx bxs-magic-wand icon.

    Here's the updated template:

    const template = `<div id="my-widget"><button class="tree-floating-button bx bxs-magic-wand tree-settings-button"></button></div>`;

    Next, we'll adjust the button's position using CSS:

    class MyWidget extends api.BasicWidget {
         get position() { return 1; }
    @@ -71,8 +69,7 @@ module.exports = new MyWidget();
    of the left pane, alongside other action buttons.

    Step 4: Adding User Interaction

    Let’s make the button interactive by showing a message when it’s clicked. - We'll use the api.showMessage method from - the Script API.

    class MyWidget extends api.BasicWidget {
    +  We'll use the api.showMessage method from the Script API.

    class MyWidget extends api.BasicWidget {
         get position() { return 1; }
         get parentWidget() { return "left-pane"; }
         
    @@ -90,8 +87,9 @@ module.exports = new MyWidget();
    } module.exports = new MyWidget();
    -

    For the list of possible values for parentWidget(), - see Custom Widgets

    +

    For the list of possible values for parentWidget(), see  + Custom Widgets

    Reload the application one last time. When you click the button, a "Hello World!" message should appear, confirming that your widget is fully functional.

    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html index 5386d0052..70ab3f1ac 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html @@ -30,7 +30,7 @@ class NoteTitleWidget extends api.NoteContextAwareWidget { } module.exports = new NoteTitleWidget();
    -

    Preact widget (v0.101.0+)

    import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact";
    +

    Preact widget (v0.101.0+)

    import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact";
     
     export default defineLauncherWidget({
         render: () => {
    diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact.html
    index 1f99be5c5..82c823548 100644
    --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact.html	
    +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact.html	
    @@ -2,16 +2,16 @@
       support for JSX.

    Preact can be used for:

    To get started, the first step is to enable JSX in the list of Code languages. Go to Options → Code Notes and check the “JSX” language. Afterwards, proceed - with the documentation in either Render Note or  + with the documentation in either Render Note or  Custom Widgets, which will both have a section on how to use the new + class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets, which will both have a section on how to use the new Preact integration.

    Import/exports

    When using Preact with JSX, there is a special syntax which provides ES-like - imports. This import syntax makes way for - a more intuitive that doesn't make use of global objects and paves the - way for better auto-completion support that might be introduced in the - future. 

    + imports. This import syntax makes way for a more intuitive that + doesn't make use of global objects and paves the way for better auto-completion + support that might be introduced in the future. 

    API imports

    -

    Instead of:

    api.showMessage("Hello");
    -

    the JSX version looks like this:

    import { showMessage } from "trilium:api";
    +

    Instead of:

    api.showMessage("Hello");
    +

    the JSX version looks like this:

    import { showMessage } from "trilium:api";
     showMessage("hello");

    Preact API imports (hooks, components)

    -

    There's a new Script API dedicated +

    There's a new Script API dedicated to Preact, which provides shared components that are also used by Trilium - internally as well as hooks, for example.

    import { useState } from "trilium:preact";
    +  internally as well as hooks, for example.

    import { useState } from "trilium:preact";
     const [ myState, setMyState ] = useState("Hi");

    Exporting

    JSX notes can export a component for use in Render Note or - for Component libraries: 

    export default function() {
    +  href="#root/_help_HcABDtFCkbFN">Render Note or for Component libraries: 

    export default function() {
         return (
             <>
                 <p>Hello world.</p>
    @@ -44,15 +43,13 @@ const [ myState, setMyState ] = useState("Hi");
    ); }

    Import/export are not required

    -

    These imports are syntactic sugar meant to replace the usage for the - apiglobal object (see Script API). 

    +

    These imports are syntactic sugar meant to replace the usage for the api global + object (see Script API). 

    Under the hood

    Unlike JavaScript, JSX requires pre-processing to turn it into JavaScript @@ -60,5 +57,4 @@ class="admonition note"> a JavaScript library which processes the JSX to pure JavaScript. The processing is done each time a script is run (for widgets this happens at every program startup). If you notice any performance degradation due to long compilation, - consider reporting the issue to - us.

    \ No newline at end of file + consider reporting the issue to us.

    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.html index a4c6faa6f..27aa57582 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.html @@ -4,11 +4,11 @@
    A partial screenshot from the Widget showcase example (see below).

    Trilium comes with its own set of Preact components, some of which are - also available to Custom Widgets and  + also available to Custom Widgets and  Render Note.

    -

    To use these components, simply import them from trilium:preact:

    import { ActionButton, Button, LinkButton } from "trilium:preact";
    -

    and then use them:

    export default function MyRenderNote() {
    +  class="reference-link" href="#root/_help_HcABDtFCkbFN">Render Note.

    +

    To use these components, simply import them from trilium:preact:

    import { ActionButton, Button, LinkButton } from "trilium:preact";
    +

    and then use them:

    export default function MyRenderNote() {
         const onClick = () => showMessage("A button was pressed");
         
         return (
    @@ -26,19 +26,19 @@
     
    -

    This is a Render Note example +

    This is a Render Note example with JSX that shows most of the built-in components that are accessible to custom widgets and JSX render notes.

    To use it, simply:

      -
    1. Create a render note.
    2. -
    3. Create a child code note of JSX type with the content of this file:  +
    4. Create a render note.
    5. +
    6. Create a child code note of JSX type with the content of this file:  Widget showcase + class="reference-link" href="#root/_help_i9B4IW7b6V6z">Widget showcase
    7. -
    8. Set the ~renderNote relation of the parent - note to the child note.
    9. -
    10. Refresh the render note to see the results.
    11. +
    12. Set the ~renderNote relation of the parent note to the child + note.
    13. +
    14. Refresh the render note to see the results.
    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.html index d11c1e1d8..2cdec3295 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.html @@ -1,19 +1,12 @@ -

    Inline styles

    <div style={{
    -
    +

    Inline styles

    <div style={{
         display: "flex",
    -
         height: "53px",
    -
         width: "fit-content",
    -
         fontSize: "0.75em",
    -
         alignItems: "center",
    -
         flexShrink: 0            
    -
     }}>/* [...] */</div>

    Custom CSS file

    -

    Simply create a Custom app-wide CSS. +

    Simply create a Custom app-wide CSS. Make sure the class names are unique enough to not intersect with other - UI elements, consider adding a prefix (e.g. x-mywidget-).

    \ No newline at end of file + UI elements, consider adding a prefix (e.g. x-mywidget-).

    \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Component libraries.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Component libraries.html index 8b0ffb3bb..08c797737 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Component libraries.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Component libraries.html @@ -1,26 +1,26 @@ -

    Using the concept of Script bundles, +

    Using the concept of Script bundles, it's possible to create components that are shared for multiple widgets - or Render Note.

    + or Render Note.

    Exporting a single component

    This is generally useful for big components.

    Here's an example child hierarchy using Render Note: 

    + href="#root/_help_HcABDtFCkbFN">Render Note: 

      -
    • My render note +
    • My render note
      Note type: Render Note -
      Link ~renderNote to the child note (Render note with subcomponents) +
      Link ~renderNote to the child note (Render note with subcomponents)
        -
      • +
      • Render note with subcomponents -
        Type: JSX

        export default function() {
        +          
        Type: JSX

        export default function() {
             return (
                 <MyComponent />        
             );
         }
          -
        • +
        • MyComponent -
          Type: Code / JSX

          export default function MyComponent() {
          +              
          Type: Code / JSX

          export default function MyComponent() {
               return <p>Hi</p>;
           }
        • @@ -30,17 +30,16 @@

        Multiple components per note

        -

        To export multiple components, use the export keyword - next to each of the function components.

        -

        Here's how a sub-note called MyComponents would - look like:

        export function MyFirstComponent() {
        +

        To export multiple components, use the export keyword next + to each of the function components.

        +

        Here's how a sub-note called MyComponents would look like:

        export function MyFirstComponent() {
             return <p>First</p>;
         }
         
         export function MySecondComponent() {
             return <p>Bar</p>;
         }
        -

        Then in its parent note:

        const { MyFirstComponent, MySecondComponent } = MyComponents;
        +

        Then in its parent note:

        const { MyFirstComponent, MySecondComponent } = MyComponents;
         
         export default function() {
             return (
        @@ -51,5 +50,5 @@ export default function() {
             );
         }

        Alternatively, it's also possible to use the components directly without - assigning them to a const first:

        <MyComponents.MyFirstComponent />
        +  assigning them to a const first:

        <MyComponents.MyFirstComponent />
         <MyComponents.MySecondComponent />
        \ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Hooks.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Hooks.html index 5dadda792..45255b1d7 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Hooks.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Preact/Hooks.html @@ -1,14 +1,14 @@

        Standard Preact hooks

        -

        All standard Preact hooks are available as an import in trilium:api.

        +

        All standard Preact hooks are available as an import in trilium:api.

        For example:

        import { useState } from "trilium:preact";
         const [ myState, setMyState ] = useState("Hi");

        Custom hooks

        Trilium comes with a large set of custom hooks for Preact, all of which are also available to custom widgets and Render Note.

        -

        useNoteContext

        -

        As a replacement to Note context aware widget, - Preact exposes the current note context in the useNoteContext hook:

        import { defineWidget, useNoteContext, useNoteProperty } from "trilium:preact";
        +  href="#root/_help_HcABDtFCkbFN">Render Note.

        +

        useNoteContext

        +

        As a replacement to Note context aware widget, + Preact exposes the current note context in the useNoteContext hook:

        import { defineWidget, useNoteContext, useNoteProperty } from "trilium:preact";
         
         export default defineWidget({    
             parent: "note-detail-pane",
        @@ -21,15 +21,13 @@ export default defineWidget({
         });

        Note that the custom widget must be inside the content area (so note detail widget) for this to work properly, especially when dealing with splits.

        -

        useActiveNoteContext

        -

        useActiveNoteContext is an alternative - to useNoteContext which works even if the - widget is not within the note detail section and it automatically switches - the note context as the user is navigating around between tabs and splits.

        -

        useNoteProperty

        -

        This hook allows “listening” for changes to a particular property of a - FNote, such as the title or - typeof a note. The benefit from using the hook is that it actually - reacts to changes, for example if the note title or type is changed.

        \ No newline at end of file +

        useActiveNoteContext

        +

        useActiveNoteContext is an alternative to useNoteContext which + works even if the widget is not within the note detail section and it automatically + switches the note context as the user is navigating around between tabs + and splits.

        +

        useNoteProperty

        +

        This hook allows “listening” for changes to a particular property of a FNote, + such as the title or type of a note. The benefit + from using the hook is that it actually reacts to changes, for example + if the note title or type is changed.

        \ No newline at end of file diff --git a/docs/Developer Guide/Developer Guide/Documentation.md b/docs/Developer Guide/Developer Guide/Documentation.md index 52e727229..c4c3cfb06 100644 --- a/docs/Developer Guide/Developer Guide/Documentation.md +++ b/docs/Developer Guide/Developer Guide/Documentation.md @@ -1,5 +1,5 @@ # Documentation -There are multiple types of documentation for Trilium: +There are multiple types of documentation for Trilium: * The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing F1. * The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers. diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json index cdb0b0ffd..670896d48 100644 --- a/docs/User Guide/!!!meta.json +++ b/docs/User Guide/!!!meta.json @@ -15618,6 +15618,83 @@ "type": "text", "mime": "text/markdown", "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "KLsqhjaqh1QW", + "isInheritable": false, + "position": 10 + }, + { + "type": "relation", + "name": "internalLink", + "value": "gMkgcLJ6jBkg", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "6f9hih2hXXZk", + "isInheritable": false, + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "HI6GBBIduIgv", + "isInheritable": false, + "position": 40 + }, + { + "type": "relation", + "name": "internalLink", + "value": "s8alTXmpFR61", + "isInheritable": false, + "position": 50 + }, + { + "type": "relation", + "name": "internalLink", + "value": "oPVyFC7WL2Lp", + "isInheritable": false, + "position": 60 + }, + { + "type": "relation", + "name": "internalLink", + "value": "GhurYZjh8e1V", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "RnaPdbciOfeq", + "isInheritable": false, + "position": 80 + }, + { + "type": "relation", + "name": "internalLink", + "value": "M8IppdwVHSjG", + "isInheritable": false, + "position": 90 + }, + { + "type": "relation", + "name": "internalLink", + "value": "xYmIYSP6wE3F", + "isInheritable": false, + "position": 100 + }, + { + "type": "relation", + "name": "internalLink", + "value": "4Gn3psZKsfSm", + "isInheritable": false, + "position": 110 + }, { "type": "label", "name": "shareAlias", @@ -15631,83 +15708,6 @@ "value": "bx bxs-widget", "isInheritable": false, "position": 30 - }, - { - "type": "relation", - "name": "internalLink", - "value": "oPVyFC7WL2Lp", - "isInheritable": false, - "position": 40 - }, - { - "type": "relation", - "name": "internalLink", - "value": "RnaPdbciOfeq", - "isInheritable": false, - "position": 50 - }, - { - "type": "relation", - "name": "internalLink", - "value": "xYmIYSP6wE3F", - "isInheritable": false, - "position": 60 - }, - { - "type": "relation", - "name": "internalLink", - "value": "4Gn3psZKsfSm", - "isInheritable": false, - "position": 70 - }, - { - "type": "relation", - "name": "internalLink", - "value": "KLsqhjaqh1QW", - "isInheritable": false, - "position": 80 - }, - { - "type": "relation", - "name": "internalLink", - "value": "6f9hih2hXXZk", - "isInheritable": false, - "position": 90 - }, - { - "type": "relation", - "name": "internalLink", - "value": "HI6GBBIduIgv", - "isInheritable": false, - "position": 100 - }, - { - "type": "relation", - "name": "internalLink", - "value": "s8alTXmpFR61", - "isInheritable": false, - "position": 110 - }, - { - "type": "relation", - "name": "internalLink", - "value": "GhurYZjh8e1V", - "isInheritable": false, - "position": 120 - }, - { - "type": "relation", - "name": "internalLink", - "value": "M8IppdwVHSjG", - "isInheritable": false, - "position": 130 - }, - { - "type": "relation", - "name": "internalLink", - "value": "gMkgcLJ6jBkg", - "isInheritable": false, - "position": 140 } ], "format": "markdown", @@ -15756,23 +15756,23 @@ { "type": "relation", "name": "internalLink", - "value": "s8alTXmpFR61", + "value": "MgibgPcfeuGz", "isInheritable": false, "position": 40 }, + { + "type": "relation", + "name": "internalLink", + "value": "s8alTXmpFR61", + "isInheritable": false, + "position": 50 + }, { "type": "label", "name": "shareAlias", "value": "widget-basics", "isInheritable": false, "position": 20 - }, - { - "type": "relation", - "name": "internalLink", - "value": "MgibgPcfeuGz", - "isInheritable": false, - "position": 50 } ], "format": "markdown", @@ -15912,19 +15912,19 @@ "type": "text", "mime": "text/html", "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "Sg9GrCtyftZf", + "isInheritable": false, + "position": 10 + }, { "type": "label", "name": "shareAlias", "value": "css", "isInheritable": false, "position": 20 - }, - { - "type": "relation", - "name": "internalLink", - "value": "Sg9GrCtyftZf", - "isInheritable": false, - "position": 30 } ], "format": "markdown", @@ -16347,46 +16347,46 @@ "mime": "text/html", "attributes": [ { - "type": "label", - "name": "iconClass", - "value": "bx bxl-react", + "type": "relation", + "name": "internalLink", + "value": "HcABDtFCkbFN", "isInheritable": false, - "position": 30 + "position": 10 }, { "type": "relation", "name": "internalLink", "value": "MgibgPcfeuGz", "isInheritable": false, - "position": 40 - }, - { - "type": "relation", - "name": "internalLink", - "value": "HcABDtFCkbFN", - "isInheritable": false, - "position": 50 - }, - { - "type": "relation", - "name": "internalLink", - "value": "wy8So3yZZlH9", - "isInheritable": false, - "position": 60 + "position": 20 }, { "type": "relation", "name": "internalLink", "value": "GLks18SNjxmC", "isInheritable": false, - "position": 70 + "position": 30 }, { "type": "relation", "name": "internalLink", "value": "Bqde6BvPo05g", "isInheritable": false, - "position": 80 + "position": 40 + }, + { + "type": "relation", + "name": "internalLink", + "value": "wy8So3yZZlH9", + "isInheritable": false, + "position": 50 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bxl-react", + "isInheritable": false, + "position": 30 } ], "format": "markdown", @@ -16416,14 +16416,14 @@ "name": "internalLink", "value": "hA834UaHhSNn", "isInheritable": false, - "position": 30 + "position": 10 }, { "type": "relation", "name": "internalLink", "value": "HcABDtFCkbFN", "isInheritable": false, - "position": 40 + "position": 20 }, { "type": "label", @@ -16459,14 +16459,14 @@ "name": "internalLink", "value": "HcABDtFCkbFN", "isInheritable": false, - "position": 40 + "position": 10 }, { "type": "relation", "name": "internalLink", "value": "GhurYZjh8e1V", "isInheritable": false, - "position": 50 + "position": 20 }, { "type": "label", @@ -16502,7 +16502,7 @@ "name": "internalLink", "value": "AlhDUqhENtH7", "isInheritable": false, - "position": 30 + "position": 10 }, { "type": "label", @@ -16533,40 +16533,40 @@ "type": "text", "mime": "text/html", "attributes": [ - { - "type": "label", - "name": "iconClass", - "value": "bx bxs-component", - "isInheritable": false, - "position": 30 - }, { "type": "relation", "name": "internalLink", "value": "MgibgPcfeuGz", "isInheritable": false, - "position": 40 + "position": 10 }, { "type": "relation", "name": "internalLink", "value": "HcABDtFCkbFN", "isInheritable": false, - "position": 50 - }, - { - "type": "relation", - "name": "internalLink", - "value": "i9B4IW7b6V6z", - "isInheritable": false, - "position": 60 + "position": 20 }, { "type": "relation", "name": "internalLink", "value": "6tZeKvSHEUiB", "isInheritable": false, - "position": 70 + "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "i9B4IW7b6V6z", + "isInheritable": false, + "position": 40 + }, + { + "type": "label", + "name": "iconClass", + "value": "bx bxs-component", + "isInheritable": false, + "position": 30 } ], "format": "markdown", @@ -16788,6 +16788,27 @@ "type": "text", "mime": "text/html", "attributes": [ + { + "type": "relation", + "name": "internalLink", + "value": "HcABDtFCkbFN", + "isInheritable": false, + "position": 10 + }, + { + "type": "relation", + "name": "internalLink", + "value": "6f9hih2hXXZk", + "isInheritable": false, + "position": 20 + }, + { + "type": "relation", + "name": "internalLink", + "value": "IakOLONlIfGI", + "isInheritable": false, + "position": 30 + }, { "type": "label", "name": "iconClass", @@ -16795,33 +16816,12 @@ "isInheritable": false, "position": 30 }, - { - "type": "relation", - "name": "internalLink", - "value": "HcABDtFCkbFN", - "isInheritable": false, - "position": 40 - }, - { - "type": "relation", - "name": "internalLink", - "value": "6f9hih2hXXZk", - "isInheritable": false, - "position": 50 - }, { "type": "label", "name": "shareAlias", "value": "bundles", "isInheritable": false, "position": 60 - }, - { - "type": "relation", - "name": "internalLink", - "value": "IakOLONlIfGI", - "isInheritable": false, - "position": 70 } ], "format": "markdown", diff --git a/docs/User Guide/User Guide/Advanced Usage/Database/Demo Notes.md b/docs/User Guide/User Guide/Advanced Usage/Database/Demo Notes.md index a8e74fe53..df8af0f6f 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Database/Demo Notes.md +++ b/docs/User Guide/User Guide/Advanced Usage/Database/Demo Notes.md @@ -13,7 +13,7 @@ There are some cases in which you may want to restore the original demo notes. F You can easily restore the demo notes by using Trilium's built-in import feature by importing them: -* Download [this .zip archive](https://github.com/TriliumNext/Trilium/raw/develop/db/demo.zip) with the latest version of the demo notes +* Download [the .zip archive](https://github.com/TriliumNext/Trilium/raw/refs/heads/main/apps/server/src/assets/db/demo.zip) with the latest version of the demo notes * Right click on any note in your tree under which you would like the demo notes to be imported * Click "Import into note" * Select the .zip archive to import it \ No newline at end of file diff --git a/docs/User Guide/User Guide/Note Types/Render Note.md b/docs/User Guide/User Guide/Note Types/Render Note.md index b05591c63..828d7dfef 100644 --- a/docs/User Guide/User Guide/Note Types/Render Note.md +++ b/docs/User Guide/User Guide/Note Types/Render Note.md @@ -44,7 +44,7 @@ Here are the steps to creating a simple render note: 2. Create a child Code note with JSX as the language. As an example, use the following content: - ```jsx + ``` export default function() { return ( <> diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.md index 8eb2cb145..cc011c514 100644 --- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.md +++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.md @@ -23,27 +23,21 @@ Wherever possible, widget examples will be both in the legacy and Preact format. Let's start by creating a widget that shows a message near the content area. Follow the previous section to create a code note, and use the following content. -
        LegacyPreact (v0.101.0+)
        class HelloNoteDetail extends api.BasicWidget {
        +
        LegacyPreact (v0.101.0+)
        class HelloNoteDetail extends api.BasicWidget {
         
        -    constructor() {
        -        super();
        -        this.contentSized();
        -    }
        -
        -    get parentWidget() { return "center-pane" }
        -
        -    doRender() {
        -        this.$widget = $("<span>Center pane</span>");
        -    }
        -    
        +
        constructor() {
        +    super();
        +    this.contentSized();
         }
         
        -module.exports = new HelloNoteDetail();
        import { defineWidget } from "trilium:preact";
        +get parentWidget() { return "center-pane" }
         
        -export default defineWidget({
        +doRender() {
        +    this.<!--FORMULA_INLINE_1766526977514_0-->("&lt;span&gt;Center pane&lt;/span&gt;");
        +}

        }

        module.exports = new HelloNoteDetail();

        import { defineWidget } from "trilium:preact";

        export default defineWidget({ parent: "center-pane", render: () => <span>Center pane from Preact.</span> -});

        +});

        [Refresh the application](../../Troubleshooting/Refreshing%20the%20application.md) and the widget should appear underneath the content area. @@ -51,7 +45,7 @@ export default defineWidget({ A widget can be placed in one of the following sections of the applications: -
        Value for parentWidgetDescriptionSample widgetSpecial requirements
        left-paneAppears within the same pane that holds the Note Tree.Same as above, with only a different parentWidget.None.
        center-paneIn the content area. If a split is open, the widget will span all of the splits.See example above.None.
        note-detail-pane

        In the content area, inside the note detail area. If a split is open, the widget will be contained inside the split.

        This is ideal if the widget is note-specific.

        Note context aware widget
        • The widget must export a class and not an instance of the class (e.g. no new) because it needs to be multiplied for each note, so that splits work correctly.
        • Since the class is exported instead of an instance, the parentWidget getter must be static, otherwise the widget is ignored.
        right-paneIn the Right Sidebar, as a dedicated section.Right pane widget
        • Although not mandatory, it's best to use a RightPanelWidget instead of a BasicWidget or a NoteContextAwareWidget.
        +
        Value for parentWidgetDescriptionSample widgetSpecial requirements
        left-paneAppears within the same pane that holds the Note Tree.Same as above, with only a different parentWidget.None.
        center-paneIn the content area. If a split is open, the widget will span all of the splits.See example above.None.
        note-detail-pane

        In the content area, inside the note detail area. If a split is open, the widget will be contained inside the split.

        This is ideal if the widget is note-specific.

        Note context aware widget
        • The widget must export a class and not an instance of the class (e.g. no new) because it needs to be multiplied for each note, so that splits work correctly.
        • Since the class is exported instead of an instance, the parentWidget getter must be static, otherwise the widget is ignored.
        right-paneIn the Right Sidebar, as a dedicated section.Right pane widget
        • Although not mandatory, it's best to use a RightPanelWidget instead of a BasicWidget or a NoteContextAwareWidget.
        To position the widget somewhere else, just change the value passed to `get parentWidget()` for legacy widgets or the `parent` field for Preact. Do note that some positions such as `note-detail-pane` and `right-pane` have special requirements that need to be accounted for (see the table above). diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md index c892e3365..78a69eb8a 100644 --- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md +++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.md @@ -35,7 +35,7 @@ module.exports = new NoteTitleWidget(); ## Preact widget (v0.101.0+) -```jsx +``` import { defineLauncherWidget, useActiveNoteContext } from "trilium:preact"; export default defineLauncherWidget({ diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact.md index 6f05765fc..db3811479 100644 --- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact.md +++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact.md @@ -19,13 +19,13 @@ When using Preact with JSX, there is a special syntax which provides ES-like imp Instead of: -```jsx +``` api.showMessage("Hello"); ``` the JSX version looks like this: -```jsx +``` import { showMessage } from "trilium:api"; showMessage("hello"); ``` @@ -34,7 +34,7 @@ showMessage("hello"); There's a new Script API dedicated to Preact, which provides shared components that are also used by Trilium internally as well as hooks, for example. -```jsx +``` import { useState } from "trilium:preact"; const [ myState, setMyState ] = useState("Hi"); ``` @@ -43,7 +43,7 @@ const [ myState, setMyState ] = useState("Hi"); JSX notes can export a component for use in Render Note or for Component libraries:  -```jsx +``` export default function() { return ( <> diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.md index db05c9255..8d3c86e4f 100644 --- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.md +++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/Built-in components.md @@ -5,13 +5,13 @@ Trilium comes with its own set of Preact components, some of which are also avai To use these components, simply import them from `trilium:preact`: -```jsx +``` import { ActionButton, Button, LinkButton } from "trilium:preact"; ``` and then use them: -```jsx +``` export default function MyRenderNote() { const onClick = () => showMessage("A button was pressed"); diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.md index 3b959261f..bda9f195a 100644 --- a/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.md +++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Preact/CSS.md @@ -1,7 +1,7 @@ # CSS ## Inline styles -```jsx +```