mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
Compare commits
1 Commits
master
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4a7065496 |
@@ -8,7 +8,7 @@ import markdownItTocAndAnchor from '@hikerpig/markdown-it-toc-and-anchor'
|
||||
import _ from 'lodash'
|
||||
import ConfigManager from 'browser/main/lib/ConfigManager'
|
||||
import katex from 'katex'
|
||||
import { escapeHtmlCharacters, lastFindInArray } from './utils'
|
||||
import { lastFindInArray } from './utils'
|
||||
|
||||
function createGutter(str, firstLineNumber) {
|
||||
if (Number.isNaN(firstLineNumber)) firstLineNumber = 1
|
||||
@@ -479,16 +479,6 @@ class Markdown {
|
||||
return true
|
||||
})
|
||||
|
||||
this.md.renderer.rules.code_inline = function(tokens, idx) {
|
||||
const token = tokens[idx]
|
||||
|
||||
return (
|
||||
'<code class="inline">' +
|
||||
escapeHtmlCharacters(token.content) +
|
||||
'</code>'
|
||||
)
|
||||
}
|
||||
|
||||
if (config.preview.smartArrows) {
|
||||
this.md.use(smartArrows)
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import { getLocales } from 'browser/lib/Languages'
|
||||
import applyShortcuts from 'browser/main/lib/shortcutManager'
|
||||
import { chooseTheme, applyTheme } from 'browser/main/lib/ThemeManager'
|
||||
import { push } from 'connected-react-router'
|
||||
import { ipcRenderer } from 'electron'
|
||||
|
||||
const path = require('path')
|
||||
const electron = require('electron')
|
||||
@@ -185,7 +184,6 @@ class Main extends React.Component {
|
||||
this.toggleMenuBarVisible.bind(this)
|
||||
)
|
||||
eventEmitter.on('dispatch:push', this.changeRoutePush.bind(this))
|
||||
eventEmitter.on('update', () => ipcRenderer.send('update-check', 'manual'))
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
||||
@@ -12,7 +12,6 @@ import DevTools from './DevTools'
|
||||
require('./lib/ipcClient')
|
||||
require('../lib/customMeta')
|
||||
import i18n from 'browser/lib/i18n'
|
||||
import ConfigManager from './lib/ConfigManager'
|
||||
|
||||
const electron = require('electron')
|
||||
|
||||
@@ -108,22 +107,6 @@ function updateApp() {
|
||||
}
|
||||
}
|
||||
|
||||
function downloadUpdate() {
|
||||
const index = dialog.showMessageBox(remote.getCurrentWindow(), {
|
||||
type: 'warning',
|
||||
message: i18n.__('Update Boostnote'),
|
||||
detail: i18n.__('New Boostnote is ready to be downloaded.'),
|
||||
buttons: [i18n.__('Download now'), i18n.__('Ignore updates')]
|
||||
})
|
||||
|
||||
if (index === 0) {
|
||||
ipcRenderer.send('update-download-confirm')
|
||||
} else if (index === 1) {
|
||||
ipcRenderer.send('update-cancel')
|
||||
ConfigManager.set({ autoUpdateEnabled: false })
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<ConnectedRouter history={history}>
|
||||
@@ -164,12 +147,8 @@ ReactDOM.render(
|
||||
})
|
||||
|
||||
ipcRenderer.on('update-found', function() {
|
||||
downloadUpdate()
|
||||
})
|
||||
|
||||
ipcRenderer.on('update-not-found', function(_, msg) {
|
||||
notify('Update not found!', {
|
||||
body: msg
|
||||
notify('Update found!', {
|
||||
body: 'Preparing to update...'
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ const DEFAULT_MARKDOWN_LINT_CONFIG = `{
|
||||
|
||||
const DEFAULT_CSS_CONFIG = `
|
||||
/* Drop Your Custom CSS Code Here */
|
||||
[data-theme="default"] p code.inline,
|
||||
[data-theme="default"] li code.inline,
|
||||
[data-theme="default"] td code.inline
|
||||
[data-theme="default"] p code,
|
||||
[data-theme="default"] li code,
|
||||
[data-theme="default"] td code
|
||||
{
|
||||
padding: 2px;
|
||||
border-width: 1px;
|
||||
|
||||
@@ -638,74 +638,74 @@ code {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
p code.inline,
|
||||
li code.inline,
|
||||
td code.inline
|
||||
p code,
|
||||
li code,
|
||||
td code
|
||||
{
|
||||
padding: 2px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
[data-theme="default"] p code.inline,
|
||||
[data-theme="default"] li code.inline,
|
||||
[data-theme="default"] td code.inline
|
||||
[data-theme="default"] p code,
|
||||
[data-theme="default"] li code,
|
||||
[data-theme="default"] td code
|
||||
{
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d9d9d9;
|
||||
color: inherit;
|
||||
}
|
||||
[data-theme="white"] p code.inline,
|
||||
[data-theme="white"] li code.inline,
|
||||
[data-theme="white"] td code.inline
|
||||
[data-theme="white"] p code,
|
||||
[data-theme="white"] li code,
|
||||
[data-theme="white"] td code
|
||||
{
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d9d9d9;
|
||||
color: inherit;
|
||||
}
|
||||
[data-theme="dark"] p code.inline,
|
||||
[data-theme="dark"] li code.inline,
|
||||
[data-theme="dark"] td code.inline
|
||||
[data-theme="dark"] p code,
|
||||
[data-theme="dark"] li code,
|
||||
[data-theme="dark"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="dracula"] p code.inline,
|
||||
[data-theme="dracula"] li code.inline,
|
||||
[data-theme="dracula"] td code.inline
|
||||
[data-theme="dracula"] p code,
|
||||
[data-theme="dracula"] li code,
|
||||
[data-theme="dracula"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="monokai"] p code.inline,
|
||||
[data-theme="monokai"] li code.inline,
|
||||
[data-theme="monokai"] td code.inline
|
||||
[data-theme="monokai"] p code,
|
||||
[data-theme="monokai"] li code,
|
||||
[data-theme="monokai"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="nord"] p code.inline,
|
||||
[data-theme="nord"] li code.inline,
|
||||
[data-theme="nord"] td code.inline
|
||||
[data-theme="nord"] p code,
|
||||
[data-theme="nord"] li code,
|
||||
[data-theme="nord"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="solarized-dark"] p code.inline,
|
||||
[data-theme="solarized-dark"] li code.inline,
|
||||
[data-theme="solarized-dark"] td code.inline
|
||||
[data-theme="solarized-dark"] p code,
|
||||
[data-theme="solarized-dark"] li code,
|
||||
[data-theme="solarized-dark"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
[data-theme="vulcan"] p code.inline,
|
||||
[data-theme="vulcan"] li code.inline,
|
||||
[data-theme="vulcan"] td code.inline
|
||||
[data-theme="vulcan"] p code,
|
||||
[data-theme="vulcan"] li code,
|
||||
[data-theme="vulcan"] td code
|
||||
{
|
||||
background-color: #444444;
|
||||
border-color: #555;
|
||||
|
||||
@@ -23,25 +23,15 @@ class InfoTab extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { autoUpdateEnabled, amaEnabled } = ConfigManager.get()
|
||||
|
||||
this.setState({ config: { autoUpdateEnabled, amaEnabled } })
|
||||
}
|
||||
|
||||
handleLinkClick(e) {
|
||||
shell.openExternal(e.currentTarget.href)
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
handleConfigChange(e) {
|
||||
const newConfig = {
|
||||
amaEnabled: this.refs.amaEnabled.checked,
|
||||
autoUpdateEnabled: this.refs.autoUpdateEnabled.checked
|
||||
}
|
||||
const newConfig = { amaEnabled: this.refs.amaEnabled.checked }
|
||||
|
||||
this.setState({ config: newConfig })
|
||||
return newConfig
|
||||
}
|
||||
|
||||
handleSubscriptionFormSubmit(e) {
|
||||
@@ -87,7 +77,9 @@ class InfoTab extends React.Component {
|
||||
}
|
||||
|
||||
handleSaveButtonClick(e) {
|
||||
const newConfig = this.state.config
|
||||
const newConfig = {
|
||||
amaEnabled: this.state.config.amaEnabled
|
||||
}
|
||||
|
||||
if (!newConfig.amaEnabled) {
|
||||
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('DISABLE_AMA')
|
||||
@@ -114,17 +106,20 @@ class InfoTab extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
toggleAutoUpdate() {
|
||||
const newConfig = {
|
||||
autoUpdateEnabled: !this.state.config.autoUpdateEnabled
|
||||
}
|
||||
|
||||
this.setState({ config: newConfig })
|
||||
ConfigManager.set(newConfig)
|
||||
}
|
||||
|
||||
infoMessage() {
|
||||
const { amaMessage } = this.state
|
||||
return amaMessage ? <p styleName='policy-confirm'>{amaMessage}</p> : null
|
||||
}
|
||||
|
||||
handleAutoUpdateChange() {
|
||||
const { autoUpdateEnabled } = this.handleConfigChange()
|
||||
|
||||
ConfigManager.set({ autoUpdateEnabled })
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div styleName='root'>
|
||||
@@ -265,8 +260,7 @@ class InfoTab extends React.Component {
|
||||
<label>
|
||||
<input
|
||||
type='checkbox'
|
||||
ref='autoUpdateEnabled'
|
||||
onChange={() => this.handleAutoUpdateChange()}
|
||||
onChange={this.toggleAutoUpdate.bind(this)}
|
||||
checked={this.state.config.autoUpdateEnabled}
|
||||
/>
|
||||
{i18n.__('Enable Auto Update')}
|
||||
|
||||
@@ -26,7 +26,6 @@ if (!singleInstance) {
|
||||
}
|
||||
|
||||
var isUpdateReady = false
|
||||
let updateFound = false
|
||||
|
||||
var ghReleasesOpts = {
|
||||
repo: 'BoostIO/boost-releases',
|
||||
@@ -37,33 +36,25 @@ const updater = new GhReleases(ghReleasesOpts)
|
||||
|
||||
// Check for updates
|
||||
// `status` returns true if there is a new update available
|
||||
function checkUpdate(manualTriggered = false) {
|
||||
function checkUpdate() {
|
||||
if (!isPackaged) {
|
||||
// Prevents app from attempting to update when in dev mode.
|
||||
console.log('Updates are disabled in Development mode, see main-app.js')
|
||||
return true
|
||||
}
|
||||
|
||||
// End if auto updates disabled and it is an automatic check
|
||||
if (!electronConfig.get('autoUpdateEnabled', true) && !manualTriggered) return
|
||||
|
||||
if (process.platform === 'linux' || isUpdateReady || updateFound) {
|
||||
if (!electronConfig.get('autoUpdateEnabled', true)) return
|
||||
if (process.platform === 'linux' || isUpdateReady) {
|
||||
return true
|
||||
}
|
||||
|
||||
updater.check((err, status) => {
|
||||
if (err) {
|
||||
var isLatest = err.message === 'There is no newer version.'
|
||||
if (!isLatest) console.error('Updater error! %s', err.message)
|
||||
mainWindow.webContents.send(
|
||||
'update-not-found',
|
||||
isLatest ? 'There is no newer version.' : 'Updater error'
|
||||
)
|
||||
return
|
||||
}
|
||||
if (status) {
|
||||
mainWindow.webContents.send('update-found', 'Update available!')
|
||||
updateFound = true
|
||||
updater.download()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -72,7 +63,6 @@ updater.on('update-downloaded', info => {
|
||||
if (mainWindow != null) {
|
||||
mainWindow.webContents.send('update-ready', 'Update available!')
|
||||
isUpdateReady = true
|
||||
updateFound = false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -87,14 +77,6 @@ ipc.on('update-app-confirm', function(event, msg) {
|
||||
}
|
||||
})
|
||||
|
||||
ipc.on('update-cancel', () => {
|
||||
updateFound = false
|
||||
})
|
||||
|
||||
ipc.on('update-download-confirm', () => {
|
||||
updater.download()
|
||||
})
|
||||
|
||||
app.on('window-all-closed', function() {
|
||||
app.quit()
|
||||
})
|
||||
@@ -131,7 +113,7 @@ app.on('ready', function() {
|
||||
if (isUpdateReady) {
|
||||
mainWindow.webContents.send('update-ready', 'Update available!')
|
||||
} else {
|
||||
checkUpdate(msg === 'manual')
|
||||
checkUpdate()
|
||||
}
|
||||
})
|
||||
}, 10 * 1000)
|
||||
|
||||
@@ -178,18 +178,6 @@ const file = {
|
||||
mainWindow.webContents.send('list:isMarkdownNote', 'print')
|
||||
mainWindow.webContents.send('print')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Update',
|
||||
click() {
|
||||
mainWindow.webContents.send('update')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"flowchart.js": "^1.6.5",
|
||||
"font-awesome": "^4.3.0",
|
||||
"fs-extra": "^5.0.0",
|
||||
"highlight.js": "^9.13.1",
|
||||
"highlight.js": "^10.4.1",
|
||||
"i18n-2": "^0.7.2",
|
||||
"iconv-lite": "^0.4.19",
|
||||
"immutable": "^3.8.1",
|
||||
|
||||
66
readme.md
66
readme.md
@@ -1,26 +1,12 @@
|
||||
> # New Boost Note app is available!
|
||||
>
|
||||
> We've launched a new Boost Note app which supports real-time collaborative writing.
|
||||
>
|
||||
> And it is open sourced too! Please check it out! https://github.com/BoostIO/BoostNote-App
|
||||
>
|
||||
> ## 📦 Download App
|
||||
>
|
||||
> ### 🖥 Desktop
|
||||
>
|
||||
> - [🌎 Web App (boostnote.io)](https://boostnote.io)
|
||||
> - [🍎 macOS (.dmg)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-mac.dmg)
|
||||
> - [:framed_picture: Windows (.exe NSIS)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-win.exe)
|
||||
> - [🐧 Linux (.deb)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-linux.deb)
|
||||
> - [🐧 Linux (.rpm)](https://github.com/BoostIO/BoostNote-App/releases/latest/download/boost-note-linux.rpm)
|
||||
>
|
||||
> ### 📱 Mobile
|
||||
>
|
||||
> - [🌎 Mobile Web App (m.boostnote.io)](https://m.boostnote.io)
|
||||
> - [🍏 iOS (Apple App Store)](https://apps.apple.com/gb/app/boost-note-mobile/id1576176505)
|
||||
> - [🤖 Android (Google Play Store)](https://play.google.com/store/apps/details?id=com.boostio.boostnote2021)
|
||||
> [We've launched desktop and mobile app of the new Boost Note now.](https://github.com/BoostIO/BoostNote.next)
|
||||
|
||||
<h1 align="center">BoostNote-Legacy</h1>
|
||||
> ### [Boost Note for Teams](https://boosthub.io/)
|
||||
>
|
||||
> We've developed a collaborative workspace app called "Boost Hub" for developer teams.
|
||||
>
|
||||
> It's customizable and easy to optimize for your team like rego blocks and even lets you edit documents together in real-time!
|
||||
|
||||

|
||||
|
||||
<h4 align="center">Note-taking app for programmers. </h4>
|
||||
<h5 align="center">Apps available for Mac, Windows and Linux.</h5>
|
||||
@@ -35,6 +21,42 @@
|
||||
|
||||
[Find the latest release of Boostnote here!](https://github.com/BoostIO/boost-releases/releases/)
|
||||
|
||||
## Roadmap
|
||||
|
||||
[Boost Note Roadmap 2020](https://medium.com/boostnote/boost-note-roadmap-2020-9f06a642f5f1)
|
||||
|
||||
## Authors & Maintainers
|
||||
|
||||
- [Rokt33r](https://github.com/rokt33r)
|
||||
- [KZ](https://github.com/kazup01)
|
||||
- [ZeroX-DG](https://github.com/ZeroX-DG)
|
||||
|
||||
## Contributors
|
||||
|
||||
Thank you to all the people who have contributed to Boostnote!
|
||||
|
||||
<a href="https://github.com/BoostIO/Boostnote/graphs/contributors"><img src="https://opencollective.com/boostnoteio/contributors.svg?width=890" /></a>
|
||||
|
||||
## Supporting Boostnote
|
||||
|
||||
Boostnote is an open source project. It's an independent project with its ongoing development made possible thanks to the support by our amazing backers.
|
||||
|
||||
Issues on Boostnote can be funded by anyone and the money will be distributed to contributors and maintainers. If you use Boostnote please consider becoming a backer:
|
||||
|
||||
[](https://issuehunt.io/repos/53266139)
|
||||
|
||||
## 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/zt-cun7pas3-WwkaezxHBB1lCbUHrwQLXw)
|
||||
- [Blog](https://medium.com/boostnote)
|
||||
- [Reddit](https://www.reddit.com/r/Boostnote/)
|
||||
|
||||
### Boostnote mobile
|
||||
A community project developing a mobile cross-platform version of boostnote for iOS and Android can be found here: [NoteApp](https://github.com/T0M0F/NoteApp)
|
||||
|
||||
|
||||
#### More Information
|
||||
|
||||
- Website: https://boostnote.io
|
||||
|
||||
@@ -4560,10 +4560,10 @@ he@^1.1.1, he@^1.2.0:
|
||||
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
|
||||
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
|
||||
|
||||
highlight.js@^9.13.1:
|
||||
version "9.13.1"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
|
||||
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
|
||||
highlight.js@^10.4.1:
|
||||
version "10.4.1"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.4.1.tgz#d48fbcf4a9971c4361b3f95f302747afe19dbad0"
|
||||
integrity sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==
|
||||
|
||||
highlight.js@^9.3.0:
|
||||
version "9.12.0"
|
||||
|
||||
Reference in New Issue
Block a user