mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Merge branch 'master' into no-babel
This commit is contained in:
commit
a2219bedd7
@ -3,6 +3,7 @@
|
|||||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
BUILD_DIR="$ROOT_DIR/build"
|
BUILD_DIR="$ROOT_DIR/build"
|
||||||
|
|
||||||
|
#rm -f "$BUILD_DIR/lib/"
|
||||||
rsync -a --exclude "node_modules/" "$ROOT_DIR/app/" "$BUILD_DIR/"
|
rsync -a --exclude "node_modules/" "$ROOT_DIR/app/" "$BUILD_DIR/"
|
||||||
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
||||||
cp "$ROOT_DIR/package.json" "$BUILD_DIR"
|
cp "$ROOT_DIR/package.json" "$BUILD_DIR"
|
||||||
|
106
CliClient/package-lock.json
generated
106
CliClient/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "joplin",
|
"name": "joplin",
|
||||||
"version": "0.10.65",
|
"version": "0.10.66",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -301,6 +301,53 @@
|
|||||||
"jsbn": "0.1.1"
|
"jsbn": "0.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"emphasize": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/emphasize/-/emphasize-1.5.0.tgz",
|
||||||
|
"integrity": "sha1-48WvLdzLSYKCKjNJtHFhPMfOzJI=",
|
||||||
|
"requires": {
|
||||||
|
"chalk": "1.1.3",
|
||||||
|
"highlight.js": "9.12.0",
|
||||||
|
"lowlight": "1.9.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||||
|
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "2.2.1",
|
||||||
|
"escape-string-regexp": "1.0.5",
|
||||||
|
"has-ansi": "2.0.0",
|
||||||
|
"strip-ansi": "3.0.1",
|
||||||
|
"supports-color": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"encoding": {
|
"encoding": {
|
||||||
"version": "0.1.12",
|
"version": "0.1.12",
|
||||||
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
|
||||||
@ -456,6 +503,21 @@
|
|||||||
"har-schema": "2.0.0"
|
"har-schema": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"has-ansi": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "2.1.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
|
||||||
@ -485,6 +547,11 @@
|
|||||||
"sntp": "2.1.0"
|
"sntp": "2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"highlight.js": {
|
||||||
|
"version": "9.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz",
|
||||||
|
"integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4="
|
||||||
|
},
|
||||||
"hoek": {
|
"hoek": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz",
|
||||||
@ -722,6 +789,14 @@
|
|||||||
"js-tokens": "3.0.2"
|
"js-tokens": "3.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lowlight": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.9.1.tgz",
|
||||||
|
"integrity": "sha512-CpDhyVhI+xHjruiGvH2F/Fr5q5aTn5A6Oyh7MI+4oI8G0A1E7p9a3Zqv9Hzx9WByK8gAiNifEueAXz+cA2xdEA==",
|
||||||
|
"requires": {
|
||||||
|
"highlight.js": "9.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"md5": {
|
"md5": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
|
||||||
@ -836,12 +911,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz",
|
||||||
"integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE="
|
"integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE="
|
||||||
},
|
},
|
||||||
"node-emoji": {
|
|
||||||
"version": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
|
|
||||||
"requires": {
|
|
||||||
"lodash.toarray": "4.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node-fetch": {
|
"node-fetch": {
|
||||||
"version": "1.7.3",
|
"version": "1.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
|
||||||
@ -1848,9 +1917,9 @@
|
|||||||
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
|
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
|
||||||
},
|
},
|
||||||
"string-kit": {
|
"string-kit": {
|
||||||
"version": "0.6.2",
|
"version": "0.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/string-kit/-/string-kit-0.6.3.tgz",
|
||||||
"integrity": "sha512-cKHH+s3kZHaoIwxM1BzhPY2fcYa/rNubUkMKyrOjNjrDgroGPyJDLflTYRRXhx6orfdOi0M2sYsuBa80oedeLA==",
|
"integrity": "sha512-G2T92klsuE+S9mqdKQyWurFweNQV5X+FRzSKTqYHRdaVUN/4dL6urbYJJ+xb9ep/4XWm+4RNT8j3acncNhFRBg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"xregexp": "3.2.0"
|
"xregexp": "3.2.0"
|
||||||
}
|
}
|
||||||
@ -1955,7 +2024,7 @@
|
|||||||
"get-pixels": "3.3.0",
|
"get-pixels": "3.3.0",
|
||||||
"ndarray": "1.0.18",
|
"ndarray": "1.0.18",
|
||||||
"nextgen-events": "0.10.2",
|
"nextgen-events": "0.10.2",
|
||||||
"string-kit": "0.6.2",
|
"string-kit": "0.6.3",
|
||||||
"tree-kit": "0.5.26"
|
"tree-kit": "0.5.26"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1965,16 +2034,25 @@
|
|||||||
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
|
||||||
},
|
},
|
||||||
"tkwidgets": {
|
"tkwidgets": {
|
||||||
"version": "0.5.19",
|
"version": "0.5.20",
|
||||||
"resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.19.tgz",
|
"resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.20.tgz",
|
||||||
"integrity": "sha512-Etskz52RInmmB1aGD9cIodIZ33Gwf0yPP3+lh6ceANgS4N8LpquQajDRyahjZnvwDhfYdo1N87eEKzXBJbLQDg==",
|
"integrity": "sha512-9wGsMrrFJvE/6TKUc0dEFFhwxvZLeNsYOxnpy1JCwyk/hYCEF70nuvk7VvJeG4TPaQBaGKPj6c7pCgdREvz4Jw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"chalk": "2.3.0",
|
"chalk": "2.3.0",
|
||||||
|
"emphasize": "1.5.0",
|
||||||
"node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
|
"node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
|
||||||
"slice-ansi": "1.0.0",
|
"slice-ansi": "1.0.0",
|
||||||
"string-width": "2.1.1",
|
"string-width": "2.1.1",
|
||||||
"terminal-kit": "1.14.0",
|
"terminal-kit": "1.14.0",
|
||||||
"wrap-ansi": "3.0.1"
|
"wrap-ansi": "3.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"node-emoji": {
|
||||||
|
"version": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5",
|
||||||
|
"requires": {
|
||||||
|
"lodash.toarray": "4.4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tough-cookie": {
|
"tough-cookie": {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
],
|
],
|
||||||
"owner": "Laurent Cozic"
|
"owner": "Laurent Cozic"
|
||||||
},
|
},
|
||||||
"version": "0.10.65",
|
"version": "0.10.66",
|
||||||
"bin": {
|
"bin": {
|
||||||
"joplin": "./main.js"
|
"joplin": "./main.js"
|
||||||
},
|
},
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"string-to-stream": "^1.1.0",
|
"string-to-stream": "^1.1.0",
|
||||||
"strip-ansi": "^4.0.0",
|
"strip-ansi": "^4.0.0",
|
||||||
"tcp-port-used": "^0.1.2",
|
"tcp-port-used": "^0.1.2",
|
||||||
"tkwidgets": "^0.5.19",
|
"tkwidgets": "^0.5.20",
|
||||||
"uuid": "^3.0.1",
|
"uuid": "^3.0.1",
|
||||||
"word-wrap": "^1.2.3",
|
"word-wrap": "^1.2.3",
|
||||||
"yargs-parser": "^7.0.0"
|
"yargs-parser": "^7.0.0"
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
set -e
|
set -e
|
||||||
CLIENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
CLIENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
bash $CLIENT_DIR/build.sh && node $CLIENT_DIR/build/main.js --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
|
bash "$CLIENT_DIR/build.sh" && node "$CLIENT_DIR/build/main.js" --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
|
||||||
|
|
||||||
#bash $CLIENT_DIR/build.sh && NODE_PATH="$CLIENT_DIR/build/" node build/main.js --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
|
#bash $CLIENT_DIR/build.sh && NODE_PATH="$CLIENT_DIR/build/" node build/main.js --profile ~/Temp/TestNotes2 --stack-trace-enabled --log-level debug --env dev "$@"
|
@ -358,7 +358,7 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
# Known bugs
|
# Known bugs
|
||||||
|
|
||||||
- Non-alphabetical characters such as Chinese or Arabic might create glitches in the user interface on Windows. This is a limitation of the current Windows console.
|
- Non-alphabetical characters such as Chinese or Arabic might create glitches in the user interface on Windows. This is a limitation of the current Windows console.
|
||||||
- In the React Native app, changing the notebook of a note sometimes has no effect, due to [this bug](https://github.com/facebook/react-native/issues/15556).
|
- In the React Native app, changing the notebook of a note sometimes has no effect, due to [this bug](https://github.com/facebook/react-native/issues/15556). Due to [this other bug](https://github.com/facebook/react-native/issues/13351), changing one config value sometimes also set a different one. Waiting for Facebook to fix React Native.
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ android {
|
|||||||
applicationId "net.cozic.joplin"
|
applicationId "net.cozic.joplin"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 53
|
versionCode 54
|
||||||
versionName "0.9.40"
|
versionName "0.9.41"
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "x86"
|
abiFilters "armeabi-v7a", "x86"
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class Folder extends BaseItem {
|
|||||||
|
|
||||||
this.dispatch({
|
this.dispatch({
|
||||||
type: 'FOLDER_DELETE',
|
type: 'FOLDER_DELETE',
|
||||||
folderId: folderId,
|
id: folderId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ class Note extends BaseItem {
|
|||||||
|
|
||||||
this.dispatch({
|
this.dispatch({
|
||||||
type: 'NOTE_DELETE',
|
type: 'NOTE_DELETE',
|
||||||
noteId: id,
|
id: id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ class Note extends BaseItem {
|
|||||||
for (let i = 0; i < ids.length; i++) {
|
for (let i = 0; i < ids.length; i++) {
|
||||||
this.dispatch({
|
this.dispatch({
|
||||||
type: 'NOTE_DELETE',
|
type: 'NOTE_DELETE',
|
||||||
noteId: ids[i],
|
id: ids[i],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -46,21 +46,18 @@ class Tag extends BaseItem {
|
|||||||
await NoteTag.delete(noteTags[i].id);
|
await NoteTag.delete(noteTags[i].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tags = await Tag.allWithNotes();
|
await Tag.delete(tagId);
|
||||||
|
}
|
||||||
|
|
||||||
|
static async delete(id, options = null) {
|
||||||
|
if (!options) options = {};
|
||||||
|
|
||||||
|
await super.delete(id, options);
|
||||||
|
|
||||||
this.dispatch({
|
this.dispatch({
|
||||||
type: 'TAG_UPDATE_ALL',
|
type: 'TAG_DELETE',
|
||||||
tags: tags,
|
id: id,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.dispatch({
|
|
||||||
type: 'TAG_SELECT',
|
|
||||||
id: null,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Currently not actually deleting it as the reducer would need to be updated. The
|
|
||||||
// tag will stay in the db but just won't show up in the UI.
|
|
||||||
//await Tag.delete(tagId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static async addNote(tagId, noteId) {
|
static async addNote(tagId, noteId) {
|
||||||
|
@ -26,23 +26,29 @@ const defaultState = {
|
|||||||
windowContentSize: { width: 0, height: 0 },
|
windowContentSize: { width: 0, height: 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
function folderOrNoteDelete(state, action) {
|
// When deleting a note, tag or folder
|
||||||
|
function handleItemDelete(state, action) {
|
||||||
let newState = Object.assign({}, state);
|
let newState = Object.assign({}, state);
|
||||||
|
|
||||||
const idKey = action.type === 'FOLDER_DELETE' ? 'folderId' : 'noteId';
|
const map = {
|
||||||
const listKey = action.type === 'FOLDER_DELETE' ? 'folders' : 'notes';
|
'FOLDER_DELETE': ['folders', 'selectedFolderId'],
|
||||||
const selectedItemKey = action.type === 'FOLDER_DELETE' ? 'selectedFolderId' : 'selectedNoteId';
|
'NOTE_DELETE': ['notes', 'selectedNoteId'],
|
||||||
|
'TAG_DELETE': ['tags', 'selectedTagId'],
|
||||||
|
};
|
||||||
|
|
||||||
|
const listKey = map[action.type][0];
|
||||||
|
const selectedItemKey = map[action.type][1];
|
||||||
|
|
||||||
let previousIndex = 0;
|
let previousIndex = 0;
|
||||||
let newItems = [];
|
let newItems = [];
|
||||||
const items = state[listKey];
|
const items = state[listKey];
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
let f = items[i];
|
let item = items[i];
|
||||||
if (f.id == action[idKey]) {
|
if (item.id == action.id) {
|
||||||
previousIndex = i;
|
previousIndex = i;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
newItems.push(f);
|
newItems.push(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
newState = Object.assign({}, state);
|
newState = Object.assign({}, state);
|
||||||
@ -190,7 +196,12 @@ const reducer = (state = defaultState, action) => {
|
|||||||
|
|
||||||
case 'NOTE_DELETE':
|
case 'NOTE_DELETE':
|
||||||
|
|
||||||
newState = folderOrNoteDelete(state, action);
|
newState = handleItemDelete(state, action);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'TAG_DELETE':
|
||||||
|
|
||||||
|
newState = handleItemDelete(state, action);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'FOLDER_UPDATE_ALL':
|
case 'FOLDER_UPDATE_ALL':
|
||||||
@ -228,7 +239,7 @@ const reducer = (state = defaultState, action) => {
|
|||||||
|
|
||||||
case 'FOLDER_DELETE':
|
case 'FOLDER_DELETE':
|
||||||
|
|
||||||
newState = folderOrNoteDelete(state, action);
|
newState = handleItemDelete(state, action);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'SYNC_STARTED':
|
case 'SYNC_STARTED':
|
||||||
|
Loading…
Reference in New Issue
Block a user