1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-27 20:29:45 +02:00

Compare commits

...

51 Commits

Author SHA1 Message Date
Laurent Cozic
83c791564a Android release v1.0.233 2019-01-10 19:14:32 +00:00
Laurent Cozic
65d0032995 Electron release v1.0.120 2019-01-10 19:04:35 +00:00
Laurent Cozic
37c4f99341 CLI v1.0.120 2019-01-10 19:00:42 +00:00
Laurent Cozic
adbc873b2a Update translations 2019-01-10 18:59:56 +00:00
Laurent Cozic
3567a57d6a Update for mac 2019-01-10 18:53:18 +00:00
Caleb John
b4e9fb157f Apply zoom and editorfont updates without needing to restart (#1109)
* Apply zoom and editorfont updates without needing to restart
fixes #1106

* Combine zoomRatio and editorFontSize into the theme cache
2019-01-10 18:34:58 +00:00
Helmut K. C. Tessarek
1be3646a04 fix PR template (#1114)
If someone does not delete the 'Attention' line, it will show up in the pull request.
Comments and information should be enclosed in comment markers.
2019-01-10 18:34:24 +00:00
Caleb John
46b82f877b replace markdown-it-katex with markdown-it-texmath, this makes using $ much better (#1116) 2019-01-10 18:33:49 +00:00
Helmut K. C. Tessarek
ef56eb4a52 fix markdown code for checked checkbox (#1113)
fixes #1067
2019-01-10 18:32:45 +00:00
Laurent Cozic
6989f9fd16 CLI: Fixes #1096: Fixed search function in terminal app 2019-01-10 19:25:21 +00:00
Laurent Cozic
7c3e8547de CLI: Fixes #1100: New folders were no longer being shown in list 2019-01-10 19:17:38 +00:00
Laurent Cozic
8268c3edba Desktop: Resolves #1059: Fixed behaviour of export to PDF and print 2019-01-10 18:58:58 +00:00
Laurent Cozic
a8cc8763b0 Android: Fixes #321: Removed dependency to Firebase 2019-01-10 18:49:26 +00:00
Laurent Cozic
09b4acf087 Merge branch 'master' of github.com:laurent22/joplin 2019-01-10 18:04:20 +00:00
Laurent Cozic
3b719ce53b Fixed keyword highlighting bug and other minor issues 2019-01-09 17:33:52 +00:00
Abijeet Patro
83281197f1 Adds functionality to toggle the notebooks and tags on the sidebar. (#1002)
* Adds functionality to toggle the notebooks and tags on the sidebar.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>

* Modified to not use an anonymous function.

Signed-off-by: abijeetpatro <abijeetpatro@gmail.com>

* Updated the code to be cleaner.

Signed-off-by: abijeet <abijeetpatro@gmail.com>
2019-01-09 17:25:44 +00:00
tfinnberg
ffda04f9b4 fixed file url issue (#1054) 2019-01-09 17:21:32 +00:00
Ikuya AWASHIRO
606893286a Update Japanese Translation. (#1102) 2019-01-09 17:16:49 +00:00
Laurent Cozic
075b71746a Update CONTRIBUTING.md 2019-01-09 17:07:43 +00:00
Laurent Cozic
01f1f3e957 Update PULL_REQUEST_TEMPLATE 2019-01-09 17:06:59 +00:00
Caleb John
88a9d5e802 Fix window manager icon on linux (#1110) 2019-01-09 17:05:28 +00:00
Laurent Cozic
7eebfae1c3 Updated pt_BR translation 2019-01-09 16:49:27 +00:00
Jacob Herrington
340fe76b8f Remove S (#1101)
Noticed this while reading!
2019-01-06 01:54:30 +01:00
Helmut K. C. Tessarek
e83678df3a Merge pull request #1098 from rasperepodvipodvert/patch-1
Update ru_RU translation
2019-01-04 18:07:09 -05:00
Helmut K. C. Tessarek
0bbbb49a31 Merge pull request #1079 from y-usuzumi/master
Update zh_CN translations
2019-01-04 18:06:23 -05:00
Ettore Atalan
0e61115857 Update de_DE.po (#1076)
* Update de_DE.po

Translated last untranslated strings and removed anglicisms.
2019-01-04 18:05:50 -05:00
Mats Estensen
8d3ac6f6fe Update Norwegian translation (#1061)
* Update norwegian translation

* correct plural words and some menu items

* update nb_NO
2019-01-04 18:05:13 -05:00
filatovzru
86e644be9a Добавил перевода 2019-01-04 20:32:59 +03:00
Laurent Cozic
30201249b5 Mobile: Fixes #1068: Handle case where notebook has a parent that no longer exists 2018-12-31 17:33:20 +01:00
Laurent Cozic
f308fe71f9 Mobile: Fixes #1082: Highlight correct keywords when doing a search 2018-12-29 18:24:02 +01:00
Laurent Cozic
5a00214fd2 Android release v1.0.232 2018-12-29 03:14:34 +01:00
Laurent Cozic
1b3e0f65e1 Mobile: Fixes #1057: Handle more cases where the title text field disappear 2018-12-29 03:12:23 +01:00
Laurent Cozic
7cfc537870 Android release v1.0.225 2018-12-28 21:42:58 +01:00
Laurent Cozic
53513db5b5 Mobile: Fixes #1066: Disable use of FTS when not present on device 2018-12-28 21:40:29 +01:00
Laurent Cozic
59402cf198 Android: Fixes #1062: Don t display Play Service alert when Play Service unavailable 2018-12-28 20:38:40 +01:00
Laurent Cozic
12efc02d91 Android release v1.0.224 2018-12-27 22:51:38 +01:00
Laurent Cozic
f38b907680 Mobile: Fixes #1057: Fix missing title field issue in Android 2018-12-27 22:49:19 +01:00
Laurent Cozic
8fcb46ca4a Revert "Revert "Upgrade React Native" - Fixes #1057"
This reverts commit 50ad4d05f2.
2018-12-27 20:14:20 +01:00
Kenneth Zhao
71ec9a193f Update zh_CN translations 2018-12-27 14:27:15 +08:00
Laurent Cozic
393a545548 Android release v1.0.201 2018-12-23 20:28:03 +01:00
Laurent Cozic
f88449fbb0 Android release v1.0.200 2018-12-23 20:18:24 +01:00
Laurent Cozic
50ad4d05f2 Revert "Upgrade React Native" - Fixes #1057
This reverts commit 32c02275a2.
2018-12-23 20:11:12 +01:00
Laurent Cozic
8d0e562c8a Android release v1.0.181 2018-12-20 14:58:35 +01:00
Laurent Cozic
c98e67c003 /bin/bash: qa: command not found 2018-12-20 14:53:10 +01:00
Laurent Cozic
5565538b80 Android: Trying to get notifications to work in Android 8.x 2018-12-20 14:52:56 +01:00
Helmut K. C. Tessarek
958979e1d7 CLI v1.0.119 2018-12-19 11:13:18 +01:00
Laurent Cozic
685845e097 Update website 2018-12-17 23:47:35 +01:00
Laurent Cozic
3813f9e417 Clipper release v1.0.8 2018-12-17 23:42:13 +01:00
Laurent Cozic
40cf3fb4d0 Android release v1.0.179 2018-12-17 23:25:21 +01:00
Laurent Cozic
3f88b16603 iOS v10.0.27 2018-12-17 23:12:35 +01:00
Laurent Cozic
32c02275a2 Upgrade React Native 2018-12-17 23:11:53 +01:00
116 changed files with 1981 additions and 1874 deletions

View File

@@ -1,3 +1,7 @@
**IMPORTANT:** At the moment pull requests for new features are no longer being accepted. More info there: https://github.com/laurent22/joplin/issues/1112
* * *
# User support
For general discussion about Joplin, user support, software development questions, and to discuss new features, please go to the [Joplin Forum](https://discourse.joplin.cozic.net/). It is possible to login with your GitHub account.

View File

@@ -41,6 +41,7 @@ class Command extends BaseCommand {
title: pattern,
query_pattern: pattern,
query_folder_id: folder ? folder.id : '',
basic_search: true,
type_: BaseModel.TYPE_SEARCH,
},
});

View File

@@ -139,7 +139,8 @@ class FolderListWidget extends ListWidget {
const orderFolders = (parentId) => {
for (let i = 0; i < this.folders.length; i++) {
const f = this.folders[i];
if (f.parent_id === parentId) {
const folderParentId = f.parent_id ? f.parent_id : '';
if (folderParentId === parentId) {
newItems.push(f);
if (this.folderHasChildren_(this.folders, f.id)) orderFolders(f.id);
}

View File

@@ -1665,9 +1665,24 @@ msgstr ""
msgid "Joplin website"
msgstr "Lloc web del Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Lloc web del Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Per suprimir: %d"
msgid "Login with Dropbox"
msgstr "Inicia sessió amb Dropbox"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Clau mestra %s"

View File

@@ -1634,10 +1634,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Web Joplinu"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Web Joplinu"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "K smazání: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Přihlásit se pomocí OneDrive"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Master heslo %s"

View File

@@ -1643,10 +1643,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin hjemmeside"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin hjemmeside"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Til sletning: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Log på med OneDrive"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Hoved nøgle %s"

View File

@@ -472,10 +472,10 @@ msgid "Starting synchronisation..."
msgstr "Starte Synchronisation..."
msgid "Downloading resources..."
msgstr ""
msgstr "Lade Anhänge herunter..."
msgid "Cancelling... Please wait."
msgstr "Abbrechen Bitte warten."
msgstr "Abbrechen... Bitte warten."
msgid ""
"<tag-command> can be \"add\", \"remove\" or \"list\" to assign or remove "
@@ -600,7 +600,7 @@ msgstr "Exportiere „%s“ ins „%s“ Format. Bitte warten..."
#, javascript-format
msgid "Importing from \"%s\" as \"%s\" format. Please wait..."
msgstr "Importiere „%s“ ins „%s“ Format. Bitte warten"
msgstr "Importiere „%s“ ins „%s“ Format. Bitte warten..."
msgid "PDF File"
msgstr "PDF-Datei"
@@ -671,7 +671,7 @@ msgid "View"
msgstr "Ansicht"
msgid "Toggle sidebar"
msgstr "Seitenleiste ein/aus"
msgstr "Seitenleiste umschalten"
msgid "Toggle editor layout"
msgstr "Editor-Layout umschalten"
@@ -701,7 +701,7 @@ msgid "Make a donation"
msgstr "Spenden"
msgid "Check for updates..."
msgstr "Überprüfe auf Updates…"
msgstr "Überprüfe auf Aktualisierungen..."
msgid "About Joplin"
msgstr "Über Joplin"
@@ -724,10 +724,11 @@ msgid "Cancel"
msgstr "Abbrechen"
msgid "Current version is up-to-date."
msgstr "Die aktuelle Version ist up-to-date."
msgstr "Die aktuelle Version ist auf dem neuesten Stand."
msgid "An update is available, do you want to download it now?"
msgstr "Es ist ein Update verfügbar. Soll es jetzt heruntergeladen werden?"
msgstr ""
"Es ist eine Aktualisierung verfügbar. Soll sie jetzt heruntergeladen werden?"
msgid "Yes"
msgstr "Ja"
@@ -883,7 +884,7 @@ msgstr ""
"Notizbücher ursprünglich verschlüsselt wurden."
msgid "Missing Master Keys"
msgstr "Fehlender Hauptschlüssel"
msgstr "Fehlende Hauptschlüssel"
msgid ""
"The master keys with these IDs are used to encrypt some of your items, "
@@ -965,7 +966,7 @@ msgstr "Duplizieren"
#, javascript-format
msgid "%s - Copy"
msgstr "%s kopieren"
msgstr "%s - Kopieren"
msgid "Switch between note and to-do type"
msgstr "Zwischen Notiz und To-Do Typ wechseln"
@@ -1575,10 +1576,10 @@ msgid "On %s: %s"
msgstr "Auf %s: %s"
msgid "Permission to use camera"
msgstr ""
msgstr "Berechtigung zur Verwendung der Kamera"
msgid "Your permission to use your camera is required."
msgstr ""
msgstr "Deine Zustimmung zur Verwendung deiner Kamera ist erforderlich."
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr ""
@@ -1691,9 +1692,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Website von Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Website von Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Zu löschen: %d"
msgid "Login with Dropbox"
msgstr "Mit Dropbox anmelden"
#, fuzzy
msgid "Enter code here"
msgstr "Zum Terminal-Modus wechseln"
#, javascript-format
msgid "Master Key %s"
msgstr "Hauptschlüssel %s"
@@ -1775,7 +1792,7 @@ msgid "View on map"
msgstr "Auf der Karte anzeigen"
msgid "Go to source URL"
msgstr ""
msgstr "Zur Quell-URL gehen"
msgid "Delete notebook"
msgstr "Notizbuch löschen"
@@ -1845,9 +1862,6 @@ msgstr "Willkommen"
#~ msgid "Give focus to previous pane"
#~ msgstr "Das vorherige Fenster fokussieren"
#~ msgid "Enter command line mode"
#~ msgstr "Zum Terminal-Modus wechseln"
#~ msgid "Exit command line mode"
#~ msgstr "Den Terminal-Modus verlassen"

View File

@@ -1514,9 +1514,24 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
#, javascript-format
msgid "FTS enabled: %d"
msgstr ""
msgid "Login with Dropbox"
msgstr ""
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""

View File

@@ -1663,9 +1663,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Sitio web de Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Sitio web de Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Borrar: %d"
msgid "Login with Dropbox"
msgstr "Acceder con Dropbox"
#, fuzzy
msgid "Enter code here"
msgstr "Entrar en modo línea de comandos"
#, javascript-format
msgid "Master Key %s"
msgstr "Clave maestra %s"
@@ -1822,9 +1838,6 @@ msgstr "Bienvenido"
#~ msgid "Give focus to previous pane"
#~ msgstr "Enfocar el panel anterior"
#~ msgid "Enter command line mode"
#~ msgstr "Entrar en modo línea de comandos"
#~ msgid "Exit command line mode"
#~ msgstr "Salir del modo línea de comandos"

View File

@@ -1664,10 +1664,26 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Ezabatzeko: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Login with OneDrive"
#, fuzzy
msgid "Enter code here"
msgstr "Sartu komando-lerro moduan "
#, javascript-format
msgid "Master Key %s"
msgstr "Pasahitz Nagusia %s"
@@ -1814,9 +1830,6 @@ msgstr "Ongi etorri!"
#~ msgid "Give focus to previous pane"
#~ msgstr "Eraman fokua aurreko panelera"
#~ msgid "Enter command line mode"
#~ msgstr "Sartu komando-lerro moduan "
#~ msgid "Exit command line mode"
#~ msgstr "Irten komando-lerro modutik"

View File

@@ -1673,9 +1673,24 @@ msgstr "- Position : Pour attacher à une note les coordonnées GPS."
msgid "Joplin website"
msgstr "Site web de Joplin"
#, javascript-format
msgid "Joplin v%s"
msgstr "Joplin v%s"
#, javascript-format
msgid "Database v%s"
msgstr "Base de données v%s"
#, javascript-format
msgid "FTS enabled: %d"
msgstr "FTS activé : %d"
msgid "Login with Dropbox"
msgstr "Se connecter à Dropbox"
msgid "Enter code here"
msgstr "Entrez le code ici"
#, javascript-format
msgid "Master Key %s"
msgstr "Clef maître %s"
@@ -1832,9 +1847,6 @@ msgstr "Bienvenue"
#~ msgid "Give focus to previous pane"
#~ msgstr "Activer le volet précédent"
#~ msgid "Enter command line mode"
#~ msgstr "Démarrer le mode de ligne de commande"
#~ msgid "Exit command line mode"
#~ msgstr "Sortir du mode de ligne de commande"

View File

@@ -1642,10 +1642,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Sitio web de Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Sitio web de Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Borrar: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Acceder con OneDrive"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Chave mestra %s"

View File

@@ -1639,10 +1639,26 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Za brisanje: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Prijavi se u OneDrive"
#, fuzzy
msgid "Enter code here"
msgstr "Otvori naredbeni redak"
#, javascript-format
msgid "Master Key %s"
msgstr ""
@@ -1789,9 +1805,6 @@ msgstr "Dobro došli"
#~ msgid "Give focus to previous pane"
#~ msgstr "Fokusiraj prethodno okno"
#~ msgid "Enter command line mode"
#~ msgstr "Otvori naredbeni redak"
#~ msgid "Exit command line mode"
#~ msgstr "Napusti naredbeni redak"

View File

@@ -1663,9 +1663,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Siro web Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Siro web Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Da cancellare: %d"
msgid "Login with Dropbox"
msgstr "Login Dropbox"
#, fuzzy
msgid "Enter code here"
msgstr "Accedi alla modalità linea di comando"
#, javascript-format
msgid "Master Key %s"
msgstr "Chiave Master %s"
@@ -1829,9 +1845,6 @@ msgstr "Benvenuto"
#~ msgid "Give focus to previous pane"
#~ msgstr "Pannello precedente"
#~ msgid "Enter command line mode"
#~ msgstr "Accedi alla modalità linea di comando"
#~ msgid "Exit command line mode"
#~ msgstr "Esci dalla modalità linea di comando"

View File

@@ -236,7 +236,7 @@ msgstr ""
"ムを参照できます。"
msgid "To move from one pane to another, press Tab or Shift+Tab."
msgstr "ペイン間を移動するには、TabかShift+Tabをしてください。"
msgstr "ペイン間を移動するには、TabかShift+Tabをしてください。"
msgid ""
"Use the arrows and page up/down to scroll the lists and text areas "
@@ -446,7 +446,7 @@ msgid "Starting synchronisation..."
msgstr "同期を開始中..."
msgid "Downloading resources..."
msgstr ""
msgstr "リソースをダウンロード中..."
msgid "Cancelling... Please wait."
msgstr "中止中...お待ちください。"
@@ -618,9 +618,8 @@ msgstr "切り取り"
msgid "Paste"
msgstr "貼り付け"
#, fuzzy
msgid "Select all"
msgstr "日付の選択"
msgstr "すべて選択"
msgid "Bold"
msgstr "太字"
@@ -637,9 +636,8 @@ msgstr "外部エディターで編集"
msgid "Search in all the notes"
msgstr "すべてのノートを検索"
#, fuzzy
msgid "Search in current note"
msgstr "すべてのノートを検索"
msgstr "現在のノートを検索"
msgid "View"
msgstr "表示"
@@ -710,7 +708,7 @@ msgid "No"
msgstr "No"
msgid "Token has been copied to the clipboard!"
msgstr ""
msgstr "トークンをクリップボードにコピーしました!"
msgid "The web clipper service is enabled and set to auto-start."
msgstr "Webクリッパーサービスは有効で、自動起動します。"
@@ -760,20 +758,21 @@ msgstr "ステップ2: 拡張機能のインストール"
msgid "Download and install the relevant extension for your browser:"
msgstr "関連する拡張機能をブラウザーにインストールします:"
#, fuzzy
msgid "Advanced options"
msgstr "詳細な設定の表示"
msgstr "詳細な設定"
msgid "Authorisation token:"
msgstr ""
msgstr "認証するトークン:"
msgid "Copy token"
msgstr ""
msgstr "トークンのコピー"
msgid ""
"This authorisation token is only needed to allow third-party applications to "
"access Joplin."
msgstr ""
"この認証トークンはサードパーティアプリケーションがJoplinにアクセスするためだ"
"けに必要です。"
msgid "Check synchronisation configuration"
msgstr "同期の設定を確認する"
@@ -938,13 +937,11 @@ msgstr "%s - コピー"
msgid "Switch between note and to-do type"
msgstr "ノートとToDoを切り替え"
#, fuzzy
msgid "Switch to note type"
msgstr "ノートとToDoを切り替え"
msgstr "ノート切り替え"
#, fuzzy
msgid "Switch to to-do type"
msgstr "ノートとToDo切り替え"
msgstr "ToDo切り替え"
msgid "Copy Markdown link"
msgstr "Markdownのリンクをコピー"
@@ -963,13 +960,13 @@ msgid ""
msgstr "ノートブックがありません。新しいノートブックを作成してください。"
msgid "Location"
msgstr ""
msgstr "場所"
msgid "URL"
msgstr ""
msgstr "URL"
msgid "Note properties"
msgstr ""
msgstr "ノートのプロパティ"
msgid "Open..."
msgstr "開く..."
@@ -988,7 +985,7 @@ msgid "Copy Link Address"
msgstr "リンクアドレスをコピー"
msgid "This attachment is not downloaded or not decrypted yet."
msgstr ""
msgstr "この添付ファイルはダウンロードできないか、まだ復号できません。"
#, javascript-format
msgid "Unsupported link or message: %s"
@@ -1015,7 +1012,7 @@ msgid "Insert Hyperlink"
msgstr "ハイパーリンクの挿入"
msgid "Attach file"
msgstr "ファイルを添付"
msgstr "ファイルを添付する"
msgid "Tags"
msgstr "タグ"
@@ -1107,9 +1104,9 @@ msgstr "ノートブック"
msgid "Decrypting items: %d/%d"
msgstr "復号中のアイテム: %d/%d"
#, fuzzy, javascript-format
#, javascript-format
msgid "Fetching resources: %d"
msgstr "リソース: %d."
msgstr "取得中のリソース: %d"
msgid "Please select where the sync status should be exported to"
msgstr "同期状況の出力先を選択してください"
@@ -1320,6 +1317,8 @@ msgid ""
"this setting so that your notes are constantly being synchronised, thus "
"reducing the number of conflicts."
msgstr ""
"有効にすると、Joplinがバックグラウンドで動作するようになります。ノートを定期"
"的に同期し、衝突を減らすために強くおすすめする設定です。"
msgid "Start application minimised in the tray icon"
msgstr "アプリケーションをトレイアンコンで最小化して起動"
@@ -1327,9 +1326,8 @@ msgstr "アプリケーションをトレイアンコンで最小化して起動
msgid "Global zoom percentage"
msgstr "全体ズームの割合"
#, fuzzy
msgid "Editor font size"
msgstr "エディターのフォントファミリー"
msgstr "エディターのフォントサイズ"
msgid "Editor font family"
msgstr "エディターのフォントファミリー"
@@ -1342,7 +1340,7 @@ msgstr ""
"誤っているか空の場合は、一般的な等幅フォントが指定されるでしょう。"
msgid "Automatically update the application"
msgstr "アプリケーション自動更新"
msgstr "アプリケーション自動的にアップデート"
msgid "Synchronisation interval"
msgstr "同期間隔"
@@ -1457,9 +1455,8 @@ msgstr "Joplin エクスポートディレクトリ"
msgid "Evernote Export File"
msgstr "Evernote エクスポートファイル"
#, fuzzy
msgid "Json Export Directory"
msgstr "Joplin エクスポートディレクトリ"
msgstr "Json エクスポートディレクトリ"
msgid "Directory"
msgstr "ディレクトリ"
@@ -1536,10 +1533,10 @@ msgid "On %s: %s"
msgstr "日時 %s: %s"
msgid "Permission to use camera"
msgstr ""
msgstr "カメラ使用の許可"
msgid "Your permission to use your camera is required."
msgstr ""
msgstr "カメラを使用するには権限が必要です。"
msgid "There are currently no notes. Create one by clicking on the (+) button."
msgstr "ノートがありません。(+)ボタンを押して新しいノートを作成してください。"
@@ -1569,9 +1566,8 @@ msgstr "%d個のノートを\"%s\"に移動しますか?"
msgid "Press to set the decryption password."
msgstr "復号するパスワードを入力してください。"
#, fuzzy
msgid "Clear alarm"
msgstr "アラームをセット"
msgstr "アラームをクリア"
msgid "Save alarm"
msgstr "アラームの保存"
@@ -1585,22 +1581,21 @@ msgstr "確認"
msgid "Cancel synchronisation"
msgstr "同期の中止"
#, fuzzy
msgid "Checking... Please wait."
msgstr "中止中...お待ちください。"
msgstr "確認中...お待ちください。"
#, fuzzy
msgid "Success! Synchronisation configuration appears to be correct."
msgstr "同期の設定を確認する"
msgstr "成功です! 同期の設定は正しいようです。"
msgid ""
"Error. Please check that URL, username, password, etc. are correct and that "
"the sync target is accessible. The reported error was:"
msgstr ""
"エラーです。URL、ユーザー名、パスワードなどを修正し、同期するターゲットにアク"
"セスできるかを確認してください。次が報告されたエラーです:"
#, fuzzy
msgid "The application has been authorised!"
msgstr "アプリケーションは問題なく認証されました"
msgstr "アプリケーションは問題なく認証されました"
#, javascript-format
msgid ""
@@ -1610,10 +1605,15 @@ msgid ""
"\n"
"Please try again."
msgstr ""
"アプリケーションが認証できません:\n"
"\n"
"%s\n"
"\n"
"やり直してください。"
#, fuzzy, javascript-format
#, javascript-format
msgid "Decrypted items: %s / %s"
msgstr "復号中のアイテム: %d/%d"
msgstr "復号中のアイテム: %s/%s"
msgid "New tags:"
msgstr "新しいタグ:"
@@ -1644,9 +1644,25 @@ msgstr "- 位置情報: ノートに位置情報を添付するのに必要で
msgid "Joplin website"
msgstr "JoplinのWebサイト"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "JoplinのWebサイト"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "削除予定: %d"
msgid "Login with Dropbox"
msgstr "Dropboxでログイン"
#, fuzzy
msgid "Enter code here"
msgstr "コマンドラインモードに入る"
#, javascript-format
msgid "Master Key %s"
msgstr "マスターキー %s"
@@ -1698,9 +1714,8 @@ msgstr "Joplinモバイルアプリは次のタイプのリンクをまだサポ
msgid "Unsupported image type: %s"
msgstr "サポートされていない画像の形式: %s"
#, fuzzy
msgid "Take photo"
msgstr "写真を添付"
msgstr "写真を撮影する"
msgid "Attach photo"
msgstr "写真を添付"
@@ -1727,7 +1742,7 @@ msgid "View on map"
msgstr "地図上に表示"
msgid "Go to source URL"
msgstr ""
msgstr "ソースURLに行く"
msgid "Delete notebook"
msgstr "ノートブックを削除"
@@ -1793,9 +1808,6 @@ msgstr "ようこそ"
#~ msgid "Give focus to previous pane"
#~ msgstr "前のペインへ"
#~ msgid "Enter command line mode"
#~ msgstr "コマンドラインモードに入る"
#~ msgid "Exit command line mode"
#~ msgstr "コマンドラインモードの終了"

View File

@@ -1514,9 +1514,24 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
#, javascript-format
msgid "FTS enabled: %d"
msgstr ""
msgid "Login with Dropbox"
msgstr ""
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""

View File

@@ -1634,9 +1634,24 @@ msgstr "- 위치: 지리적 위치 정보를 노트에 첨부하기 위해서
msgid "Joplin website"
msgstr "조플린 웹사이트"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "조플린 웹사이트"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "삭제: %d"
msgid "Login with Dropbox"
msgstr "Dropbox로 로그인"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "관리자 키 %s"

View File

@@ -1,13 +1,13 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Laurent Cozic
# This file is distributed under the same license as the Joplin-CLI package.
# Mats Estensen <matsest@mxe.no>, 2018
# Mats Estensen <code@mxe.no>, 2018
#
msgid ""
msgstr ""
"Project-Id-Version: Joplin-CLI 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Mats Estensen <matsest@mxe.no>\n"
"Last-Translator: Mats Estensen <code@mxe.no>\n"
"Language-Team: \n"
"Language: nb_NO\n"
"MIME-Version: 1.0\n"
@@ -602,7 +602,7 @@ msgid "Export"
msgstr "Eksport"
msgid "Print"
msgstr "Skriv Ut"
msgstr "Skriv ut"
#, javascript-format
msgid "Hide %s"
@@ -624,7 +624,7 @@ msgid "Paste"
msgstr "Lim inn"
msgid "Select all"
msgstr "Velg alle"
msgstr "Marker alt"
msgid "Bold"
msgstr "Fet"
@@ -643,7 +643,7 @@ msgstr "Søk i alle notater"
#, fuzzy
msgid "Search in current note"
msgstr "Søk i alle notater"
msgstr "Søk i nåværende notat"
msgid "View"
msgstr "Utseende"
@@ -693,7 +693,7 @@ msgid "Open %s"
msgstr "Åpne %s"
msgid "Exit"
msgstr "Gå ut"
msgstr "Avslutt"
msgid "OK"
msgstr "OK"
@@ -1024,7 +1024,7 @@ msgid "Attach file"
msgstr "Legg ved fil"
msgid "Tags"
msgstr "Merkelapp"
msgstr "Merkelapper"
msgid "Set alarm"
msgstr "Angi alarm"
@@ -1302,7 +1302,7 @@ msgid "Save geo-location with notes"
msgstr "Lagre stedsinformasjon med notater"
msgid "When creating a new to-do:"
msgstr "Når nytt gjøre mål opprettes:"
msgstr "Når nytt gjøremål opprettes:"
msgid "Focus title"
msgstr "Fokuser på tittel"
@@ -1336,7 +1336,7 @@ msgstr "Global forstørrelse"
#, fuzzy
msgid "Editor font size"
msgstr "Editor skrifttype"
msgstr "Editor skriftstørrelse"
msgid "Editor font family"
msgstr "Editor skrifttype"
@@ -1454,19 +1454,19 @@ msgid "The tag \"%s\" already exists. Please choose a different name."
msgstr "Merkelappen \"%s\" eksiterer allerede. Vennligst velg et annet navn."
msgid "Joplin Export File"
msgstr "Joplin Eksporter Fil"
msgstr "Joplin-eksportert fil"
msgid "Markdown"
msgstr "Markdown"
msgid "Joplin Export Directory"
msgstr "Joplin Eksporter Katalog"
msgstr "Joplin-eksportert katalog"
msgid "Evernote Export File"
msgstr "Evernote Eksporter Fil"
msgstr "Evernote-eksportert fil"
msgid "Json Export Directory"
msgstr "Json Eksporter Katalog"
msgstr "Json-eksportert katalog"
msgid "Directory"
msgstr "Katalog"
@@ -1654,9 +1654,24 @@ msgstr "- Sted: for å legge ved stedsinformation til notatet."
msgid "Joplin website"
msgstr "Joplins nettsted"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplins nettsted"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Slettes: %d"
msgid "Login with Dropbox"
msgstr "Innlogging med Dropbox"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Masternøkkel: %s"
@@ -1710,7 +1725,7 @@ msgstr "Bildetypen er ikke støttet: %s"
#, fuzzy
msgid "Take photo"
msgstr "Legg ved et bilde"
msgstr "Ta et bilde"
msgid "Attach photo"
msgstr "Legg ved et bilde"

View File

@@ -1666,10 +1666,26 @@ msgstr ""
msgid "Joplin website"
msgstr ""
#, javascript-format
msgid "Joplin v%s"
msgstr ""
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Verwijderen: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Log in met OneDrive"
#, fuzzy
msgid "Enter code here"
msgstr "Ga naar command line modus"
#, javascript-format
msgid "Master Key %s"
msgstr "Hoofdsleutel: %s"
@@ -1818,9 +1834,6 @@ msgstr "Welkom"
#~ msgid "Give focus to previous pane"
#~ msgstr "Focus op het vorige paneel"
#~ msgid "Enter command line mode"
#~ msgstr "Ga naar command line modus"
#~ msgid "Exit command line mode"
#~ msgstr "Ga uit command line modus"

View File

@@ -1670,9 +1670,24 @@ msgstr "- Locatie: zodat je locatie-informatie kunt toevoegen aan een notitie."
msgid "Joplin website"
msgstr "Joplin-website"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin-website"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Te verwijderen: %d"
msgid "Login with Dropbox"
msgstr "Inloggen met Dropbox"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Hoofdsleutel %s"

View File

@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2\n"
"X-Generator: Poedit 2.0.7\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "To delete a tag, untag the associated notes."
@@ -647,9 +647,8 @@ msgstr "Editar com editor externo"
msgid "Search in all the notes"
msgstr "Pesquisar em todas as notas"
#, fuzzy
msgid "Search in current note"
msgstr "Pesquisar em todas as notas"
msgstr "Pesquisar na nota atual"
msgid "View"
msgstr "Visualizar"
@@ -1260,7 +1259,7 @@ msgid "title"
msgstr "título"
msgid "updated date"
msgstr "data de ataualização"
msgstr "data de atualização"
msgid "created date"
msgstr "data de criação"
@@ -1342,9 +1341,8 @@ msgstr "Iniciar aplicativo minimizado na barra de tarefas"
msgid "Global zoom percentage"
msgstr "Porcentagem global do zoom"
#, fuzzy
msgid "Editor font size"
msgstr "Família de fontes do editor"
msgstr "Tamanho da fonte no Editor"
msgid "Editor font family"
msgstr "Família de fontes do editor"
@@ -1668,9 +1666,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Site do Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Site do Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Para excluir: %d"
msgid "Login with Dropbox"
msgstr "Login com Dropbox"
#, fuzzy
msgid "Enter code here"
msgstr "Entrar no modo de linha de comando"
#, javascript-format
msgid "Master Key %s"
msgstr "Chave Master %s"
@@ -1722,9 +1736,8 @@ msgstr "O app mobile do Joplin não suporta, atualmente, esse tipo de link: %s"
msgid "Unsupported image type: %s"
msgstr "Tipo de imagem não suportada: %s"
#, fuzzy
msgid "Take photo"
msgstr "Anexar foto"
msgstr "Tirar foto"
msgid "Attach photo"
msgstr "Anexar foto"
@@ -1818,9 +1831,6 @@ msgstr "Bem-vindo"
#~ msgid "Give focus to previous pane"
#~ msgstr "Dar o foco para o painel anterior"
#~ msgid "Enter command line mode"
#~ msgstr "Entrar no modo de linha de comando"
#~ msgid "Exit command line mode"
#~ msgstr "Sair do modo de linha de comando"

View File

@@ -1535,9 +1535,24 @@ msgstr ""
msgid "Joplin website"
msgstr "Website Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Website Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "De șters: %d"
msgid "Login with Dropbox"
msgstr "Autentificați-vă cu Dropbox"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr ""

View File

@@ -657,7 +657,7 @@ msgid "View"
msgstr "Вид"
msgid "Toggle sidebar"
msgstr ""
msgstr "Переключить панель"
msgid "Toggle editor layout"
msgstr "Переключить вид редактора"
@@ -669,7 +669,7 @@ msgid "Synchronisation status"
msgstr "Статус синхронизации"
msgid "Web clipper options"
msgstr ""
msgstr "Настройки веб-клиппера"
msgid "Encryption options"
msgstr "Настройки шифрования"
@@ -725,7 +725,7 @@ msgid "Token has been copied to the clipboard!"
msgstr ""
msgid "The web clipper service is enabled and set to auto-start."
msgstr ""
msgstr "Веб-клиппер включен"
#, javascript-format
msgid "Status: Started on port %d"
@@ -736,13 +736,13 @@ msgid "Status: %s"
msgstr "Статус: «%s»."
msgid "Disable Web Clipper Service"
msgstr ""
msgstr "Выключить веб-клиппер"
msgid "The web clipper service is not enabled."
msgstr ""
msgstr "Веб-клиппер остановлен"
msgid "Enable Web Clipper Service"
msgstr ""
msgstr "Включить веб-клиппер"
msgid ""
"Joplin Web Clipper allows saving web pages and screenshots from your browser "
@@ -753,7 +753,7 @@ msgid "In order to use the web clipper, you need to do the following:"
msgstr ""
msgid "Step 1: Enable the clipper service"
msgstr ""
msgstr "Шаг 1: включить веб-клиппер"
msgid ""
"This service allows the browser extension to communicate with Joplin. When "
@@ -762,20 +762,20 @@ msgid ""
msgstr ""
msgid "Step 2: Install the extension"
msgstr ""
msgstr "Шаг 2: установить расширение"
msgid "Download and install the relevant extension for your browser:"
msgstr ""
msgstr "Скачайте и установите расширение для вашего браузера"
#, fuzzy
msgid "Advanced options"
msgstr "Показывать расширенные настройки"
msgid "Authorisation token:"
msgstr ""
msgstr "Токен авторизации"
msgid "Copy token"
msgstr ""
msgstr "Скопировать токен"
msgid ""
"This authorisation token is only needed to allow third-party applications to "
@@ -790,10 +790,10 @@ msgid "Notes and settings are stored in: %s"
msgstr "Заметки и настройки сохранены в: %s"
msgid "Apply"
msgstr ""
msgstr "Применить"
msgid "Submit"
msgstr ""
msgstr "Отправить"
msgid "Save"
msgstr "Сохранить"
@@ -1653,10 +1653,26 @@ msgstr ""
msgid "Joplin website"
msgstr "Сайт Joplin"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Сайт Joplin"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "К удалению: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Войти в OneDrive"
#, fuzzy
msgid "Enter code here"
msgstr "Войти в режим командной строки"
#, javascript-format
msgid "Master Key %s"
msgstr "Мастер-ключ %s"
@@ -1802,9 +1818,6 @@ msgstr "Добро пожаловать"
#~ msgid "Give focus to previous pane"
#~ msgstr "Переключиться на предыдущую панель"
#~ msgid "Enter command line mode"
#~ msgstr "Войти в режим командной строки"
#~ msgid "Exit command line mode"
#~ msgstr "Выйти из режима командной строки"

View File

@@ -1656,10 +1656,25 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin spletna stran"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin spletna stran"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "Za izbris: %d"
#, fuzzy
msgid "Login with Dropbox"
msgstr "Prijavi se z OneDrive"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Glavno geslo %s"

View File

@@ -1672,9 +1672,24 @@ msgstr ""
msgid "Joplin website"
msgstr "Joplin-webbplats"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin-webbplats"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "För att ta bort: %d"
msgid "Login with Dropbox"
msgstr "Logga in med Dropbox"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "Huvudnyckel %s"

View File

@@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Laurent Cozic
# This file is distributed under the same license as the Joplin-CLI package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# Yukio Usuzumi <anohigisavay@gmail.com>, 2018.
#
msgid ""
msgstr ""
@@ -19,7 +19,7 @@ msgid "To delete a tag, untag the associated notes."
msgstr "移除相关笔记的标签后才可删除此标签。"
msgid "Please select the note or notebook to be deleted first."
msgstr "请选择最先删除的笔记或笔记本。"
msgstr "请选择需要删除的笔记或笔记本。"
msgid "Press Ctrl+D or type \"exit\" to exit the application"
msgstr "按 Ctrl+D 或输入 \"exit\" 退出程序"
@@ -32,7 +32,7 @@ msgid "No notebook selected."
msgstr "未选择笔记本。"
msgid "No notebook has been specified."
msgstr "指定笔记本。"
msgstr "指定笔记本。"
msgid "Y"
msgstr "是"
@@ -47,7 +47,7 @@ msgid "y"
msgstr "是"
msgid "Cancelling background synchronisation... Please wait."
msgstr "正在取消后台同步... 请稍。"
msgstr "正在取消后台同步... 请稍。"
#, javascript-format
msgid "No such command: %s"
@@ -1275,7 +1275,7 @@ msgid "Show tray icon"
msgstr "显示托盘图标"
msgid "Note: Does not work in all desktop environments."
msgstr "注意:在所有的桌面环境中都不能工作。"
msgstr "注意:在某些桌面环境下可能无法正常工作。"
msgid ""
"This will allow Joplin to run in the background. It is recommended to enable "
@@ -1606,9 +1606,24 @@ msgstr "- 定位:允许将地理位置信息附加到一条笔记中。"
msgid "Joplin website"
msgstr "Joplin 官网"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin 官网"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "将删除:%d条"
msgid "Login with Dropbox"
msgstr "通过 Dropbox 登录"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "主密码 %s"

View File

@@ -1594,9 +1594,24 @@ msgstr "- 位置: 允許將地理位置資訊附加到筆記。"
msgid "Joplin website"
msgstr "Joplin 官方網站"
#, fuzzy, javascript-format
msgid "Joplin v%s"
msgstr "Joplin 官方網站"
#, javascript-format
msgid "Database v%s"
msgstr ""
#, fuzzy, javascript-format
msgid "FTS enabled: %d"
msgstr "標示刪除: %d"
msgid "Login with Dropbox"
msgstr "以 Dropbox 登錄"
msgid "Enter code here"
msgstr ""
#, javascript-format
msgid "Master Key %s"
msgstr "主密碼 %s"

View File

@@ -1,6 +1,6 @@
{
"name": "joplin",
"version": "1.0.118",
"version": "1.0.120",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -19,7 +19,7 @@
],
"owner": "Laurent Cozic"
},
"version": "1.0.118",
"version": "1.0.120",
"bin": {
"joplin": "./main.js"
},

View File

@@ -0,0 +1,44 @@
require('app-module-path').addPath(__dirname);
const { time } = require('lib/time-utils.js');
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js');
const StringUtils = require('lib/string-utils');
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
describe('StringUtils', function() {
beforeEach(async (done) => {
done();
});
it('should surround keywords with strings', async (done) => {
const testCases = [
[['test'], 'test', 'a', 'b', 'atestb'],
[['test'], 'Test', 'a', 'b', 'aTestb'],
[['te[]st'], 'Te[]st', 'a', 'b', 'aTe[]stb'],
[['test1', 'test2'], 'bla test1 blabla test1 bla test2 not this one - test22', 'a', 'b', 'bla atest1b blabla atest1b bla atest2b not this one - test22'],
[['test1', 'test2'], 'bla test1 test1 bla test2', '<span class="highlighted-keyword">', '</span>', 'bla <span class="highlighted-keyword">test1</span> <span class="highlighted-keyword">test1</span> bla <span class="highlighted-keyword">test2</span>'],
[[{ type:'regex', value:'test.*?'}], 'bla test1 test1 bla test2 test tttest', 'a', 'b', 'bla atest1b atest1b bla atest2b atestb tttest'],
];
for (let i = 0; i < testCases.length; i++) {
const t = testCases[i];
const keywords = t[0];
const input = t[1];
const prefix = t[2];
const suffix = t[3];
const expected = t[4];
const actual = StringUtils.surroundKeywords(keywords, input, prefix, suffix);
expect(actual).toBe(expected);
}
done();
});
});

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Joplin Web Clipper [DEV]",
"version": "1.0.7",
"version": "1.0.8",
"description": "Capture and save web pages and screenshots from your browser to Joplin.",
"homepage_url": "https://joplin.cozic.net",
"icons": {

View File

@@ -58,7 +58,7 @@ class ElectronAppWrapper {
// Linux icon workaround for bug https://github.com/electron-userland/electron-builder/issues/2098
// Fix: https://github.com/electron-userland/electron-builder/issues/2269
if (shim.isLinux()) windowOptions.icon = __dirname + '/build/icons/128x128.png';
if (shim.isLinux()) windowOptions.icon = path.join(__dirname, '..', 'build/icons/128x128.png');
require('electron-context-menu')({
shouldShowMenu: (event, params) => {
@@ -231,4 +231,4 @@ class ElectronAppWrapper {
}
module.exports = { ElectronAppWrapper };
module.exports = { ElectronAppWrapper };

View File

@@ -155,12 +155,14 @@ class NoteListComponent extends React.Component {
}}));
}
exportMenu.append(new MenuItem({ label: 'PDF - ' + _('PDF File') , click: () => {
this.props.dispatch({
type: 'WINDOW_COMMAND',
name: 'exportPdf',
});
}}));
if (noteIds.length === 1) {
exportMenu.append(new MenuItem({ label: 'PDF - ' + _('PDF File') , click: () => {
this.props.dispatch({
type: 'WINDOW_COMMAND',
name: 'exportPdf',
});
}}));
}
const exportMenuItem = new MenuItem({label: _('Export'), submenu: exportMenu});

View File

@@ -909,24 +909,28 @@ class NoteTextComponent extends React.Component {
}
async doCommand(command) {
if (!command || !this.state.note) return;
if (!command) return;
let fn = null;
if (command.name === 'exportPdf' && this.webview_) {
if (command.name === 'exportPdf') {
fn = this.commandSavePdf;
} else if (command.name === 'print' && this.webview_) {
} else if (command.name === 'print') {
fn = this.commandPrint;
} else if (command.name === 'textBold') {
fn = this.commandTextBold;
} else if (command.name === 'textItalic') {
fn = this.commandTextItalic;
} else if (command.name === 'insertDateTime' ) {
fn = this.commandDateTime;
} else if (command.name === 'commandStartExternalEditing') {
fn = this.commandStartExternalEditing;
} else if (command.name === 'showLocalSearch') {
fn = this.commandShowLocalSearch;
}
if (this.state.note) {
if (command.name === 'textBold') {
fn = this.commandTextBold;
} else if (command.name === 'textItalic') {
fn = this.commandTextItalic;
} else if (command.name === 'insertDateTime' ) {
fn = this.commandDateTime;
} else if (command.name === 'commandStartExternalEditing') {
fn = this.commandStartExternalEditing;
} else if (command.name === 'showLocalSearch') {
fn = this.commandShowLocalSearch;
}
}
if (!fn) return;
@@ -998,6 +1002,10 @@ class NoteTextComponent extends React.Component {
}
printTo_(target, options) {
if (this.props.selectedNoteIds.length !== 1 || !this.webview_) {
throw new Error(_('Only one note can be printed or exported to PDF at a time.'));
}
const previousBody = this.state.note.body;
const tempBody = "# " + this.state.note.title + "\n\n" + previousBody;
@@ -1033,18 +1041,28 @@ class NoteTextComponent extends React.Component {
}
commandSavePdf() {
const path = bridge().showSaveDialog({
filters: [{ name: _('PDF File'), extensions: ['pdf']}],
defaultPath: safeFilename(this.state.note.title),
});
try {
if (!this.state.note) throw new Error(_('Only one note can be printed or exported to PDF at a time.'));
const path = bridge().showSaveDialog({
filters: [{ name: _('PDF File'), extensions: ['pdf']}],
defaultPath: safeFilename(this.state.note.title),
});
if (!path) return;
if (path) {
this.printTo_('pdf', { path: path });
} catch (error) {
bridge().showErrorMessageBox(error.message);
}
}
commandPrint() {
this.printTo_('printer');
try {
this.printTo_('printer');
} catch (error) {
bridge().showErrorMessageBox(error.message);
}
}
async commandStartExternalEditing() {
@@ -1705,6 +1723,7 @@ class NoteTextComponent extends React.Component {
const mapStateToProps = (state) => {
return {
noteId: state.selectedNoteIds.length === 1 ? state.selectedNoteIds[0] : null,
selectedNoteIds: state.selectedNoteIds,
noteTags: state.selectedNoteTags,
folderId: state.selectedFolderId,
itemType: state.selectedItemType,

View File

@@ -3,6 +3,7 @@ const { connect } = require("react-redux");
const shared = require("lib/components/shared/side-menu-shared.js");
const { Synchronizer } = require("lib/synchronizer.js");
const BaseModel = require("lib/BaseModel.js");
const Setting = require('lib/models/Setting.js');
const Folder = require("lib/models/Folder.js");
const Note = require("lib/models/Note.js");
const Tag = require("lib/models/Tag.js");
@@ -23,7 +24,7 @@ class SideBarComponent extends React.Component {
this.onFolderDragStart_ = (event) => {
const folderId = event.currentTarget.getAttribute('folderid');
if (!folderId) return;
event.dataTransfer.setDragImage(new Image(), 1, 1);
event.dataTransfer.clearData();
event.dataTransfer.setData('text/x-jop-folder-ids', JSON.stringify([folderId]));
@@ -79,6 +80,11 @@ class SideBarComponent extends React.Component {
id: folderId,
});
};
this.state = {
tagHeaderIsExpanded: Setting.value('tagHeaderIsExpanded'),
folderHeaderIsExpanded: Setting.value('folderHeaderIsExpanded')
};
}
style() {
@@ -190,7 +196,7 @@ class SideBarComponent extends React.Component {
if (shim.isLinux()) {
// For some reason, the UI seems to sleep in some Linux distro during
// sync. Cannot find the reason for it and cannot replicate, so here
// as a test force the update at regular intervals.
// as a test force the update at regular intervals.
// https://github.com/laurent22/joplin/issues/312#issuecomment-429472193
if (!prevProps.syncStarted && this.props.syncStarted) {
this.clearForceUpdateDuringSync();
@@ -201,7 +207,7 @@ class SideBarComponent extends React.Component {
}
if (prevProps.syncStarted && !this.props.syncStarted) this.clearForceUpdateDuringSync();
}
}
}
componentWillUnmount() {
@@ -303,7 +309,7 @@ class SideBarComponent extends React.Component {
);
}
if (itemType === BaseModel.TYPE_TAG) {
if (itemType === BaseModel.TYPE_TAG) {
menu.append(
new MenuItem({
label: _('Rename'),
@@ -440,14 +446,48 @@ class SideBarComponent extends React.Component {
makeHeader(key, label, iconName, extraProps = {}) {
const style = this.style().header;
const icon = <i style={{ fontSize: style.fontSize * 1.2, marginRight: 5 }} className={"fa " + iconName} />;
if (extraProps.toggleblock || extraProps.onClick) {
style.cursor = "pointer";
}
let headerClick = extraProps.onClick || null;
delete extraProps.onClick;
// check if toggling option is set.
let toggleIcon = null;
const toggleKey = `${key}IsExpanded`;
if (extraProps.toggleblock) {
let isExpanded = this.state[toggleKey];
toggleIcon = <i className={`fa ${isExpanded ? 'fa-chevron-down' : 'fa-chevron-left'}`} style={{ fontSize: style.fontSize * 0.75,
marginRight: 12, marginLeft: 5, marginTop: style.fontSize * 0.125}}></i>;
}
return (
<div style={style} key={key} {...extraProps}>
<div style={style} key={key} {...extraProps} onClick={(event) => {
// if a custom click event is attached, trigger that.
if (headerClick) {
headerClick(key, event);
}
this.onHeaderClick_(key, event);
}}>
{icon}
{label}
<span style={{flex: 1 }}>{label}</span>
{toggleIcon}
</div>
);
}
onHeaderClick_(key, event) {
const currentHeader = event.currentTarget;
const toggleBlock = +currentHeader.getAttribute('toggleblock');
if (toggleBlock) {
const toggleKey = `${key}IsExpanded`;
const isExpanded = this.state[toggleKey];
this.setState({ [toggleKey]: !isExpanded });
Setting.setValue(toggleKey, !isExpanded);
}
}
synchronizeButton(type) {
const style = this.style().button;
const iconName = type === "sync" ? "fa-refresh" : "fa-times";
@@ -477,24 +517,27 @@ class SideBarComponent extends React.Component {
});
let items = [];
items.push(this.makeHeader("folderHeader", _("Notebooks"), "fa-folder-o", {
onDrop: this.onFolderDrop_,
folderid: '',
toggleblock: 1
}));
if (this.props.folders.length) {
const folderItems = shared.renderFolders(this.props, this.folderItem.bind(this));
items = items.concat(folderItems);
items.push(<div className="folders" key="folder_items" style={{display: this.state.folderHeaderIsExpanded ? 'block': 'none'}}>
{folderItems}</div>);
}
items.push(this.makeHeader("tagHeader", _("Tags"), "fa-tags"));
items.push(this.makeHeader("tagHeader", _("Tags"), "fa-tags", {
toggleblock: 1
}));
if (this.props.tags.length) {
const tagItems = shared.renderTags(this.props, this.tagItem.bind(this));
items.push(
<div className="tags" key="tag_items">
<div className="tags" key="tag_items" style={{display: this.state.tagHeaderIsExpanded ? 'block': 'none'}}>
{tagItems}
</div>
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "Joplin",
"version": "1.0.119",
"version": "1.0.120",
"description": "Joplin for Desktop",
"main": "main.js",
"scripts": {
@@ -58,6 +58,9 @@
"linux": {
"asar": false,
"category": "Office",
"desktop": {
"Icon": "joplin"
},
"target": "AppImage"
}
},
@@ -100,7 +103,7 @@
"lodash": "^4.17.10",
"mark.js": "^8.11.1",
"markdown-it": "^8.4.1",
"markdown-it-katex": "^2.0.3",
"markdown-it-texmath": "^0.5.3",
"md5": "^2.2.1",
"mermaid": "^8.0.0-rc.8",
"mime": "^2.3.1",

View File

@@ -1,12 +1,9 @@
const Setting = require('lib/models/Setting.js');
const zoomRatio = Setting.value('style.zoom') / 100;
const editorFontSize = Setting.value('style.editor.fontSize');
// globalStyle should be used for properties that do not change across themes
// i.e. should not be used for colors
const globalStyle = {
fontSize: Math.round(12 * zoomRatio),
fontSize: 12,
fontFamily: 'sans-serif',
margin: 15, // No text and no interactive component should be within this margin
itemMarginTop: 10,
@@ -15,8 +12,8 @@ const globalStyle = {
disabledOpacity: 0.3,
buttonMinWidth: 50,
buttonMinHeight: 30,
editorFontSize: editorFontSize,
textAreaLineHeight: Math.round(17 * editorFontSize / 12),
editorFontSize: 12,
textAreaLineHeight: 17,
headerHeight: 35,
headerButtonHPadding: 6,
@@ -25,10 +22,6 @@ const globalStyle = {
tagItemPadding: 3,
};
// For WebView - must correspond to the properties above
globalStyle.htmlFontSize = globalStyle.fontSize + 'px';
globalStyle.htmlLineHeight = Math.round(20 * zoomRatio) + 'px';
globalStyle.marginRight = globalStyle.margin;
globalStyle.marginLeft = globalStyle.margin;
globalStyle.marginTop = globalStyle.margin;
@@ -43,39 +36,6 @@ globalStyle.lineInput = {
fontFamily: globalStyle.fontFamily,
};
globalStyle.textStyle = {
fontFamily: globalStyle.fontFamily,
fontSize: globalStyle.fontSize,
lineHeight: '1.6em',
};
globalStyle.textStyle2 = Object.assign({}, globalStyle.textStyle, {});
globalStyle.urlStyle = Object.assign({}, globalStyle.textStyle, { textDecoration: 'underline' });
globalStyle.h1Style = Object.assign({}, globalStyle.textStyle);
globalStyle.h1Style.fontSize *= 1.5;
globalStyle.h1Style.fontWeight = 'bold';
globalStyle.h2Style = Object.assign({}, globalStyle.textStyle);
globalStyle.h2Style.fontSize *= 1.3;
globalStyle.h2Style.fontWeight = 'bold';
globalStyle.toolbarStyle = {
height: globalStyle.toolbarHeight,
minWidth: globalStyle.toolbarHeight,
display: 'flex',
alignItems: 'center',
paddingLeft: globalStyle.headerButtonHPadding,
paddingRight: globalStyle.headerButtonHPadding,
textDecoration: 'none',
fontFamily: globalStyle.fontFamily,
fontSize: globalStyle.fontSize,
boxSizing: 'border-box',
cursor: 'default',
justifyContent: 'center',
};
globalStyle.headerStyle = {};
globalStyle.inputStyle = {
@@ -180,6 +140,59 @@ function addExtraStyles(style) {
color: style.raisedColor,
};
style.toolbarStyle = {
height: style.toolbarHeight,
minWidth: style.toolbarHeight,
display: 'flex',
alignItems: 'center',
paddingLeft: style.headerButtonHPadding,
paddingRight: style.headerButtonHPadding,
textDecoration: 'none',
fontFamily: style.fontFamily,
fontSize: style.fontSize,
boxSizing: 'border-box',
cursor: 'default',
justifyContent: 'center',
color: style.color,
};
style.textStyle = {
fontFamily: globalStyle.fontFamily,
fontSize: style.fontSize,
lineHeight: '1.6em',
color: style.color
};
style.textStyle2 = Object.assign({}, style.textStyle,
{ color: style.color2, }
);
style.urlStyle = Object.assign({}, style.textStyle,
{
textDecoration: 'underline',
color: style.urlColor
}
);
style.h1Style = Object.assign({},
style.textStyle,
{
color: style.color,
fontSize: style.textStyle.fontSize * 1.5,
fontWeight: 'bold'
}
);
style.h2Style = Object.assign({},
style.textStyle,
{
color: style.color,
fontSize: style.textStyle.fontSize * 1.3,
fontWeight: 'bold'
}
);
return style;
}
@@ -187,14 +200,31 @@ let themeCache_ = {};
function themeStyle(theme) {
if (!theme) throw new Error('Theme must be specified');
if (themeCache_[theme]) return themeCache_[theme];
var zoomRatio = Setting.value('style.zoom') / 100;
var editorFontSize = Setting.value('style.editor.fontSize');
const cacheKey = [theme, zoomRatio, editorFontSize].join('-');
if (themeCache_[cacheKey]) return themeCache_[cacheKey];
let fontSizes = {
fontSize: Math.round(12 * zoomRatio),
editorFontSize: editorFontSize,
textAreaLineHeight: Math.round(17 * editorFontSize / 12),
// For WebView - must correspond to the properties above
htmlFontSize: Math.round(12 * zoomRatio) + 'px',
htmlLineHeight: Math.round(20 * zoomRatio) + 'px'
}
let output = {};
output.zoomRatio = zoomRatio;
output.editorFontSize = editorFontSize;
if (theme == Setting.THEME_LIGHT) {
output = Object.assign({}, globalStyle, lightStyle);
output = Object.assign({}, globalStyle, fontSizes, lightStyle);
}
else if (theme == Setting.THEME_DARK) {
output = Object.assign({}, globalStyle, darkStyle);
output = Object.assign({}, globalStyle, fontSizes, darkStyle);
}
// TODO: All the theme specific things should go in addExtraStyles
@@ -202,11 +232,6 @@ function themeStyle(theme) {
// beginning of the file. At least new styles should go in
// addExtraStyles.
output.textStyle = Object.assign({},
output.textStyle,
{ color: output.color }
);
output.icon = Object.assign({},
output.icon,
{ color: output.color }
@@ -220,31 +245,6 @@ function themeStyle(theme) {
}
);
output.textStyle2 = Object.assign({},
output.textStyle2,
{ color: output.color2, }
);
output.urlStyle = Object.assign({},
output.urlStyle,
{ color: output.urlColor }
);
output.h1Style = Object.assign({},
output.h1Style,
{ color: output.color }
);
output.h2Style = Object.assign({},
output.h2Style,
{ color: output.color }
);
output.toolbarStyle = Object.assign({},
output.toolbarStyle,
{ color: output.color }
);
output.headerStyle = Object.assign({},
output.headerStyle,
{
@@ -281,8 +281,8 @@ function themeStyle(theme) {
output = addExtraStyles(output);
themeCache_[theme] = output;
return themeCache_[theme];
themeCache_[cacheKey] = output;
return themeCache_[cacheKey];
}
module.exports = { themeStyle };

View File

@@ -14,7 +14,7 @@ The application is available for Windows, Linux, macOS, Android and iOS. A [Web
# Installation
Three types of applications are available: for the **desktop** (Windows, macOS and Linux), for **mobile** (Android and iOS) and for **terminal** (Windows, macOS and Linux). All applications have similar user interfaces and can synchronise with each others.
Three types of applications are available: for the **desktop** (Windows, macOS and Linux), for **mobile** (Android and iOS) and for **terminal** (Windows, macOS and Linux). All applications have similar user interfaces and can synchronise with each other.
## Desktop applications
@@ -36,7 +36,7 @@ wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_insta
Operating System | Download | Alt. Download
-----------------|----------|----------------
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://joplin.cozic.net/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.178/joplin-v1.0.178.apk)
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://joplin.cozic.net/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.233/joplin-v1.0.233.apk)
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://joplin.cozic.net/images/BadgeIOS.png'/></a> | -
## Terminal application
@@ -335,28 +335,28 @@ Current translations:
<!-- LOCALE-TABLE-AUTO-GENERATED -->
&nbsp; | Language | Po File | Last translator | Percent done
---|---|---|---|---
![](https://joplin.cozic.net/images/flags/es/basque_country.png) | Basque | [eu](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eu.po) | juan.abasolo@ehu.eus | 61%
![](https://joplin.cozic.net/images/flags/es/catalonia.png) | Catalan | [ca](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ca.po) | jmontane, 2018 | 86%
![](https://joplin.cozic.net/images/flags/es/basque_country.png) | Basque | [eu](https://github.com/laurent22/joplin/blob/master/CliClient/locales/eu.po) | juan.abasolo@ehu.eus | 60%
![](https://joplin.cozic.net/images/flags/es/catalonia.png) | Catalan | [ca](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ca.po) | jmontane, 2018 | 85%
![](https://joplin.cozic.net/images/flags/country-4x3/hr.png) | Croatian | [hr_HR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/hr_HR.po) | Hrvoje Mandić (trbuhom@net.hr) | 49%
![](https://joplin.cozic.net/images/flags/country-4x3/cz.png) | Czech | [cs_CZ](https://github.com/laurent22/joplin/blob/master/CliClient/locales/cs_CZ.po) | Lukas Helebrandt (lukas@aiya.cz) | 76%
![](https://joplin.cozic.net/images/flags/country-4x3/dk.png) | Dansk | [da_DK](https://github.com/laurent22/joplin/blob/master/CliClient/locales/da_DK.po) | Morten Juhl-Johansen Zölde-Fejér (mjjzf@syntaktisk. | 78%
![](https://joplin.cozic.net/images/flags/country-4x3/dk.png) | Dansk | [da_DK](https://github.com/laurent22/joplin/blob/master/CliClient/locales/da_DK.po) | Morten Juhl-Johansen Zölde-Fejér (mjjzf@syntaktisk. | 77%
![](https://joplin.cozic.net/images/flags/country-4x3/de.png) | Deutsch | [de_DE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/de_DE.po) | Michael Sonntag (ms@editorei.de) | 97%
![](https://joplin.cozic.net/images/flags/country-4x3/gb.png) | English | [en_GB](https://github.com/laurent22/joplin/blob/master/CliClient/locales/en_GB.po) | | 100%
![](https://joplin.cozic.net/images/flags/country-4x3/es.png) | Español | [es_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/es_ES.po) | Fernando Martín (f@mrtn.es) | 92%
![](https://joplin.cozic.net/images/flags/country-4x3/fr.png) | Français | [fr_FR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/fr_FR.po) | Laurent Cozic | 100%
![](https://joplin.cozic.net/images/flags/es/galicia.png) | Galician | [gl_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/gl_ES.po) | Marcos Lans (marcoslansgarza@gmail.com) | 77%
![](https://joplin.cozic.net/images/flags/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 91%
![](https://joplin.cozic.net/images/flags/country-4x3/be.png) | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 61%
![](https://joplin.cozic.net/images/flags/es/galicia.png) | Galician | [gl_ES](https://github.com/laurent22/joplin/blob/master/CliClient/locales/gl_ES.po) | Marcos Lans (marcoslansgarza@gmail.com) | 76%
![](https://joplin.cozic.net/images/flags/country-4x3/it.png) | Italiano | [it_IT](https://github.com/laurent22/joplin/blob/master/CliClient/locales/it_IT.po) | | 90%
![](https://joplin.cozic.net/images/flags/country-4x3/be.png) | Nederlands | [nl_BE](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_BE.po) | | 60%
![](https://joplin.cozic.net/images/flags/country-4x3/nl.png) | Nederlands | [nl_NL](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nl_NL.po) | Heimen Stoffels (vistausss@outlook.com) | 92%
![](https://joplin.cozic.net/images/flags/country-4x3/no.png) | Norwegian | [nb_NO](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nb_NO.po) | Mats Estensen (matsest@mxe.no) | 99%
![](https://joplin.cozic.net/images/flags/country-4x3/no.png) | Norwegian | [nb_NO](https://github.com/laurent22/joplin/blob/master/CliClient/locales/nb_NO.po) | Mats Estensen (code@mxe.no) | 98%
![](https://joplin.cozic.net/images/flags/country-4x3/br.png) | Português (Brasil) | [pt_BR](https://github.com/laurent22/joplin/blob/master/CliClient/locales/pt_BR.po) | Renato Nunes Bastos (rnbastos@gmail.com) | 99%
![](https://joplin.cozic.net/images/flags/country-4x3/ro.png) | Română | [ro](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ro.po) | | 60%
![](https://joplin.cozic.net/images/flags/country-4x3/si.png) | Slovenian | [sl_SI](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sl_SI.po) | | 76%
![](https://joplin.cozic.net/images/flags/country-4x3/si.png) | Slovenian | [sl_SI](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sl_SI.po) | | 75%
![](https://joplin.cozic.net/images/flags/country-4x3/se.png) | Svenska | [sv](https://github.com/laurent22/joplin/blob/master/CliClient/locales/sv.po) | Jonatan Nyberg (jonatan@autistici.org) | 91%
![](https://joplin.cozic.net/images/flags/country-4x3/ru.png) | Русский | [ru_RU](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ru_RU.po) | Artyom Karlov (artyom.karlov@gmail.com) | 76%
![](https://joplin.cozic.net/images/flags/country-4x3/ru.png) | Русский | [ru_RU](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ru_RU.po) | Artyom Karlov (artyom.karlov@gmail.com) | 78%
![](https://joplin.cozic.net/images/flags/country-4x3/cn.png) | 中文 (简体) | [zh_CN](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_CN.po) | | 95%
![](https://joplin.cozic.net/images/flags/country-4x3/tw.png) | 中文 (繁體) | [zh_TW](https://github.com/laurent22/joplin/blob/master/CliClient/locales/zh_TW.po) | penguinsam (samliu@gmail.com) | 92%
![](https://joplin.cozic.net/images/flags/country-4x3/jp.png) | 日本語 | [ja_JP](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ja_JP.po) | AWASHIRO Ikuya (ikunya@gmail.com) | 93%
![](https://joplin.cozic.net/images/flags/country-4x3/jp.png) | 日本語 | [ja_JP](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ja_JP.po) | AWASHIRO Ikuya (ikunya@gmail.com) | 99%
![](https://joplin.cozic.net/images/flags/country-4x3/kr.png) | 한국말 | [ko](https://github.com/laurent22/joplin/blob/master/CliClient/locales/ko.po) | | 92%
<!-- LOCALE-TABLE-AUTO-GENERATED -->

View File

@@ -90,8 +90,8 @@ android {
applicationId "net.cozic.joplin"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2097414
versionName "1.0.178"
versionCode 2097469
versionName "1.0.233"
ndk {
abiFilters "armeabi-v7a", "x86"
}
@@ -137,7 +137,7 @@ android {
}
dependencies {
implementation project(':react-native-firebase')
compile project(':react-native-push-notification')
implementation (project(':react-native-camera')) {
// This is required because com.google.firebase requires v16.0.x of com.google.android.gms
// while react-native-camera requires v15.x, which results in broken dependencies with
@@ -167,8 +167,6 @@ dependencies {
implementation "com.facebook.react:react-native:+"
implementation "com.google.android.gms:play-services-base:16.0.1" // For Firebase
implementation "com.google.firebase:firebase-core:16.0.4" // For Firebase
implementation "com.google.firebase:firebase-messaging:17.3.4" // For Firebase
implementation 'me.leolin:ShortcutBadger:1.1.21@aar' // For Firebase - this line if you wish to use badge on Android
// To fix the error below, which happened after adding react-native-camera.
@@ -197,5 +195,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
into 'libs'
}
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
apply plugin: 'com.google.gms.google-services' // For Firebase
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

View File

@@ -1,42 +0,0 @@
{
"project_info": {
"project_number": "790045682275",
"firebase_url": "https://joplin-b5b20.firebaseio.com",
"project_id": "joplin-b5b20",
"storage_bucket": "joplin-b5b20.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:790045682275:android:8b68903cf881e9f7",
"android_client_info": {
"package_name": "net.cozic.joplin"
}
},
"oauth_client": [
{
"client_id": "790045682275-fkusmvsm7gv3nve7h0sg0uuor9njf4sm.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCbHjUWAKcbldLTuoN7JybJ8dfznwBG_gM"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}

View File

@@ -11,18 +11,18 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
<!-- ============================= -->
<!-- START RNFirebaseNotifications -->
<!-- START RN-push-notitication -->
<!-- ============================= -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<!-- ============================= -->
<!-- END RNFirebaseNotifications -->
<!-- END RN-push-notitication -->
<!-- ============================= -->
<!-- Make these features optional to enable Chromebooks -->
<!-- https://github.com/laurent22/joplin/issues/37 -->
<uses-feature android:name="android.hardware.camera" android:required="false" />
@@ -39,53 +39,41 @@
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<!-- ============================= -->
<!-- START RNFirebaseNotifications -->
<!-- START RN-push-notitication -->
<!-- ============================= -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name" android:value="@string/default_notification_channel_id"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description" android:value="Allow displaying a notification for Joplin's alarms"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="@android:color/white"/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_access_alarm" />
<receiver android:name="io.invertase.firebase.notifications.RNFirebaseNotificationReceiver"/>
<receiver android:enabled="true" android:exported="true" android:name="io.invertase.firebase.notifications.RNFirebaseNotificationsRebootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON"/>
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
<service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerServiceGcm"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- ============================= -->
<!-- END RNFirebaseNotifications -->
<!-- END RN-push-notitication -->
<!-- ============================= -->
<!-- ============================= -->
<!-- START RNFirebaseNotifications -->
<!-- ============================= -->
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<!-- "If you want to be able to react to data-only messages when your app is in the background, e.g. to display a heads up notification" -->
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
<!-- ============================= -->
<!-- END RNFirebaseNotifications -->
<!-- ============================= -->
<!-- 2018-12-16: Changed android:launchMode from "singleInstance" to "singleTop" for Firebase notification -->
<!-- Previously singleInstance was necessary to prevent multiple instance of the RN app from running at the same time, but maybe no longer needed. -->

View File

@@ -3,9 +3,7 @@ package net.cozic.joplin;
import android.app.Application;
import com.facebook.react.ReactApplication;
import io.invertase.firebase.RNFirebasePackage;
import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage;
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
import org.reactnative.camera.RNCameraPackage;
import com.vinzscam.reactnativefileviewer.RNFileViewerPackage;
import net.rhogan.rnsecurerandom.RNSecureRandomPackage;
@@ -41,10 +39,8 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactNativePushNotificationPackage(),
new ImageResizerPackage(),
new RNFirebasePackage(),
new RNFirebaseMessagingPackage(),
new RNFirebaseNotificationsPackage(),
new RNCameraPackage(),
new RNFileViewerPackage(),
new RNSecureRandomPackage(),

View File

@@ -0,0 +1,3 @@
<resources>
<color name="white">#FFF</color>
</resources>

View File

@@ -1,3 +1,4 @@
<resources>
<string name="app_name">Joplin</string>
<string name="default_notification_channel_id">net.cozic.joplin.notification</string>
</resources>

View File

@@ -14,7 +14,6 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0' // Upgraded from 3.1.4 to 3.2.0 for Firebase
classpath 'com.google.gms:google-services:4.0.1' // For Firebase
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@@ -1,6 +1,4 @@
rootProject.name = 'Joplin'
include ':react-native-firebase'
project(':react-native-firebase').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase/android')
include ':react-native-camera'
project(':react-native-camera').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-camera/android')
include ':react-native-file-viewer'
@@ -33,3 +31,6 @@ include ':app', ':react-native-share-extension'
project(':react-native-share-extension').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share-extension/android')
include ':react-native-version-info'
project(':react-native-version-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-info/android')
include ':react-native-push-notification'
project(':react-native-push-notification').projectDir = file('../node_modules/react-native-push-notification/android')

View File

@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>10.0.26</string>
<string>10.0.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>26</string>
<string>27</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>

View File

@@ -220,7 +220,23 @@ class BaseApplication {
notes = await Tag.notes(parentId, options);
} else if (parentType === BaseModel.TYPE_SEARCH) {
const search = BaseModel.byId(state.searches, parentId);
notes = await SearchEngineUtils.notesForQuery(search.query_pattern);
if (search.basic_search) {
// NOTE: Copied and pasted from ReactNativeClient/lib/components/screens/search.js
let p = search.query_pattern.split(' ');
let temp = [];
for (let i = 0; i < p.length; i++) {
let t = p[i].trim();
if (!t) continue;
temp.push(t);
}
notes = await Note.previews(null, {
anywherePattern: '*' + temp.join('*') + '*',
});
} else {
notes = await SearchEngineUtils.notesForQuery(search.query_pattern);
}
}
}
@@ -477,7 +493,7 @@ class BaseApplication {
this.dbLogger_.setLevel(initArgs.logLevel);
if (Setting.value('env') === 'dev') {
this.dbLogger_.setLevel(Logger.LEVEL_WARN);
this.dbLogger_.setLevel(Logger.LEVEL_INFO);
}
this.logger_.info('Profile directory: ' + profileDir);

View File

@@ -7,7 +7,7 @@ const { shim } = require('lib/shim.js');
const { _ } = require('lib/locale');
const md5 = require('md5');
const MdToHtml_Katex = require('lib/MdToHtml_Katex');
const { pregQuote } = require('lib/string-utils.js');
const StringUtils = require('lib/string-utils.js');
class MdToHtml {
@@ -415,22 +415,8 @@ class MdToHtml {
}
applyHighlightedKeywords_(body, keywords) {
for (let i = 0; i < keywords.length; i++) {
const k = keywords[i];
let regexString = '';
if (k.type === 'regex') {
regexString = k.value;
} else {
regexString = pregQuote(k);
}
const re = new RegExp('(^|\n|\b)(' + regexString + ')(\n|\b|$)', 'gi');
body = body.replace(re, '$1<span class="highlighted-keyword">$2</span>$3');
}
return body;
if (!keywords.length) return body;
return StringUtils.surroundKeywords(keywords, body, '<span class="highlighted-keyword">', '</span>');
}
render(body, style, options = null) {
@@ -481,9 +467,8 @@ class MdToHtml {
// This is currently used only so that the $expression$ and $$\nexpression\n$$ blocks are translated
// to math_inline and math_block blocks. These blocks are then processed directly with the Katex
// library. It is better this way as then it is possible to conditionally load the CSS required by
// Katex and use an up-to-date version of Katex (as of 2018, the plugin is still using 0.6, which is
// buggy instead of 0.9).
md.use(require('markdown-it-katex'));
// Katex and handle rendering of katex ourselves (this one is prone to be buggy).
md.use(require('markdown-it-texmath'));
// Hack to make checkboxes clickable. Ideally, checkboxes should be parsed properly in
// renderTokens_(), but for now this hack works. Marking it with HORRIBLE_HACK so
@@ -699,7 +684,7 @@ class MdToHtml {
}
body = body.replace(/°°JOP°CHECKBOX°NOTICK°°/g, '- [ ]');
body = body.replace(/°°JOP°CHECKBOX°TICK°°/g, '- [X]');
body = body.replace(/°°JOP°CHECKBOX°TICK°°/g, '- [x]');
return body;
}

View File

@@ -29,6 +29,10 @@ class NoteBodyViewer extends Component {
}
onLoadEnd() {
setTimeout(() => {
if (this.props.onLoadEnd) this.props.onLoadEnd();
}, 100);
if (this.state.webViewLoaded) return;
// Need to display after a delay to avoid a white flash before

View File

@@ -9,6 +9,7 @@ const { themeStyle } = require('lib/components/global-style.js');
const Setting = require('lib/models/Setting.js');
const shared = require('lib/components/shared/config-shared.js');
const SyncTargetRegistry = require('lib/SyncTargetRegistry');
const { reg } = require('lib/registry.js');
import VersionInfo from 'react-native-version-info';
class ConfigScreenComponent extends BaseScreenComponent {
@@ -248,8 +249,20 @@ class ConfigScreenComponent extends BaseScreenComponent {
);
settingComps.push(
<View key="version_info" style={this.styles().settingContainer}>
<Text key="version" style={this.styles().settingText}>Version {VersionInfo.appVersion}</Text>
<View key="version_info_app" style={this.styles().settingContainer}>
<Text style={this.styles().settingText}>{_('Joplin v%s', VersionInfo.appVersion)}</Text>
</View>
);
settingComps.push(
<View key="version_info_db" style={this.styles().settingContainer}>
<Text style={this.styles().settingText}>{_('Database v%s', reg.db().version())}</Text>
</View>
);
settingComps.push(
<View key="version_info_fts" style={this.styles().settingContainer}>
<Text style={this.styles().settingText}>{_('FTS enabled: %d', this.props.settings['db.ftsEnabled'])}</Text>
</View>
);

View File

@@ -113,7 +113,7 @@ class FolderScreenComponent extends BaseScreenComponent {
saveButtonDisabled={saveButtonDisabled}
onSaveButtonPress={() => this.saveFolderButton_press()}
/>
<TextInput selectionColor={theme.textSelectionColor} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={(text) => this.title_changeText(text)} />
<TextInput underlineColorAndroid={theme.strongDividerColor} selectionColor={theme.textSelectionColor} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={(text) => this.title_changeText(text)} />
<dialogs.DialogBox ref={dialogbox => { this.dialogbox = dialogbox }}/>
</View>
);

View File

@@ -63,6 +63,15 @@ class NoteScreenComponent extends BaseScreenComponent {
noteTagDialogShown: false,
fromShare: false,
showCamera: false,
// HACK: For reasons I can't explain, when the WebView is present, the TextInput initially does not display (It's just a white rectangle with
// no visible text). It will only appear when tapping it or doing certain action like selecting text on the webview. The bug started to
// appear one day and did not go away - reverting to an old RN version did not help, undoing all
// the commits till a working version did not help. The bug also does not happen in the simulator which makes it hard to fix.
// Eventually, a way that "worked" is to add a 1px margin on top of the text input just after the webview has loaded, then removing this
// margin. This forces RN to update the text input and to display it. Maybe that hack can be removed once RN is upgraded.
// See https://github.com/laurent22/joplin/issues/1057
HACK_webviewLoadingState: 0,
};
// iOS doesn't support multiline text fields properly so disable it
@@ -588,13 +597,16 @@ class NoteScreenComponent extends BaseScreenComponent {
this.saveOneProperty('body', newBody);
};
// Currently keyword highlighting is supported only when FTS is available.
let keywords = [];
if (this.props.searchQuery) {
if (this.props.searchQuery && !!this.props.ftsEnabled) {
const parsedQuery = SearchEngine.instance().parseQuery(this.props.searchQuery);
keywords = SearchEngine.instance().allParsedQueryTerms(parsedQuery);
}
bodyComponent = <NoteBodyViewer
// Note: as of 2018-12-29 it's important not to display the viewer if the note body is empty,
// to avoid the HACK_webviewLoadingState related bug.
bodyComponent = !note || !note.body.trim() ? null : <NoteBodyViewer
onJoplinLinkClick={this.onJoplinLinkClick_}
ref="noteBodyViewer"
style={this.styles().noteBodyViewer}
@@ -602,6 +614,14 @@ class NoteScreenComponent extends BaseScreenComponent {
note={note}
highlightedKeywords={keywords}
onCheckboxChange={(newBody) => { onCheckboxChange(newBody) }}
onLoadEnd={() => {
setTimeout(() => {
this.setState({ HACK_webviewLoadingState: 1 });
setTimeout(() => {
this.setState({ HACK_webviewLoadingState: 0 });
}, 50);
}, 5);
}}
/>
} else {
const focusBody = !isNew && !!note.title;
@@ -649,6 +669,7 @@ class NoteScreenComponent extends BaseScreenComponent {
let titleTextInputStyle = {
flex: 1,
marginTop: 0,
paddingLeft: 0,
color: theme.color,
backgroundColor: theme.backgroundColor,
@@ -668,6 +689,10 @@ class NoteScreenComponent extends BaseScreenComponent {
paddingBottom: 10, // Added for iOS (Not needed for Android??)
}
if (this.state.HACK_webviewLoadingState === 1) {
titleTextInputStyle.marginTop = 1;
}
const dueDate = isTodo && note.todo_due ? new Date(note.todo_due) : null;
const titleComp = (
@@ -747,6 +772,7 @@ const NoteScreen = connect(
folders: state.folders,
searchQuery: state.searchQuery,
theme: state.settings.theme,
ftsEnabled: state.settings['db.ftsEnabled'],
sharedData: state.sharedData,
showAdvancedOptions: state.settings.showAdvancedOptions,
};

View File

@@ -106,22 +106,22 @@ class SearchScreenComponent extends BaseScreenComponent {
let notes = []
if (query) {
notes = await SearchEngineUtils.notesForQuery(query);
// Keeping the code below in case of compatibility issue with old versions
// of Android and SQLite FTS.
if (!!this.props.settings['db.ftsEnabled']) {
notes = await SearchEngineUtils.notesForQuery(query);
} else {
let p = query.split(' ');
let temp = [];
for (let i = 0; i < p.length; i++) {
let t = p[i].trim();
if (!t) continue;
temp.push(t);
}
// let p = query.split(' ');
// let temp = [];
// for (let i = 0; i < p.length; i++) {
// let t = p[i].trim();
// if (!t) continue;
// temp.push(t);
// }
// notes = await Note.previews(null, {
// anywherePattern: '*' + temp.join('*') + '*',
// });
notes = await Note.previews(null, {
anywherePattern: '*' + temp.join('*') + '*',
});
}
}
if (!this.isMounted_) return;
@@ -193,6 +193,7 @@ const SearchScreen = connect(
return {
query: state.searchQuery,
theme: state.settings.theme,
settings: state.settings,
noteSelectionEnabled: state.noteSelectionEnabled,
};
}

View File

@@ -125,6 +125,7 @@ class JoplinDatabase extends Database {
super(driver);
this.initialized_ = false;
this.tableFields_ = null;
this.version_ = null;
}
initialized() {
@@ -261,7 +262,8 @@ class JoplinDatabase extends Database {
// default value and thus might cause problems. In that case, the default value
// must be set in the synchronizer too.
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
// Note: v16 and v17 don't do anything. They were used to debug an issue.
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17];
let currentVersionIndex = existingDatabaseVersions.indexOf(fromVersion);
@@ -269,7 +271,9 @@ class JoplinDatabase extends Database {
// version of the database, so that migration is not run in this case.
if (currentVersionIndex < 0) throw new Error('Unknown profile version. Most likely this is an old version of Joplin, while the profile was created by a newer version. Please upgrade Joplin at https://joplin.cozic.net and try again.');
if (currentVersionIndex == existingDatabaseVersions.length - 1) return false;
if (currentVersionIndex == existingDatabaseVersions.length - 1) return fromVersion;
let latestVersion = fromVersion;
while (currentVersionIndex < existingDatabaseVersions.length - 1) {
const targetVersion = existingDatabaseVersions[currentVersionIndex + 1];
@@ -471,14 +475,42 @@ class JoplinDatabase extends Database {
}
queries.push({ sql: 'UPDATE version SET version = ?', params: [targetVersion] });
await this.transactionExecBatch(queries);
try {
await this.transactionExecBatch(queries);
} catch (error) {
if (targetVersion === 15) {
this.logger().warn('Could not upgrade to database v15 - FTS feature will not be used', error);
} else {
throw error;
}
}
latestVersion = targetVersion;
currentVersionIndex++;
}
return latestVersion;
}
async ftsEnabled() {
try {
await this.selectOne('SELECT count(*) FROM notes_fts');
} catch (error) {
this.logger().warn('FTS check failed', error);
return false;
}
this.logger().info('FTS check succeeded');
return true;
}
version() {
return this.version_;
}
async initialize() {
this.logger().info('Checking for database schema update...');
@@ -495,10 +527,12 @@ class JoplinDatabase extends Database {
}
const version = !versionRow ? 0 : versionRow.version;
this.version_ = version;
this.logger().info('Current database version', version);
const upgraded = await this.upgradeDatabase(version);
if (upgraded) await this.refreshTableFields();
const newVersion = await this.upgradeDatabase(version);
this.version_ = newVersion;
if (newVersion !== version) await this.refreshTableFields();
this.tableFields_ = {};

View File

@@ -167,7 +167,13 @@ class Folder extends BaseItem {
if (!folder.parent_id) {
rootFolders.push(folder);
} else {
idToFolders[folder.parent_id].children.push(folder);
if (!idToFolders[folder.parent_id]) {
// It means the notebook is refering a folder that doesn't exist. In theory it shouldn't happen
// but sometimes does - https://github.com/laurent22/joplin/issues/1068#issuecomment-450594708
rootFolders.push(folder);
} else {
idToFolders[folder.parent_id].children.push(folder);
}
}
}

View File

@@ -96,7 +96,8 @@ class Setting extends BaseModel {
'startMinimized': { value: false, type: Setting.TYPE_BOOL, public: true, appTypes: ['desktop'], label: () => _('Start application minimised in the tray icon') },
'collapsedFolderIds': { value: [], type: Setting.TYPE_ARRAY, public: false },
'db.ftsEnabled': { value: -1, type: Setting.TYPE_INT, public: false },
'encryption.enabled': { value: false, type: Setting.TYPE_BOOL, public: false },
'encryption.activeMasterKeyId': { value: '', type: Setting.TYPE_STRING, public: false },
'encryption.passwordCache': { value: {}, type: Setting.TYPE_OBJECT, public: false, secure: true },
@@ -118,6 +119,8 @@ class Setting extends BaseModel {
}},
'noteVisiblePanes': { value: ['editor', 'viewer'], type: Setting.TYPE_ARRAY, public: false, appTypes: ['desktop'] },
'sidebarVisibility': { value: true, type: Setting.TYPE_BOOL, public: false, appTypes: ['desktop'] },
'tagHeaderIsExpanded': { value: true, type: Setting.TYPE_BOOL, public: false, appTypes: ['desktop'] },
'folderHeaderIsExpanded': { value: true, type: Setting.TYPE_BOOL, public: false, appTypes: ['desktop'] },
'editor': { value: '', type: Setting.TYPE_STRING, public: true, appTypes: ['cli', 'desktop'], label: () => _('Text editor command'), description: () => _('The editor command (may include arguments) that will be used to open a note. If none is provided it will try to auto-detect the default editor.') },
'showAdvancedOptions': { value: false, type: Setting.TYPE_BOOL, public: true, appTypes: ['mobile' ], label: () => _('Show advanced options') },
'sync.target': { value: SyncTargetRegistry.nameToId('dropbox'), type: Setting.TYPE_INT, isEnum: true, public: true, label: () => _('Synchronisation target'), description: (appType) => { return appType !== 'cli' ? null : _('The target to synchonise to. Each sync target may have additional parameters which are named as `sync.NUM.NAME` (all documented below).') }, options: () => {
@@ -155,7 +158,7 @@ class Setting extends BaseModel {
'net.customCertificates': { value: '', type: Setting.TYPE_STRING, show: (settings) => { return [SyncTargetRegistry.nameToId('nextcloud'), SyncTargetRegistry.nameToId('webdav')].indexOf(settings['sync.target']) >= 0 }, public: true, appTypes: ['desktop', 'cli'], label: () => _('Custom TLS certificates'), description: () => _('Comma-separated list of paths to directories to load the certificates from, or path to individual cert files. For example: /my/cert_dir, /other/custom.pem. Note that if you make changes to the TLS settings, you must save your changes before clicking on "Check synchronisation configuration".') },
'net.ignoreTlsErrors': { value: false, type: Setting.TYPE_BOOL, show: (settings) => { return [SyncTargetRegistry.nameToId('nextcloud'), SyncTargetRegistry.nameToId('webdav')].indexOf(settings['sync.target']) >= 0 }, public: true, appTypes: ['desktop', 'cli'], label: () => _('Ignore TLS certificate errors') },
'api.token': { value: null, type: Setting.TYPE_STRING, public: false },
'resourceService.lastProcessedChangeId': { value: 0, type: Setting.TYPE_INT, public: false },

View File

@@ -1,7 +1,25 @@
import firebase from 'react-native-firebase';
const PushNotification = require('react-native-push-notification');
class AlarmServiceDriver {
PushNotificationHandler_() {
if (!this.PushNotification_) {
PushNotification.configure({
// (required) Called when a remote or local notification is opened or received
onNotification: function(notification) {
console.info('Notification was opened: ', notification );
// process the notification
},
popInitialNotification: true,
requestPermissions: true,
});
this.PushNotification_ = PushNotification;
}
return this.PushNotification_;
}
hasPersistentNotifications() {
return true;
}
@@ -10,25 +28,18 @@ class AlarmServiceDriver {
throw new Error('Available only for non-persistent alarms');
}
firebaseNotificationId_(joplinNotificationId) {
return 'net.cozic.joplin-' + joplinNotificationId;
}
async clearNotification(id) {
return firebase.notifications().cancelNotification(this.firebaseNotificationId_(id))
return this.PushNotificationHandler_().cancelLocalNotifications({id: id+''});
}
async scheduleNotification(notification) {
const firebaseNotification = new firebase.notifications.Notification()
firebaseNotification.setNotificationId(this.firebaseNotificationId_(notification.id));
firebaseNotification.setTitle(notification.title)
if ('body' in notification) firebaseNotification.body = notification.body;
firebaseNotification.android.setChannelId('com.google.firebase.messaging.default_notification_channel_id');
firebaseNotification.android.setSmallIcon('ic_stat_access_alarm');
const config = {
id: notification.id + '',
message: notification.title,
date: notification.date,
};
firebase.notifications().scheduleNotification(firebaseNotification, {
fireDate: notification.date.getTime(),
});
this.PushNotificationHandler_().localNotificationSchedule(config);
}
}

View File

@@ -108,7 +108,8 @@ class SearchEngine {
let regexString = pregQuote(term);
if (regexString[regexString.length - 1] === '*') {
regexString = regexString.substr(0, regexString.length - 2) + '[^' + pregQuote(' \t\n\r,.,+-*?!={}<>|:"\'()[]') + ']' + '*';
// regexString = regexString.substr(0, regexString.length - 2) + '[^' + pregQuote(' \t\n\r,.,+-*?!={}<>|:"\'()[]') + ']' + '*';
regexString = regexString.substr(0, regexString.length - 2) + '.*?';
}
return regexString;

View File

@@ -224,8 +224,21 @@ function escapeHtml(s) {
.replace(/'/g, "&#039;");
}
function pregQuote(str, delimiter) {
function pregQuote(str, delimiter = '') {
return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&');
}
module.exports = { removeDiacritics, escapeFilename, wrap, splitCommandString, padLeft, toTitleCase, escapeHtml, pregQuote };
function surroundKeywords(keywords, text, prefix, suffix) {
let regexString = keywords.map((k) => {
if (k.type === 'regex') {
return k.value;
} else {
return pregQuote(k);
}
}).join('|');
regexString = '\\b(' + regexString + ')\\b'
const re = new RegExp(regexString, 'gi');
return text.replace(re, prefix + '$1' + suffix);
}
module.exports = { removeDiacritics, escapeFilename, wrap, splitCommandString, padLeft, toTitleCase, urlDecode, escapeHtml, pregQuote, surroundKeywords };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More