You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
Merge branch 'master' of github.com:laurent22/joplin
This commit is contained in:
@@ -992,7 +992,6 @@ describe('Synchronizer', function() {
|
|||||||
it('should create remote items with UTF-8 content', asyncTest(async () => {
|
it('should create remote items with UTF-8 content', asyncTest(async () => {
|
||||||
let folder = await Folder.save({ title: "Fahrräder" });
|
let folder = await Folder.save({ title: "Fahrräder" });
|
||||||
await Note.save({ title: "Fahrräder", body: "Fahrräder", parent_id: folder.id });
|
await Note.save({ title: "Fahrräder", body: "Fahrräder", parent_id: folder.id });
|
||||||
|
|
||||||
let all = await allItems();
|
let all = await allItems();
|
||||||
|
|
||||||
await synchronizer().start();
|
await synchronizer().start();
|
||||||
|
@@ -51,12 +51,12 @@ SyncTargetRegistry.addClass(SyncTargetFilesystem);
|
|||||||
SyncTargetRegistry.addClass(SyncTargetOneDrive);
|
SyncTargetRegistry.addClass(SyncTargetOneDrive);
|
||||||
SyncTargetRegistry.addClass(SyncTargetNextcloud);
|
SyncTargetRegistry.addClass(SyncTargetNextcloud);
|
||||||
|
|
||||||
const syncTargetId_ = SyncTargetRegistry.nameToId('nextcloud');
|
//const syncTargetId_ = SyncTargetRegistry.nameToId('nextcloud');
|
||||||
//const syncTargetId_ = SyncTargetRegistry.nameToId('memory');
|
const syncTargetId_ = SyncTargetRegistry.nameToId('memory');
|
||||||
//const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem');
|
//const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem');
|
||||||
const syncDir = __dirname + '/../tests/sync';
|
const syncDir = __dirname + '/../tests/sync';
|
||||||
|
|
||||||
const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 10;//400;
|
const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 1;//400;
|
||||||
|
|
||||||
console.info('Testing with sync target: ' + SyncTargetRegistry.idToName(syncTargetId_));
|
console.info('Testing with sync target: ' + SyncTargetRegistry.idToName(syncTargetId_));
|
||||||
|
|
||||||
@@ -75,6 +75,8 @@ BaseItem.loadClass('MasterKey', MasterKey);
|
|||||||
Setting.setConstant('appId', 'net.cozic.joplin-cli');
|
Setting.setConstant('appId', 'net.cozic.joplin-cli');
|
||||||
Setting.setConstant('appType', 'cli');
|
Setting.setConstant('appType', 'cli');
|
||||||
|
|
||||||
|
Setting.autoSaveEnabled = false;
|
||||||
|
|
||||||
function syncTargetId() {
|
function syncTargetId() {
|
||||||
return syncTargetId_;
|
return syncTargetId_;
|
||||||
}
|
}
|
||||||
|
@@ -18,15 +18,15 @@ Three types of applications are available: for the **desktop** (Windows, macOS a
|
|||||||
|
|
||||||
Operating System | Download
|
Operating System | Download
|
||||||
-----------------|--------
|
-----------------|--------
|
||||||
Windows | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.62/Joplin-Setup-1.0.62.exe'><img alt='Get it on Windows' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeWindows.png'/></a>
|
Windows | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.63/Joplin-Setup-1.0.63.exe'><img alt='Get it on Windows' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeWindows.png'/></a>
|
||||||
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.62/Joplin-1.0.62.dmg'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeMacOS.png'/></a>
|
macOS | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.63/Joplin-1.0.63.dmg'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeMacOS.png'/></a>
|
||||||
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.62/Joplin-1.0.62-x86_64.AppImage'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeLinux.png'/></a>
|
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v1.0.63/Joplin-1.0.63-x86_64.AppImage'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeLinux.png'/></a>
|
||||||
|
|
||||||
## Mobile applications
|
## Mobile applications
|
||||||
|
|
||||||
Operating System | Download | Alt. Download
|
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://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.95/joplin-v1.0.95.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://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeAndroid.png'/></a> | or [Download APK File](https://github.com/laurent22/joplin-android/releases/download/android-v1.0.97/joplin-v1.0.97.apk)
|
||||||
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeIOS.png'/></a> | -
|
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeIOS.png'/></a> | -
|
||||||
|
|
||||||
## Terminal application
|
## Terminal application
|
||||||
|
@@ -90,8 +90,8 @@ android {
|
|||||||
applicationId "net.cozic.joplin"
|
applicationId "net.cozic.joplin"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 2097273
|
versionCode 2097275
|
||||||
versionName "1.0.95"
|
versionName "1.0.97"
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "x86"
|
abiFilters "armeabi-v7a", "x86"
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ class FileApiDriverMemory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
decodeContent_(content) {
|
decodeContent_(content) {
|
||||||
return Buffer.from(content, 'base64').toString('ascii');
|
return Buffer.from(content, 'base64').toString('utf-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
itemIndexByPath(path) {
|
itemIndexByPath(path) {
|
||||||
@@ -49,14 +49,13 @@ class FileApiDriverMemory {
|
|||||||
return Promise.resolve(item ? Object.assign({}, item) : null);
|
return Promise.resolve(item ? Object.assign({}, item) : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimestamp(path, timestampMs) {
|
async setTimestamp(path, timestampMs) {
|
||||||
let item = this.itemByPath(path);
|
let item = this.itemByPath(path);
|
||||||
if (!item) return Promise.reject(new Error('File not found: ' + path));
|
if (!item) return Promise.reject(new Error('File not found: ' + path));
|
||||||
item.updated_time = timestampMs;
|
item.updated_time = timestampMs;
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list(path, options) {
|
async list(path, options) {
|
||||||
let output = [];
|
let output = [];
|
||||||
|
|
||||||
for (let i = 0; i < this.items_.length; i++) {
|
for (let i = 0; i < this.items_.length; i++) {
|
||||||
@@ -95,11 +94,10 @@ class FileApiDriverMemory {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir(path) {
|
async mkdir(path) {
|
||||||
let index = this.itemIndexByPath(path);
|
let index = this.itemIndexByPath(path);
|
||||||
if (index >= 0) return Promise.resolve();
|
if (index >= 0) return;
|
||||||
this.items_.push(this.newItem(path, true));
|
this.items_.push(this.newItem(path, true));
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async put(path, content, options = null) {
|
async put(path, content, options = null) {
|
||||||
@@ -116,10 +114,9 @@ class FileApiDriverMemory {
|
|||||||
this.items_[index].content = this.encodeContent_(content);
|
this.items_[index].content = this.encodeContent_(content);
|
||||||
this.items_[index].updated_time = time.unix();
|
this.items_[index].updated_time = time.unix();
|
||||||
}
|
}
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(path) {
|
async delete(path) {
|
||||||
let index = this.itemIndexByPath(path);
|
let index = this.itemIndexByPath(path);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
let item = Object.assign({}, this.items_[index]);
|
let item = Object.assign({}, this.items_[index]);
|
||||||
@@ -128,20 +125,17 @@ class FileApiDriverMemory {
|
|||||||
this.deletedItems_.push(item);
|
this.deletedItems_.push(item);
|
||||||
this.items_.splice(index, 1);
|
this.items_.splice(index, 1);
|
||||||
}
|
}
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
move(oldPath, newPath) {
|
async move(oldPath, newPath) {
|
||||||
let sourceItem = this.itemByPath(oldPath);
|
let sourceItem = this.itemByPath(oldPath);
|
||||||
if (!sourceItem) return Promise.reject(new Error('Path not found: ' + oldPath));
|
if (!sourceItem) return Promise.reject(new Error('Path not found: ' + oldPath));
|
||||||
this.delete(newPath); // Overwrite if newPath already exists
|
this.delete(newPath); // Overwrite if newPath already exists
|
||||||
sourceItem.path = newPath;
|
sourceItem.path = newPath;
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
format() {
|
async format() {
|
||||||
this.items_ = [];
|
this.items_ = [];
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async delta(path, options = null) {
|
async delta(path, options = null) {
|
||||||
@@ -159,9 +153,8 @@ class FileApiDriverMemory {
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
clearRoot() {
|
async clearRoot() {
|
||||||
this.items_ = [];
|
this.items_ = [];
|
||||||
return Promise.resolve();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -429,7 +429,7 @@ class Setting extends BaseModel {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
static saveAll() {
|
static async saveAll() {
|
||||||
if (!this.saveTimeoutId_) return Promise.resolve();
|
if (!this.saveTimeoutId_) return Promise.resolve();
|
||||||
|
|
||||||
this.logger().info('Saving settings...');
|
this.logger().info('Saving settings...');
|
||||||
@@ -444,12 +444,14 @@ class Setting extends BaseModel {
|
|||||||
queries.push(Database.insertQuery(this.tableName(), s));
|
queries.push(Database.insertQuery(this.tableName(), s));
|
||||||
}
|
}
|
||||||
|
|
||||||
return BaseModel.db().transactionExecBatch(queries).then(() => {
|
await BaseModel.db().transactionExecBatch(queries);
|
||||||
|
|
||||||
this.logger().info('Settings have been saved.');
|
this.logger().info('Settings have been saved.');
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static scheduleSave() {
|
static scheduleSave() {
|
||||||
|
if (!Setting.autoSaveEnabled) return;
|
||||||
|
|
||||||
if (this.saveTimeoutId_) clearTimeout(this.saveTimeoutId_);
|
if (this.saveTimeoutId_) clearTimeout(this.saveTimeoutId_);
|
||||||
|
|
||||||
this.saveTimeoutId_ = setTimeout(() => {
|
this.saveTimeoutId_ = setTimeout(() => {
|
||||||
@@ -521,4 +523,6 @@ Setting.constants_ = {
|
|||||||
openDevTools: false,
|
openDevTools: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Setting.autoSaveEnabled = true;
|
||||||
|
|
||||||
module.exports = Setting;
|
module.exports = Setting;
|
@@ -218,15 +218,15 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Windows</td>
|
<td>Windows</td>
|
||||||
<td><a href='https://github.com/laurent22/joplin/releases/download/v1.0.62/Joplin-Setup-1.0.62.exe'><img alt='Get it on Windows' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeWindows.png'/></a></td>
|
<td><a href='https://github.com/laurent22/joplin/releases/download/v1.0.63/Joplin-Setup-1.0.63.exe'><img alt='Get it on Windows' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeWindows.png'/></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>macOS</td>
|
<td>macOS</td>
|
||||||
<td><a href='https://github.com/laurent22/joplin/releases/download/v1.0.62/Joplin-1.0.62.dmg'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeMacOS.png'/></a></td>
|
<td><a href='https://github.com/laurent22/joplin/releases/download/v1.0.63/Joplin-1.0.63.dmg'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeMacOS.png'/></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Linux</td>
|
<td>Linux</td>
|
||||||
<td><a href='https://github.com/laurent22/joplin/releases/download/v1.0.62/Joplin-1.0.62-x86_64.AppImage'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeLinux.png'/></a></td>
|
<td><a href='https://github.com/laurent22/joplin/releases/download/v1.0.63/Joplin-1.0.63-x86_64.AppImage'><img alt='Get it on macOS' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeLinux.png'/></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Android</td>
|
<td>Android</td>
|
||||||
<td><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://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeAndroid.png'/></a></td>
|
<td><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://raw.githubusercontent.com/laurent22/joplin/master/docs/images/BadgeAndroid.png'/></a></td>
|
||||||
<td>or <a href="https://github.com/laurent22/joplin-android/releases/download/android-v1.0.95/joplin-v1.0.95.apk">Download APK File</a></td>
|
<td>or <a href="https://github.com/laurent22/joplin-android/releases/download/android-v1.0.97/joplin-v1.0.97.apk">Download APK File</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>iOS</td>
|
<td>iOS</td>
|
||||||
@@ -391,14 +391,14 @@ $$
|
|||||||
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/hr.png" alt=""></td>
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/hr.png" alt=""></td>
|
||||||
<td>Croatian</td>
|
<td>Croatian</td>
|
||||||
<td>hr_HR</td>
|
<td>hr_HR</td>
|
||||||
<td>Hrvoje Mandić <a href="mailto:trbuhom@net.hr">trbuhom@net.hr</a></td>
|
<td>Hrvoje Mandić <a href="mailto:trbuhom@net.hr">trbuhom@net.hr</a></td>
|
||||||
<td>72%</td>
|
<td>72%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png" alt=""></td>
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/de.png" alt=""></td>
|
||||||
<td>Deutsch</td>
|
<td>Deutsch</td>
|
||||||
<td>de_DE</td>
|
<td>de_DE</td>
|
||||||
<td>Tobias Strobel <a href="mailto:git@strobeltobias.de">git@strobeltobias.de</a></td>
|
<td>Tobias Strobel <a href="mailto:git@strobeltobias.de">git@strobeltobias.de</a></td>
|
||||||
<td>91%</td>
|
<td>91%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -454,14 +454,14 @@ $$
|
|||||||
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ru.png" alt=""></td>
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/ru.png" alt=""></td>
|
||||||
<td>Русский</td>
|
<td>Русский</td>
|
||||||
<td>ru_RU</td>
|
<td>ru_RU</td>
|
||||||
<td>Artyom Karlov <a href="mailto:artyom.karlov@gmail.com">artyom.karlov@gmail.com</a></td>
|
<td>Artyom Karlov <a href="mailto:artyom.karlov@gmail.com">artyom.karlov@gmail.com</a></td>
|
||||||
<td>94%</td>
|
<td>94%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cn.png" alt=""></td>
|
<td><img src="https://raw.githubusercontent.com/stevenrskelton/flag-icon/master/png/16/country-4x3/cn.png" alt=""></td>
|
||||||
<td>中文 (简体)</td>
|
<td>中文 (简体)</td>
|
||||||
<td>zh_CN</td>
|
<td>zh_CN</td>
|
||||||
<td>RCJacH <a href="mailto:RCJacH@outlook.com">RCJacH@outlook.com</a></td>
|
<td>RCJacH <a href="mailto:RCJacH@outlook.com">RCJacH@outlook.com</a></td>
|
||||||
<td>75%</td>
|
<td>75%</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
Reference in New Issue
Block a user