+ onSnippetSelect={this.handleSnippetSelect.bind(this)}
+ onSnippetDeleted={this.handleDeleteSnippet.bind(this)}
+ currentSnippet={currentSnippet} />
{i18n.__('Snippet name')}
diff --git a/browser/main/modals/PreferencesModal/SnippetTab.styl b/browser/main/modals/PreferencesModal/SnippetTab.styl
index 118c56ed..02307b64 100644
--- a/browser/main/modals/PreferencesModal/SnippetTab.styl
+++ b/browser/main/modals/PreferencesModal/SnippetTab.styl
@@ -122,6 +122,10 @@
&:hover
background darken(#f5f5f5, 5)
+ .snippet-item-selected
+ @extend .snippet-list .snippet-item
+ background darken(#f5f5f5, 5)
+
.snippet-detail
width 70%
height calc(100% - 200px)
@@ -142,6 +146,8 @@ body[data-theme="default"], body[data-theme="white"]
background $ui-borderColor
&:hover
background darken($ui-backgroundColor, 5)
+ .snippet-item-selected
+ background darken($ui-backgroundColor, 5)
body[data-theme="dark"]
.snippets
@@ -152,8 +158,12 @@ body[data-theme="dark"]
background $ui-dark-borderColor
&:hover
background darken($ui-dark-backgroundColor, 5)
+ .snippet-item-selected
+ background darken($ui-dark-backgroundColor, 5)
.snippet-detail
color white
+ .group-control-button
+ colorDarkPrimaryButton()
body[data-theme="solarized-dark"]
.snippets
@@ -164,8 +174,12 @@ body[data-theme="solarized-dark"]
background $ui-solarized-dark-borderColor
&:hover
background darken($ui-solarized-dark-backgroundColor, 5)
+ .snippet-item-selected
+ background darken($ui-solarized-dark-backgroundColor, 5)
.snippet-detail
color white
+ .group-control-button
+ colorSolarizedDarkPrimaryButton()
body[data-theme="monokai"]
.snippets
@@ -176,5 +190,9 @@ body[data-theme="monokai"]
background $ui-monokai-borderColor
&:hover
background darken($ui-monokai-backgroundColor, 5)
+ .snippet-item-selected
+ background darken($ui-monokai-backgroundColor, 5)
.snippet-detail
color white
+ .group-control-button
+ colorMonokaiPrimaryButton()
diff --git a/browser/main/modals/PreferencesModal/UiTab.js b/browser/main/modals/PreferencesModal/UiTab.js
index ce149f65..aa3568e7 100644
--- a/browser/main/modals/PreferencesModal/UiTab.js
+++ b/browser/main/modals/PreferencesModal/UiTab.js
@@ -11,6 +11,7 @@ import 'codemirror-mode-elixir'
import _ from 'lodash'
import i18n from 'browser/lib/i18n'
import { getLanguages } from 'browser/lib/Languages'
+import normalizeEditorFontFamily from 'browser/lib/normalizeEditorFontFamily'
const OSX = global.process.platform === 'darwin'
@@ -164,7 +165,7 @@ class UiTab extends React.Component {
const { config, codemirrorTheme } = this.state
const codemirrorSampleCode = 'function iamHappy (happy) {\n\tif (happy) {\n\t console.log("I am Happy!")\n\t} else {\n\t console.log("I am not Happy!")\n\t}\n};'
const enableEditRulersStyle = config.editor.enableRulers ? 'block' : 'none'
- const customCSS = config.preview.customCSS
+ const fontFamily = normalizeEditorFontFamily(config.editor.fontFamily)
return (
@@ -262,8 +263,16 @@ class UiTab extends React.Component {
})
}
-
-
(this.codeMirrorInstance = e)} value={codemirrorSampleCode} options={{ lineNumbers: true, readOnly: true, mode: 'javascript', theme: codemirrorTheme }} />
+
+ (this.codeMirrorInstance = e)}
+ value={codemirrorSampleCode}
+ options={{
+ lineNumbers: true,
+ readOnly: true,
+ mode: 'javascript',
+ theme: codemirrorTheme
+ }} />
@@ -596,7 +605,19 @@ class UiTab extends React.Component {
type='checkbox'
/>
{i18n.__('Allow custom CSS for preview')}
-
this.handleUIChange(e)} ref={e => (this.customCSSCM = e)} value={config.preview.customCSS} options={{ lineNumbers: true, mode: 'css', theme: codemirrorTheme }} />
+
+ this.handleUIChange(e)}
+ ref={e => (this.customCSSCM = e)}
+ value={config.preview.customCSS}
+ options={{
+ lineNumbers: true,
+ mode: 'css',
+ theme: codemirrorTheme
+ }} />
+
diff --git a/browser/main/store.js b/browser/main/store.js
index 7ea6decb..a1b6b791 100644
--- a/browser/main/store.js
+++ b/browser/main/store.js
@@ -360,6 +360,12 @@ function data (state = defaultDataMap(), action) {
state.storageMap = new Map(state.storageMap)
state.storageMap.set(action.storage.key, action.storage)
return state
+ case 'EXPAND_STORAGE':
+ state = Object.assign({}, state)
+ state.storageMap = new Map(state.storageMap)
+ action.storage.isOpen = action.isOpen
+ state.storageMap.set(action.storage.key, action.storage)
+ return state
}
return state
}
diff --git a/lib/main-app.js b/lib/main-app.js
index e7e52715..1f3f1320 100644
--- a/lib/main-app.js
+++ b/lib/main-app.js
@@ -90,7 +90,7 @@ app.on('ready', function () {
mainWindow.setMenu(menu)
}
- // Check update every hour
+ // Check update every day
setInterval(function () {
checkUpdate()
}, 1000 * 60 * 60 * 24)
@@ -106,7 +106,7 @@ app.on('ready', function () {
checkUpdate()
}
})
- }, 10000)
+ }, 10 * 1000)
ipcServer = require('./ipcServer')
ipcServer.server.start()
})
diff --git a/locales/fr.json b/locales/fr.json
index a5a41294..00d9c7e1 100644
--- a/locales/fr.json
+++ b/locales/fr.json
@@ -141,17 +141,17 @@
"Portuguese": "Portugais",
"Spanish": "Espagnol",
"You have to save!": "Il faut sauvegarder !",
- "Russian": "Russian",
+ "Russian": "Russe",
"Command(⌘)": "Command(⌘)",
- "Editor Rulers": "Editor Rulers",
- "Enable": "Enable",
- "Disable": "Disable",
- "Allow preview to scroll past the last line": "Allow preview to scroll past the last line",
+ "Editor Rulers": "Règles dans l'éditeur",
+ "Enable": "Activer",
+ "Disable": "Désactiver",
+ "Allow preview to scroll past the last line": "Permettre de scroller après la dernière ligne dans l'aperçu",
"Sanitization": "Sanitization",
- "Only allow secure html tags (recommended)": "Only allow secure html tags (recommended)",
- "Allow styles": "Allow styles",
- "Allow dangerous html tags": "Allow dangerous html tags",
- "Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.": "Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.",
- "⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠": "⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠",
- "Disabled": "Disabled"
+ "Only allow secure html tags (recommended)": "N'accepter que les tags html sécurisés (recommandé)",
+ "Allow styles": "Accepter les styles",
+ "Allow dangerous html tags": "Accepter les tags html dangereux",
+ "Convert textual arrows to beautiful signs. ⚠ This will interfere with using HTML comments in your Markdown.": "Convertir des flèches textuelles en jolis signes. ⚠ Cela va interferérer avec les éventuels commentaires HTML dans votre Markdown.",
+ "⚠ You have pasted a link referring an attachment that could not be found in the storage location of this note. Pasting links referring attachments is only supported if the source and destination location is the same storage. Please Drag&Drop the attachment instead! ⚠": "⚠ Vous avez collé un lien qui référence une pièce-jointe qui n'a pas pu être récupéré dans le dossier de stockage de la note. Coller des liens qui font référence à des pièces-jointes ne fonctionne que si la source et la destination et la même. Veuillez plutôt utiliser du Drag & Drop ! ⚠",
+ "Disabled": "Disabled"
}
diff --git a/locales/zh-TW.json b/locales/zh-TW.json
index 25afe11c..01fab07b 100755
--- a/locales/zh-TW.json
+++ b/locales/zh-TW.json
@@ -4,10 +4,10 @@
"Preferences": "偏好設定",
"Make a note": "做點筆記",
"Ctrl": "Ctrl",
- "Ctrl(^)": "Ctrl",
+ "Ctrl(^)": "Ctrl(^)",
"to create a new note": "新增筆記",
"Toggle Mode": "切換模式",
- "Trash": "廢紙簍",
+ "Trash": "垃圾桶",
"MODIFICATION DATE": "修改時間",
"Words": "單字",
"Letters": "字數",
@@ -20,8 +20,8 @@
".html": ".html",
"Print": "列印",
"Your preferences for Boostnote": "Boostnote 偏好設定",
- "Storages": "本機儲存空間",
- "Add Storage Location": "新增一個本機儲存位置",
+ "Storages": "儲存空間",
+ "Add Storage Location": "新增儲存位置",
"Add Folder": "新增資料夾",
"Open Storage folder": "開啟儲存資料夾",
"Unlink": "解除連結",
@@ -43,12 +43,12 @@
"Switch to Preview": "切回預覽頁面的時機",
"When Editor Blurred": "當編輯器失去焦點時",
"When Editor Blurred, Edit On Double Click": "當編輯器失去焦點時,雙擊切換到編輯畫面",
- "On Right Click": "點擊右鍵切換兩個頁面",
+ "On Right Click": "點選右鍵切換兩個頁面",
"Editor Keymap": "編輯器 Keymap",
"default": "預設",
"vim": "vim",
"emacs": "emacs",
- "⚠️ Please restart boostnote after you change the keymap": "⚠️ 請重新開啟 Boostnote 以完成設定。",
+ "⚠️ Please restart boostnote after you change the keymap": "⚠️ 修改鍵盤配置請重新開啟 Boostnote ",
"Show line numbers in the editor": "在編輯器中顯示行號",
"Allow editor to scroll past the last line": "允許編輯器捲軸捲動超過最後一行",
"Bring in web page title when pasting URL on editor": "在編輯器貼上網址的時候,自動加上網頁標題",
@@ -79,7 +79,7 @@
"Analytics": "分析",
"Boostnote collects anonymous data for the sole purpose of improving the application, and strictly does not collect any personal information such the contents of your notes.": "Boostnote 收集匿名資料單純只為了提升軟體使用體驗,絕對不收集任何個人資料(包括筆記內容)",
"You can see how it works on ": "你可以看看它的程式碼是如何運作 ",
- "You can choose to enable or disable this option.": "你可以選擇啟用或禁用這項功能",
+ "You can choose to enable or disable this option.": "你可以選擇啟用或停用這項功能",
"Enable analytics to help improve Boostnote": "允許數據分析以協助我們改進 Boostnote",
"Crowdfunding": "群眾募資",
"Dear everyone,": "親愛的用戶:",
@@ -104,9 +104,9 @@
"Confirm": "確認",
"Cancel": "取消",
"Markdown Note": "Markdown 筆記",
- "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.": "建立文件、清單,也可以使用程式碼區塊甚至是 Latex 區塊。",
+ "This format is for creating text documents. Checklists, code blocks and Latex blocks are available.": "建立文件、清單,也可以使用程式碼區塊及 Latex 區塊。",
"Snippet Note": "程式碼片段筆記",
- "This format is for creating code snippets. Multiple snippets can be grouped into a single note.": "建立程式碼區塊片段。數個程式碼區塊可以合在同一個筆記裡。",
+ "This format is for creating code snippets. Multiple snippets can be grouped into a single note.": "建立程式碼區塊片段。多個程式碼區塊可以分組爲同一個筆記。",
"Tab to switch format": "使用 Tab 鍵切換格式",
"Updated": "依更新時間排序",
"Created": "依建立時間排序",
@@ -117,12 +117,12 @@
"Blog Type": "部落格類型",
"Blog Address": "部落格網址",
"Save": "儲存",
- "Auth": "Auth",
+ "Auth": "驗證",
"Authentication Method": "認證方法",
"JWT": "JWT",
"USER": "USER",
"Token": "Token",
- "Storage": "本機儲存空間",
+ "Storage": "儲存空間",
"Hotkeys": "快捷鍵",
"Show/Hide Boostnote": "顯示/隱藏 Boostnote",
"Restore": "還原",
@@ -144,7 +144,7 @@
"Russian": "Russian",
"Editor Rulers": "編輯器中顯示垂直尺規",
"Enable": "啟用",
- "Disable": "禁用",
+ "Disable": "停用",
"Sanitization": "過濾 HTML 程式碼",
"Only allow secure html tags (recommended)": "只允許安全的 HTML 標籤 (建議)",
"Allow styles": "允許樣式",
diff --git a/package.json b/package.json
index 91c976e3..158cc7d2 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "boost",
"productName": "Boostnote",
- "version": "0.11.6",
+ "version": "0.11.7",
"main": "index.js",
"description": "Boostnote",
"license": "GPL-3.0",
@@ -17,7 +17,7 @@
"dev-start": "concurrently --kill-others \"npm run webpack\" \"npm run hot\""
},
"config": {
- "electron-version": "1.8.7"
+ "electron-version": "2.0.3"
},
"repository": {
"type": "git",
@@ -53,11 +53,12 @@
"@rokt33r/season": "^5.3.0",
"aws-sdk": "^2.48.0",
"aws-sdk-mobile-analytics": "^0.9.2",
- "codemirror": "^5.37.0",
+ "codemirror": "^5.39.0",
"codemirror-mode-elixir": "^1.1.1",
"electron-config": "^0.2.1",
"electron-gh-releases": "^2.0.2",
"escape-string-regexp": "^1.0.5",
+ "file-url": "^2.0.2",
"filenamify": "^2.0.0",
"flowchart.js": "^1.6.5",
"font-awesome": "^4.3.0",
@@ -71,16 +72,14 @@
"lodash-move": "^1.1.1",
"markdown-it": "^6.0.1",
"markdown-it-admonition": "https://github.com/johannbre/markdown-it-admonition.git",
- "markdown-it-checkbox": "^1.1.0",
"markdown-it-emoji": "^1.1.1",
"markdown-it-footnote": "^3.0.0",
"markdown-it-imsize": "^2.0.1",
"markdown-it-kbd": "^1.1.1",
"markdown-it-multimd-table": "^2.0.1",
"markdown-it-named-headers": "^0.0.4",
- "markdown-it-plantuml": "^0.3.0",
+ "markdown-it-plantuml": "^1.1.0",
"markdown-it-smartarrows": "^1.0.1",
- "md5": "^2.0.0",
"mdurl": "^1.0.1",
"moment": "^2.10.3",
"mousetrap": "^1.6.1",
@@ -97,8 +96,6 @@
"sander": "^0.5.1",
"sanitize-html": "^1.18.2",
"striptags": "^2.2.1",
- "superagent": "^1.2.0",
- "superagent-promise": "^1.0.3",
"typo-js": "^1.0.3",
"unique-slug": "2.0.0",
"uuid": "^3.2.1"
@@ -121,7 +118,7 @@
"css-loader": "^0.19.0",
"devtron": "^1.1.0",
"dom-storage": "^2.0.2",
- "electron": "2.0.2",
+ "electron": "2.0.3",
"electron-packager": "^6.0.0",
"eslint": "^3.13.1",
"eslint-config-standard": "^6.2.1",
diff --git a/readme.md b/readme.md
index 40866e46..6c68efaf 100644
--- a/readme.md
+++ b/readme.md
@@ -25,7 +25,7 @@ Boostnote is an open source project. It's an independent project with its ongoin
## Community
- [Facebook Group](https://www.facebook.com/groups/boostnote/)
- [Twitter](https://twitter.com/boostnoteapp)
-- [Slack Group](https://join.slack.com/t/boostnote-group/shared_invite/enQtMzcwNDU3NDU3ODI0LTU1ZDgwZDNiZTNmN2RhOTY4OTM5ODY0ODUzMTRiNmQ0ZDMzZDRiYzg2YmQ5ZDYzZTQxYjMxYzBlNTM4NjcyYjM)
+- [Slack Group](https://join.slack.com/t/boostnote-group/shared_invite/enQtMzkxOTk4ODkyNzc0LThkNmMzY2VlZjVhYTNiYjE5YjQyZGVjNTJlYTY1OGMyZTFjNGU5YTUyYjUzOWZhYTU4OTVlNDYyNDFjYWMzNDM)
- [Blog](https://boostlog.io/tags/boostnote)
- [Reddit](https://www.reddit.com/r/Boostnote/)
diff --git a/tests/dataApi/attachmentManagement.test.js b/tests/dataApi/attachmentManagement.test.js
index 454bde54..4ce031a7 100644
--- a/tests/dataApi/attachmentManagement.test.js
+++ b/tests/dataApi/attachmentManagement.test.js
@@ -200,7 +200,7 @@ it('should test that getAttachmentsInContent finds all attachments', function ()
'