diff --git a/Assets/All.psd b/Assets/All.psd new file mode 100644 index 000000000..00eafae47 Binary files /dev/null and b/Assets/All.psd differ diff --git a/Assets/Laptop-Terminal.psd b/Assets/Laptop-Terminal.psd new file mode 100644 index 000000000..d85196026 Binary files /dev/null and b/Assets/Laptop-Terminal.psd differ diff --git a/Assets/Tablet.psd b/Assets/Tablet.psd new file mode 100644 index 000000000..c98c3bf64 Binary files /dev/null and b/Assets/Tablet.psd differ diff --git a/CliClient/app/app-gui.js b/CliClient/app/app-gui.js index 0ee800893..98424b6e4 100644 --- a/CliClient/app/app-gui.js +++ b/CliClient/app/app-gui.js @@ -327,7 +327,7 @@ class AppGui { this.stdout(_('To delete a tag, untag the associated notes.')); } else if (item.type_ === BaseModel.TYPE_SEARCH) { this.store().dispatch({ - type: 'SEARCH_REMOVE', + type: 'SEARCH_DELETE', id: item.id, }); } diff --git a/CliClient/app/build-website.js b/CliClient/app/build-website.js index cfbb535da..943a26751 100644 --- a/CliClient/app/build-website.js +++ b/CliClient/app/build-website.js @@ -157,7 +157,7 @@ const footerHtml = ` // Grocery shopping list 📝 // Work itinerary // Tuesday random note -// Vacation plans ☀️ +// Vacation plans ☀ // // // diff --git a/CliClientDemo/database.sqlite b/CliClientDemo/database.sqlite index 351371468..d1b9b6f69 100644 Binary files a/CliClientDemo/database.sqlite and b/CliClientDemo/database.sqlite differ diff --git a/CliClientDemo/package-lock.json b/CliClientDemo/package-lock.json index 8a0c9ffd1..35b65b146 100644 --- a/CliClientDemo/package-lock.json +++ b/CliClientDemo/package-lock.json @@ -1,6 +1,6 @@ { "name": "demo-joplin", - "version": "1.0.6", + "version": "1.0.8", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -25,7 +25,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", "requires": { - "color-convert": "1.9.0" + "color-convert": "1.9.1" } }, "app-module-path": { @@ -79,23 +79,6 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, - "babel-plugin-transform-runtime": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz", - "integrity": "sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=", - "requires": { - "babel-runtime": "6.26.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { - "core-js": "2.5.1", - "regenerator-runtime": "0.11.0" - } - }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -113,11 +96,6 @@ "hoek": "4.2.0" } }, - "cache-require-paths": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/cache-require-paths/-/cache-require-paths-0.3.0.tgz", - "integrity": "sha1-EqYHWj5JiNpMIvIY4pSFZj5MSmM=" - }, "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", @@ -165,18 +143,18 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/color/-/color-2.0.0.tgz", - "integrity": "sha1-4MmXLR6WmFcASxAeqlXOq1lh1n0=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color/-/color-2.0.1.tgz", + "integrity": "sha512-ubUCVVKfT7r2w2D3qtHakj8mbmKms+tThR8gI8zEYCbUBl8/voqFGt3kgBqGwXAopgXybnkuOq+qMYCRrp4cXw==", "requires": { - "color-convert": "1.9.0", + "color-convert": "1.9.1", "color-string": "1.5.2" } }, "color-convert": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.0.tgz", - "integrity": "sha1-Gsz5fdc5uYO/mU1W/sj5WFNkG3o=", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "requires": { "color-name": "1.1.3" } @@ -212,11 +190,6 @@ "proto-list": "1.2.4" } }, - "core-js": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", - "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -306,6 +279,53 @@ "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": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -395,7 +415,7 @@ "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", "requires": { - "npm-conf": "1.1.2" + "npm-conf": "1.1.3" } }, "getpass": { @@ -425,6 +445,21 @@ "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": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", @@ -454,11 +489,21 @@ "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": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -577,22 +622,21 @@ } }, "joplin": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/joplin/-/joplin-0.10.64.tgz", - "integrity": "sha512-CdhUZCnbpGmvOJqpeJp4ri9kGk6nP+VxulbaJLx8MTWho8n3tBRHcvAGP/lOLovFvUy760lOyzqHiYfcimonJQ==", + "version": "0.10.69", + "resolved": "https://registry.npmjs.org/joplin/-/joplin-0.10.69.tgz", + "integrity": "sha512-P5b7pRiUqM2O/vG4etiAquGd7LM6j/eh93OmQgJmfcGu5F6D9DJERIjBP8Po/BnzXQVxsGnURHr3SmLlaUxQSg==", "requires": { "app-module-path": "2.2.0", - "babel-plugin-transform-runtime": "6.23.0", - "cache-require-paths": "0.3.0", "follow-redirects": "1.2.5", "form-data": "2.3.1", "fs-extra": "3.0.1", + "html-entities": "1.2.1", "jssha": "2.3.1", "levenshtein": "1.0.5", "lodash": "4.17.4", "md5": "2.2.1", "mime": "2.0.3", - "moment": "2.19.1", + "moment": "2.19.2", "node-fetch": "1.7.3", "node-persist": "2.1.0", "os-tmpdir": "1.0.2", @@ -603,14 +647,13 @@ "sax": "1.2.4", "server-destroy": "1.0.1", "sharp": "0.18.4", - "source-map-support": "0.4.18", "sprintf-js": "1.1.1", "sqlite3": "3.1.13", "string-padding": "1.0.2", "string-to-stream": "1.1.0", "strip-ansi": "4.0.0", "tcp-port-used": "0.1.2", - "tkwidgets": "0.5.19", + "tkwidgets": "0.5.20", "uuid": "3.1.0", "word-wrap": "1.2.3", "yargs-parser": "7.0.0" @@ -719,6 +762,14 @@ "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": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", @@ -782,9 +833,9 @@ } }, "moment": { - "version": "2.19.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.1.tgz", - "integrity": "sha1-VtoaLRy/AdOLfhr8McELz6GSkWc=" + "version": "2.19.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.2.tgz", + "integrity": "sha512-Rf6jiHPEfxp9+dlzxPTmRHbvoFXsh2L/U8hOupUMpnuecHQmI6cF6lUbJl3QqKPko1u6ujO+FxtcajLVfLpAtA==" }, "ms": { "version": "2.0.0", @@ -792,9 +843,9 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nan": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", - "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" }, "ndarray": { "version": "1.0.18", @@ -850,9 +901,9 @@ } }, "npm-conf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.2.tgz", - "integrity": "sha512-dotwbpwVzfNB/2EF3A2wjK5tEMLggKfuA/8TG6WvBB1Zrv+JsvF7E8ei9B/HGq211st/GwXFbREcNJvJ1eySUQ==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", "requires": { "config-chain": "1.1.11", "pify": "3.0.0" @@ -985,11 +1036,6 @@ "symbol-observable": "1.0.4" } }, - "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" - }, "request": { "version": "2.83.0", "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", @@ -1050,9 +1096,9 @@ "integrity": "sha1-/jKcDwaJbCiqJDdt8f/wKuV/LTQ=", "requires": { "caw": "2.0.1", - "color": "2.0.0", + "color": "2.0.1", "detect-libc": "0.2.0", - "nan": "2.7.0", + "nan": "2.8.0", "semver": "5.4.1", "simple-get": "2.7.0", "tar": "3.2.1" @@ -1097,19 +1143,6 @@ "hoek": "4.2.0" } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "0.5.7" - } - }, "sprintf-js": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.1.tgz", @@ -1518,6 +1551,11 @@ "version": "2.0.0", "bundled": true }, + "nan": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.7.0.tgz", + "integrity": "sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY=" + }, "node-pre-gyp": { "version": "0.6.38", "bundled": true, @@ -1947,9 +1985,9 @@ } }, "terminal-kit": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/terminal-kit/-/terminal-kit-1.14.0.tgz", - "integrity": "sha512-ir0I2QtcBDSg2w0UvohlqdDpGlS3S2UYBG4NnYKnK/4VywgnbfxgdpXN3el0uCH3OeH6fG38luW7RmDM96FqUw==", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/terminal-kit/-/terminal-kit-1.14.3.tgz", + "integrity": "sha512-ZHtuElnBhK0IXOYNvQ7eYgaArwEoOv7saQc4Q0Z9p02JeC7iajC20/odV77BKB3jw/Qthvf9mpASf8gNDYv7xQ==", "requires": { "async-kit": "2.2.3", "get-pixels": "3.3.0", @@ -1965,15 +2003,16 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, "tkwidgets": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.19.tgz", - "integrity": "sha512-Etskz52RInmmB1aGD9cIodIZ33Gwf0yPP3+lh6ceANgS4N8LpquQajDRyahjZnvwDhfYdo1N87eEKzXBJbLQDg==", + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/tkwidgets/-/tkwidgets-0.5.20.tgz", + "integrity": "sha512-9wGsMrrFJvE/6TKUc0dEFFhwxvZLeNsYOxnpy1JCwyk/hYCEF70nuvk7VvJeG4TPaQBaGKPj6c7pCgdREvz4Jw==", "requires": { "chalk": "2.3.0", + "emphasize": "1.5.0", "node-emoji": "git+https://github.com/laurent22/node-emoji.git#9fa01eac463e94dde1316ef8c53089eeef4973b5", "slice-ansi": "1.0.0", "string-width": "2.1.1", - "terminal-kit": "1.14.0", + "terminal-kit": "1.14.3", "wrap-ansi": "3.0.1" } }, diff --git a/CliClientDemo/package.json b/CliClientDemo/package.json index 0b15c803f..136a2687e 100644 --- a/CliClientDemo/package.json +++ b/CliClientDemo/package.json @@ -1,6 +1,6 @@ { "name": "demo-joplin", - "version": "1.0.6", + "version": "1.0.8", "description": "Demo for Joplin CLI", "bin": { "demo-joplin": "./index.js" @@ -25,7 +25,7 @@ }, "dependencies": { "fs-extra": "^4.0.2", - "joplin": "^0.10.64" + "joplin": "^0.10.69" }, "author": "Laurent Cozic", "license": "MIT" diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index 1ed31711f..786475db3 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -219,6 +219,36 @@ class Application extends BaseApplication { accelerator: 'CommandOrControl+Q', click: () => { bridge().electronApp().exit() } }] + }, { + label: _('Edit'), + submenu: [{ + label: _('Copy'), + screens: ['Main'], + role: 'copy', + accelerator: 'CommandOrControl+C', + }, { + label: _('Cut'), + screens: ['Main'], + role: 'copy', + accelerator: 'CommandOrControl+X', + }, { + label: _('Paste'), + screens: ['Main'], + role: 'copy', + accelerator: 'CommandOrControl+V', + }, { + type: 'separator', + }, { + label: _('Search in all the notes'), + screens: ['Main'], + accelerator: 'F6', + click: () => { + this.dispatch({ + type: 'WINDOW_COMMAND', + name: 'search', + }); + }, + }] }, { label: _('Tools'), submenu: [{ diff --git a/ElectronClient/app/gui/MainScreen.jsx b/ElectronClient/app/gui/MainScreen.jsx index 9c52887d2..18f6ccc8c 100644 --- a/ElectronClient/app/gui/MainScreen.jsx +++ b/ElectronClient/app/gui/MainScreen.jsx @@ -6,8 +6,10 @@ const { NoteList } = require('./NoteList.min.js'); const { NoteText } = require('./NoteText.min.js'); const { PromptDialog } = require('./PromptDialog.min.js'); const { Setting } = require('lib/models/setting.js'); +const { BaseModel } = require('lib/base-model.js'); const { Tag } = require('lib/models/tag.js'); const { Note } = require('lib/models/note.js'); +const { uuid } = require('lib/uuid.js'); const { Folder } = require('lib/models/folder.js'); const { themeStyle } = require('../theme.js'); const { _ } = require('lib/locale.js'); @@ -148,7 +150,35 @@ class MainScreenComponent extends React.Component { this.setState({ promptOptions: null }); } }, - }); + }); + } else if (command.name === 'search') { + this.setState({ + promptOptions: { + label: _('Seach:'), + onClose: async (answer) => { + if (answer !== null) { + const searchId = uuid.create(); + + this.props.dispatch({ + type: 'SEARCH_ADD', + search: { + id: searchId, + title: answer, + query_pattern: answer, + query_folder_id: null, + type_: BaseModel.TYPE_SEARCH, + }, + }); + + this.props.dispatch({ + type: 'SEARCH_SELECT', + id: searchId, + }); + } + this.setState({ promptOptions: null }); + } + }, + }); } else { commandProcessed = false; } @@ -222,6 +252,12 @@ class MainScreenComponent extends React.Component { onClick: () => { this.doCommand({ name: 'newNotebook' }) }, }); + headerButtons.push({ + title: _('Seach'), + iconName: 'fa-search', + onClick: () => { this.doCommand({ name: 'search' }) }, + }); + headerButtons.push({ title: _('Layout'), iconName: 'fa-columns', diff --git a/ElectronClient/app/gui/SideBar.jsx b/ElectronClient/app/gui/SideBar.jsx index f3f0feccb..8cfbfc964 100644 --- a/ElectronClient/app/gui/SideBar.jsx +++ b/ElectronClient/app/gui/SideBar.jsx @@ -100,6 +100,8 @@ class SideBarComponent extends React.Component { deleteMessage = _('Delete notebook?'); } else if (itemType === BaseModel.TYPE_TAG) { deleteMessage = _('Remove this tag from all the notes?'); + } else if (itemType === BaseModel.TYPE_SEARCH) { + deleteMessage = _('Remove this search from the sidebar?'); } const menu = new Menu(); @@ -112,16 +114,23 @@ class SideBarComponent extends React.Component { await Folder.delete(itemId); } else if (itemType === BaseModel.TYPE_TAG) { await Tag.untagAll(itemId); + } else if (itemType === BaseModel.TYPE_SEARCH) { + this.props.dispatch({ + type: 'SEARCH_DELETE', + id: itemId, + }); } }})) - menu.append(new MenuItem({label: _('Rename'), click: async () => { - this.props.dispatch({ - type: 'WINDOW_COMMAND', - name: 'renameNotebook', - id: itemId, - }); - }})) + if (itemType === BaseModel.TYPE_FOLDER) { + menu.append(new MenuItem({label: _('Rename'), click: async () => { + this.props.dispatch({ + type: 'WINDOW_COMMAND', + name: 'renameNotebook', + id: itemId, + }); + }})) + } menu.popup(bridge().window()); } @@ -140,6 +149,13 @@ class SideBarComponent extends React.Component { }); } + searchItem_click(search) { + this.props.dispatch({ + type: 'SEARCH_SELECT', + id: search ? search.id : null, + }); + } + async sync_click() { await shared.synchronize_press(this); } @@ -157,6 +173,12 @@ class SideBarComponent extends React.Component { return this.itemContextMenu(event)} key={tag.id} style={style} onClick={() => {this.tagItem_click(tag)}}>{tag.title} } + searchItem(search, selected) { + let style = Object.assign({}, this.style().listItem); + if (selected) style = Object.assign(style, this.style().listItemSelected); + return this.itemContextMenu(event)} key={search.id} style={style} onClick={() => {this.searchItem_click(search)}}>{search.title} + } + makeDivider(key) { return
} @@ -196,6 +218,14 @@ class SideBarComponent extends React.Component { items.push(