diff --git a/README-ZH_CN.md b/README-ZH_CN.md index a31caa2a1..47d93a3da 100644 --- a/README-ZH_CN.md +++ b/README-ZH_CN.md @@ -1,6 +1,6 @@ # Trilium Notes -[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) +[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) [![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Trilium Notes 是一个层次化的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解: diff --git a/README.ja.md b/README.ja.md new file mode 100644 index 000000000..621e3e0ff --- /dev/null +++ b/README.ja.md @@ -0,0 +1,83 @@ +# Trilium Notes + +[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) + +Trilium Notes は、大規模な個人知識ベースの構築に焦点を当てた、階層型ノートアプリケーションです。概要は[スクリーンショット](https://github.com/zadam/trilium/wiki/Screenshot-tour)をご覧ください: + +Trilium Screenshot + +ウクライナは現在、ロシアの侵略から自国を守っています。[ウクライナ軍や人道的な慈善団体への寄付](https://standforukraine.com/)をご検討ください。 + +

+ drawing + Trilium Notes supports Ukraine! +

+ +## 🎁 特徴 + +* ノートは、任意の深さのツリーに配置できます。単一のノートをツリー内の複数の場所に配置できます ([cloning](https://github.com/zadam/trilium/wiki/Cloning-notes) を参照) +* マークダウン[オートフォーマット](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)による、表、画像、[数学](https://github.com/zadam/trilium/wiki/Text-notes#math-support)などの豊富な WYSIWYG ノート編集機能 +* シンタックスハイライトを含む[ソースコード付きノート](https://github.com/zadam/trilium/wiki/Code-notes)の編集をサポート +* [ノート間のナビゲーション](https://github.com/zadam/trilium/wiki/Note-navigation)、全文検索、[ノートホイスト](https://github.com/zadam/trilium/wiki/Note-hoisting)が高速かつ簡単に行えます +* シームレスな[ノートのバージョン管理](https://github.com/zadam/trilium/wiki/Note-revisions) +* ノート[属性](https://github.com/zadam/trilium/wiki/Attributes)は、ノート整理、クエリ、高度な[スクリプト](https://github.com/zadam/trilium/wiki/Scripts)に使用できます +* 自己ホスト型同期サーバーとの[同期](https://github.com/zadam/trilium/wiki/Synchronization) + * [同期サーバーをホストするサードパーティ・サービス](https://trilium.cc/paid-hosting)があります +* 公開インターネットへのノートの[共有](https://github.com/zadam/trilium/wiki/Sharing)(公開) +* ノートごとの粒度を持つ強力な[ノート暗号化](https://github.com/zadam/trilium/wiki/Protected-notes) +* 組み込みの Excalidraw を使用した図のスケッチ (ノート タイプ"キャンバス") +* ノートとその関係を可視化するための[関係図](https://github.com/zadam/trilium/wiki/Relation-map)と[リンクマップ](https://github.com/zadam/trilium/wiki/Link-map) +* [スクリプティング](https://github.com/zadam/trilium/wiki/Scripts) - [高度なショーケース](https://github.com/zadam/trilium/wiki/Advanced-showcases)を参照 +* 自動化のための [REST API](https://github.com/zadam/trilium/wiki/ETAPI) +* ユーザビリティとパフォーマンスの両方で 100 000 ノート以上に拡張可能 +* スマートフォンとタブレット向けのタッチ最適化[モバイルフロントエンド](https://github.com/zadam/trilium/wiki/Mobile-frontend) +* [ナイトテーマ](https://github.com/zadam/trilium/wiki/Themes) +* [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) と [Markdown のインポートとエクスポート](https://github.com/zadam/trilium/wiki/Markdown) +* Web コンテンツを簡単に保存するための [Web クリッパー](https://github.com/zadam/trilium/wiki/Web-clipper) + +サードパーティのテーマ、スクリプト、プラグインなどは、 [awesome-trilium](https://github.com/Nriver/awesome-trilium) をチェックしてください。 + +## 🏗 ビルド + +Trilium は、デスクトップアプリケーション(Linux、Windows)またはサーバー上でホストされるウェブアプリケーション(Linux)として提供されます。 Mac OS のデスクトップビルドも利用可能ですが、 [unsupported](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support) となっています。 + +* デスクトップで Trilium を使用したい場合は、 [latest release](https://github.com/zadam/trilium/releases/latest) からお使いのプラットフォームのバイナリリリースをダウンロードし、パッケージを解凍して ``trilium`` の実行ファイルを実行してください。 +* サーバーに Trilium をインストールする場合は、[このページ](https://github.com/zadam/trilium/wiki/Server-installation)に従ってください。 + * 現在、対応(動作確認)しているブラウザは、最近の Chrome と Firefox のみです。 + +Trilium は Flatpak としても提供されます: + +[](https://flathub.org/apps/details/com.github.zadam.trilium) + +## 📝 ドキュメント + +[ドキュメントページの全リストはwikiをご覧ください。](https://github.com/zadam/trilium/wiki/) + +また、[個人的な知識基盤のパターン](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base)を読むと、 Trilium の使い方のヒントを得ることができます。 + +## 💻 コントリビュート + +ブラウザベースの開発環境を使用 + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/zadam/trilium) + +または、ローカルにクローンして実行 +``` +npm install +npm run start-server +``` + +## 📢 シャウトアウト + +* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - 市場で最高の WYSIWYG エディター、非常にインタラクティブで聞き上手なチーム +* [FancyTree](https://github.com/mar10/fancytree) - 真の競争相手がいない、非常に機能豊富なツリーライブラリです。 Trilium Notes は、これなしでは成り立たないでしょう。 +* [CodeMirror](https://github.com/codemirror/CodeMirror) - 膨大な数の言語をサポートするコードエディタ +* [jsPlumb](https://github.com/jsplumb/jsplumb) - 競合のないビジュアルコネクティビティライブラリです。[関係図](https://github.com/zadam/trilium/wiki/Relation-map)、[リンク図](https://github.com/zadam/trilium/wiki/Link-map)で使用。 + +## 🤝 サポート + +GitHub スポンサー、[PayPal](https://paypal.me/za4am)もしくは Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2) にて Trilium をサポートすることができます。 + +## 🔑 ライセンス + +このプログラムはフリーソフトウェアです:フリーソフトウェア財団が発行した GNU Affero General Public License のバージョン3、またはそれ以降のバージョンのいずれかに従って、再配布および/または改変することができます。 diff --git a/README.md b/README.md index d2806af64..d8cd45f14 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Trilium Notes -[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) +[![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases. See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview: @@ -76,7 +76,7 @@ npm run start-server ## 🤝 Support -You can support Trilum using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). +You can support Trilium using GitHub Sponsors, [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2). ## 🔑 License diff --git a/README.ru.md b/README.ru.md index 794e6c4b2..f79341e79 100644 --- a/README.ru.md +++ b/README.ru.md @@ -1,6 +1,6 @@ # Trilium Notes -[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) +[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md) | [Japanese](https://github.com/zadam/trilium/blob/master/README.ja.md) [![Join the chat at https://gitter.im/trilium-notes/Lobby](https://badges.gitter.im/trilium-notes/Lobby.svg)](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://github.com/zadam/trilium/wiki/Screenshot-tour): diff --git a/db/migrations/0212__delete_all_attributes_of_named_notes.js b/db/migrations/0212__delete_all_attributes_of_named_notes.js index 47ddb9114..d90f25e44 100644 --- a/db/migrations/0212__delete_all_attributes_of_named_notes.js +++ b/db/migrations/0212__delete_all_attributes_of_named_notes.js @@ -2,12 +2,18 @@ module.exports = () => { const cls = require("../../src/services/cls"); const beccaLoader = require("../../src/becca/becca_loader"); const becca = require("../../src/becca/becca"); + const log = require("../../src/services/log"); cls.init(() => { beccaLoader.load(); const hidden = becca.getNote("_hidden"); + if (!hidden) { + log.info("MIGRATION 212: no _hidden note, skipping."); + return; + } + for (const noteId of hidden.getSubtreeNoteIds({includeHidden: true})) { if (noteId.startsWith("_")) { // is "named" note const note = becca.getNote(noteId); diff --git a/images/icon-black.svg b/images/icon-black.svg new file mode 100644 index 000000000..f3427da82 --- /dev/null +++ b/images/icon-black.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/images/icon-color.svg b/images/icon-color.svg new file mode 100644 index 000000000..bd266dab6 --- /dev/null +++ b/images/icon-color.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/images/icon-grey.svg b/images/icon-grey.svg new file mode 100644 index 000000000..92bc0906e --- /dev/null +++ b/images/icon-grey.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/package.json b/package.json index 43660dd14..4000930f5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "trilium", "productName": "Trilium Notes", "description": "Trilium Notes", - "version": "0.59.2", + "version": "0.59.3", "license": "AGPL-3.0-only", "main": "electron.js", "bin": { diff --git a/src/becca/becca_loader.js b/src/becca/becca_loader.js index 9ac087d44..fb9f6d3df 100644 --- a/src/becca/becca_loader.js +++ b/src/becca/becca_loader.js @@ -70,7 +70,9 @@ function reload() { } function postProcessEntityUpdate(entityName, entity) { - if (entityName === 'branches') { + if (entityName === 'notes') { + noteUpdated(entity); + } else if (entityName === 'branches') { branchUpdated(entity); } else if (entityName === 'attributes') { attributeUpdated(entity); @@ -161,6 +163,15 @@ function branchDeleted(branchId) { delete becca.branches[branch.branchId]; } +function noteUpdated(entity) { + const note = becca.notes[entity.noteId]; + + if (note) { + // type / mime could have been changed, and they are present in flatTextCache + note.flatTextCache = null; + } +} + function branchUpdated(branch) { const childNote = becca.notes[branch.noteId]; diff --git a/src/public/app/entities/fnote.js b/src/public/app/entities/fnote.js index cb0629836..a3afc4ad2 100644 --- a/src/public/app/entities/fnote.js +++ b/src/public/app/entities/fnote.js @@ -719,7 +719,14 @@ class FNote { }); // attrs are not resorted if position changes after initial load - promotedAttrs.sort((a, b) => a.position < b.position ? -1 : 1); + promotedAttrs.sort((a, b) => { + if (a.noteId === b.noteId) { + return a.position < b.position ? -1 : 1; + } else { + // inherited promoted attributes should stay grouped: https://github.com/zadam/trilium/issues/3761 + return a.noteId < b.noteId ? -1 : 1; + } + }); return promotedAttrs; } diff --git a/src/public/app/menus/context_menu.js b/src/public/app/menus/context_menu.js index ba42cc345..19b5f6433 100644 --- a/src/public/app/menus/context_menu.js +++ b/src/public/app/menus/context_menu.js @@ -99,11 +99,16 @@ class ContextMenu { const $item = $("
  • ") .addClass("dropdown-item") .append($link) + .on('contextmenu', e => false) // important to use mousedown instead of click since the former does not change focus // (especially important for focused text for spell check) .on('mousedown', e => { e.stopPropagation(); + if (e.which !== 1) { // only left click triggers menu items + return false; + } + this.hide(); if (item.handler) { diff --git a/src/public/app/services/note_list_renderer.js b/src/public/app/services/note_list_renderer.js index f0d9eb9f7..b22fdc827 100644 --- a/src/public/app/services/note_list_renderer.js +++ b/src/public/app/services/note_list_renderer.js @@ -12,86 +12,88 @@ const TPL = ` position: relative; height: 100%; } - + .note-list.grid-view .note-list-container { display: flex; flex-wrap: wrap; } - + .note-list.grid-view .note-book-card { flex-basis: 300px; border: 1px solid transparent; } - + .note-list.grid-view .note-expander { display: none; } - + .note-list.grid-view .note-book-card { max-height: 300px; } - + .note-list.grid-view .note-book-card:hover { cursor: pointer; border: 1px solid var(--main-border-color); background: var(--more-accented-background-color); } - + .note-book-card { border-radius: 10px; background-color: var(--accented-background-color); padding: 10px 15px 15px 8px; - margin: 5px 5px 5px 0; + margin: 5px 5px 5px 5px; overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0; flex-grow: 1; } - + .note-book-card:not(.expanded) .note-book-content { display: none !important; padding: 10px } - + .note-book-card.expanded .note-book-content { display: block; min-height: 0; height: 100%; padding-top: 10px; } - + .note-book-header { + border-bottom: 1px solid var(--main-border-color); margin-bottom: 0; + padding-bottom: .5rem; word-break: break-all; } - + /* not-expanded title is limited to one line only */ .note-book-card:not(.expanded) .note-book-header { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } - + .note-book-header .rendered-note-attributes { font-size: medium; } - + .note-book-header .rendered-note-attributes:before { content: "\\00a0\\00a0"; } - + .note-book-header .note-icon { font-size: 100%; display: inline-block; padding-right: 7px; position: relative; } - + .note-book-card .note-book-card { border: 1px solid var(--main-border-color); } - + .note-book-content.type-image, .note-book-content.type-file, .note-book-content.type-protectedSession { display: flex; align-items: center; @@ -99,46 +101,46 @@ const TPL = ` text-align: center; padding: 10px; } - + .note-book-content.type-image img, .note-book-content.type-canvas svg { max-width: 100%; max-height: 100%; object-fit: contain; } - + .note-book-card.type-image .note-book-content img, .note-book-card.type-text .note-book-content img, .note-book-card.type-canvas .note-book-content img { max-width: 100%; max-height: 100%; } - + .note-book-header { flex-grow: 0; } - + .note-list-wrapper { height: 100%; overflow: auto; } - + .note-expander { font-size: x-large; position: relative; top: 3px; cursor: pointer; } - + .note-list-pager { text-align: center; } - +
    - +
    - +
    `; diff --git a/src/public/app/widgets/buttons/global_menu.js b/src/public/app/widgets/buttons/global_menu.js index 9f01947ea..dc17cfbc5 100644 --- a/src/public/app/widgets/buttons/global_menu.js +++ b/src/public/app/widgets/buttons/global_menu.js @@ -16,16 +16,17 @@ const TPL = ` } .global-menu-button { - background-image: url("${window.glob.assetPath}/images/icon-black.png"); + background-image: url("${window.glob.assetPath}/images/icon-black.svg"); background-repeat: no-repeat; - background-position: 50% 45%; + background-position: 50% 80%; + background-size: 45px; width: 100%; height: 100%; position: relative; } .global-menu-button:hover { - background-image: url("${window.glob.assetPath}/images/icon-color.png"); + background-image: url("${window.glob.assetPath}/images/icon-color.svg"); border: 0; } diff --git a/src/public/app/widgets/icon_list.js b/src/public/app/widgets/icon_list.js index 1ad713b10..32fe21a95 100644 --- a/src/public/app/widgets/icon_list.js +++ b/src/public/app/widgets/icon_list.js @@ -11175,6 +11175,22 @@ const icons = [ } ]; +function getIconClass(icon) { + if (icon.type_of_icon === 'LOGO') { + return `bxl-${icon.name}`; + } + else if (icon.type_of_icon === 'SOLID') { + return `bxs-${icon.name}`; + } + else { + return `bx-${icon.name}`; + } +} + +for (const icon of icons) { + icon.className = getIconClass(icon); +} + export default { categories, icons diff --git a/src/public/app/widgets/note_icon.js b/src/public/app/widgets/note_icon.js index 20bdeed79..ba2bbb683 100644 --- a/src/public/app/widgets/note_icon.js +++ b/src/public/app/widgets/note_icon.js @@ -1,5 +1,6 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js"; import attributeService from "../services/attributes.js"; +import server from "../services/server.js"; const TPL = `