1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

Compare commits

...

24 Commits

Author SHA1 Message Date
Rokt33r
78a095d958 bumpup to 0.5.9 2016-04-11 08:08:52 +09:00
Rokt33r
627172f6df discard wrong error notification(There is no newer version.) 2016-04-11 08:08:42 +09:00
Dick Choi
a39f25961c reorganize menu for Linux 2016-04-07 08:35:51 +09:00
Dick Choi
e738ae5c8c Add more info to gruntfile for Linux app 2016-04-07 08:35:40 +09:00
Dick Choi
749e85e8e6 remove a depreciated option of mainWIndow 2016-04-07 08:22:54 +09:00
Dick Choi
cfa251b158 Disable Finder and Auto-update on Linux 2016-04-07 08:19:04 +09:00
Dick Choi
1ca38b8741 Update package urls 2016-04-04 08:03:32 +09:00
Dick Choi
d7bc5a7088 ready for linux app :) 2016-04-04 08:02:53 +09:00
Dick Choi
3b9a2c3ee1 Merged branch linux into master 2016-04-04 07:29:40 +09:00
Dick Choi
260ad77d39 Merged branch linux into master 2016-04-04 07:02:39 +09:00
Dick Choi
5c508a0cd9 Merge pull request #10 from brpaz/linux
Add support for creating .deb file on linux
2016-04-04 06:28:23 +09:00
Dick Choi
fd3d1607a4 Merge pull request #11 from brpaz/master
Fix case on style import
2016-04-02 23:38:26 +09:00
Bruno Paz
abbc0fbcf1 Fix case on style import 2016-04-02 14:09:23 +01:00
Bruno Paz
00be41608d Add support for creating .deb file on linux 2016-04-02 13:25:54 +01:00
Rokt33r
499c3f2e13 bump up version to 0.5.8 and upgrade electron packager 2016-04-02 20:45:45 +09:00
Rokt33r
627845f6e4 fix file drop behaviour 2016-04-02 20:15:14 +09:00
Rokt33r
07eea76057 fix editor selection bug 2016-04-02 20:14:47 +09:00
Rokt33r
fecc4e9b79 bump up to v0.5.7 2016-03-28 01:26:11 +09:00
Rokt33r
58e9302f15 remove email address 2016-03-28 01:09:43 +09:00
Rokt33r
eda547b868 Merge branch 'master' into linux
* master:
  configuring zoomfactor with Ctrl + Wheelscroll only works on windows and linux
  fix style bug of TagSelect
  bump up electron version to  0.36.11
  fix again(never break long tag)
  tags in ArticleList will be wrapped properly
  fix emacs key binding
  ctrl +  wheel to change zoom factor
  set Editor fontFamily to Title input
  add Link of Trello Kanban to readme.md
  Update contributing
  Focus to search box, when hotkey pushed
2016-03-16 16:52:17 +09:00
Rokt33r
07291d71f2 add comment for linux version 2016-03-09 20:34:16 +09:00
Rokt33r
d1ca1ec4d9 Merge branch 'v0.5.5' into linux
* v0.5.5:
  The notification of 'Copy to Clipboard' must be slient
  modify window API to fit the new version of electron
  bump up version of electron
2016-03-09 20:03:07 +09:00
Rokt33r
6a4e8c95ea Merge branch 'master' into linux
* master:
  fix contributing
  add contributing
  modify readme
  modify LICENSE and readme
2016-03-09 02:52:06 +09:00
Rokt33r
2f90890f50 setup gruntfile for linux deploy & disable finder and updater 2016-03-09 01:57:36 +09:00
9 changed files with 149 additions and 74 deletions

View File

@@ -125,6 +125,12 @@ export default class ArticleEditor extends React.Component {
}
handleMouseUp (e) {
let { article } = this.props
let showPreview = article.mode === 'markdown' && this.state.status === PREVIEW_MODE
if (!showPreview) {
return false
}
switch (this.state.switchPreview) {
case 'blur':
switch (e.button) {
@@ -144,6 +150,12 @@ export default class ArticleEditor extends React.Component {
}
handleMouseMove (e) {
let { article } = this.props
let showPreview = article.mode === 'markdown' && this.state.status === PREVIEW_MODE
if (!showPreview) {
return false
}
if (this.state.switchPreview === 'blur' && this.isMouseDown) {
this.moveCount++
if (this.moveCount > 5) {
@@ -153,6 +165,12 @@ export default class ArticleEditor extends React.Component {
}
handleMouseDowm (e) {
let { article } = this.props
let showPreview = article.mode === 'markdown' && this.state.status === PREVIEW_MODE
if (!showPreview) {
return false
}
switch (this.state.switchPreview) {
case 'blur':
switch (e.button) {

View File

@@ -25,6 +25,15 @@ window.addEventListener('online', function () {
ipc.send('check-update', 'check-update')
})
document.addEventListener('drop', function (e) {
e.preventDefault()
e.stopPropagation()
})
document.addEventListener('dragover', function (e) {
e.preventDefault()
e.stopPropagation()
})
function notify (title, options) {
if (process.platform === 'win32') {
options.icon = path.join('file://', global.__dirname, '../../resources/app.png')

View File

@@ -13,9 +13,6 @@ export default class ContactTab extends React.Component {
return (
<div className='ContactTab content'>
<div className='title'>Contact</div>
<p>
- E-mail: <ExternalLink href='mailto:rokt33r@gmail.com?Subject=About%20Boost'>rokt33r@gmail.com</ExternalLink>
</p>
<p>
- Issues: <ExternalLink href='https://github.com/BoostIO/Boostnote/issues'>https://github.com/BoostIO/Boostnote/issues</ExternalLink>
</p>

View File

@@ -4,7 +4,7 @@
global-reset()
@import '../shared/*'
@import './ArticleNavigator'
@import './ArticleTopbar'
@import './ArticleTopBar'
@import './ArticleList'
@import './ArticleDetail'
@import './modal/*'

View File

@@ -29,10 +29,29 @@ module.exports = function (grunt) {
certificatePassword: WIN_CERT_PASSWORD,
noMsi: true
}
},
'electron-installer-debian': {
app: {
options: {
productName: 'Boostnote',
productDescription: 'The opensource note app for developer.',
arch: 'amd64',
categories: [
'Development',
'Utility'
],
icon: path.join(__dirname, 'resources/app.png'),
bin: 'Boostnote'
},
src: path.join(__dirname, 'dist', 'Boostnote-linux-x64'),
dest: path.join(__dirname, 'dist')
}
}
}
grunt.initConfig(initConfig)
grunt.loadNpmTasks('grunt-electron-installer')
grunt.loadNpmTasks('grunt-electron-installer-debian')
grunt.registerTask('compile', function () {
var done = this.async()
@@ -115,6 +134,21 @@ module.exports = function (grunt) {
done()
})
break
case 'linux':
Object.assign(opts, {
platform: 'linux',
icon: path.join(__dirname, 'resources/app.icns'),
'app-category-type': 'public.app-category.developer-tools'
})
packager(opts, function (err, appPath) {
if (err) {
grunt.log.writeln(err)
done(err)
return
}
done()
})
break
}
})
@@ -180,10 +214,22 @@ module.exports = function (grunt) {
}
})
grunt.registerTask('build', function (platform) {
if (!platform) {
platform = process.platform === 'darwin' ? 'osx' : process.platform === 'win32' ? 'win' : null
function getTarget () {
switch (process.platform) {
case 'darwin':
return 'osx'
case 'win32':
return 'win'
case 'linux':
return 'linux'
default:
return process.platform
}
}
grunt.registerTask('build', function (platform) {
if (platform == null) platform = getTarget()
switch (platform) {
case 'win':
grunt.task.run(['compile', 'pack:win', 'create-windows-installer'])
@@ -191,13 +237,15 @@ module.exports = function (grunt) {
case 'osx':
grunt.task.run(['compile', 'pack:osx', 'codesign', 'create-osx-installer', 'zip:osx'])
break
case 'linux':
grunt.task.run(['compile', 'pack:linux', 'electron-installer-debian'])
break
}
})
grunt.registerTask('pre-build', function (platform) {
if (!platform) {
platform = process.platform === 'darwin' ? 'osx' : process.platform === 'win32' ? 'win' : null
}
if (platform == null) platform = getTarget()
switch (platform) {
case 'win':
grunt.task.run(['compile', 'pack:win'])

View File

@@ -16,14 +16,11 @@ var finderProcess = null
var finderWindow = null
var update = null
// app.on('window-all-closed', function () {
// if (process.platform !== 'darwin') app.quit()
// })
const appRootPath = path.join(process.execPath, '../..')
const updateDotExePath = path.join(appRootPath, 'Update.exe')
const exeName = path.basename(process.execPath)
// For windows app
function spawnUpdate (args, cb) {
var stdout = ''
var updateProcess = null
@@ -128,10 +125,13 @@ const updater = new GhReleases(ghReleasesOpts)
// Check for updates
// `status` returns true if there is a new update available
function checkUpdate () {
if (process.platform === 'linux') {
return true
}
updater.check((err, status) => {
if (err) {
console.error(err)
if (!versionNotified) notify('Updater error!', message)
var isLatest = err.message === 'There is no newer version.'
if (!isLatest && !versionNotified) notify('Updater error!', err.message)
}
if (!err) {
if (status) {
@@ -159,15 +159,6 @@ nodeIpc.config.id = 'node'
nodeIpc.config.retry = 1500
nodeIpc.config.silent = true
function spawnFinder() {
if (process.platform === 'darwin') {
var finderArgv = [path.join(__dirname, 'finder-app.js'), '--finder']
if (_.find(process.argv, a => a === '--hot')) finderArgv.push('--hot')
finderProcess = ChildProcess
.execFile(process.execPath, finderArgv)
}
}
nodeIpc.serve(
path.join(app.getPath('userData'), 'boost.service'),
function () {
@@ -184,7 +175,7 @@ nodeIpc.serve(
'message',
function (data, socket) {
console.log('>>', data)
format(data)
handleIpcEvent(data)
}
)
nodeIpc.server.on(
@@ -196,14 +187,18 @@ nodeIpc.serve(
}
)
function format (payload) {
function handleIpcEvent (payload) {
switch (payload.type) {
case 'show-main-window':
if (process.platform === 'darwin') {
mainWindow.show()
} else {
mainWindow.minimize()
mainWindow.restore()
switch (process.platform) {
case 'darwin':
mainWindow.show()
case 'win32':
mainWindow.minimize()
mainWindow.restore()
case 'linux':
// Do nothing
// due to bug of `app.focus()` some desktop Env
}
break
case 'copy-finder':
@@ -215,6 +210,15 @@ function format (payload) {
}
}
function spawnFinder() {
if (process.platform === 'darwin') {
var finderArgv = [path.join(__dirname, 'finder-app.js'), '--finder']
if (_.find(process.argv, a => a === '--hot')) finderArgv.push('--hot')
finderProcess = ChildProcess
.execFile(process.execPath, finderArgv)
}
}
function quitApp () {
appQuit = true
if (finderProcess) finderProcess.kill()
@@ -223,7 +227,6 @@ function quitApp () {
app.on('ready', function () {
app.on('before-quit', function () {
console.log('before quite')
appQuit = true
if (finderProcess) finderProcess.kill()
})
@@ -244,7 +247,7 @@ app.on('ready', function () {
})
}
var menu = Menu.buildFromTemplate(template)
if (process.platform === 'darwin') {
if (process.platform === 'darwin' || process.platform === 'linux') {
Menu.setApplicationMenu(menu)
}
@@ -266,25 +269,26 @@ app.on('ready', function () {
checkUpdate()
mainWindow = require('./main-window')
if (process.platform === 'win32') {
if (process.platform === 'win32' || process.platform === 'linux') {
mainWindow.setMenu(menu)
}
mainWindow.on('close', function (e) {
if (appQuit) return true
e.preventDefault()
mainWindow.hide()
app.quit()
})
if (finderProcess == null && process.platform === 'darwin') {
spawnFinder()
} else {
finderWindow = require('./finder-window')
finderWindow.on('close', function (e) {
if (appQuit) return true
e.preventDefault()
finderWindow.hide()
})
switch (process.platform) {
case 'darwin':
spawnFinder()
break
case 'win32':
finderWindow = require('./finder-window')
finderWindow.on('close', function (e) {
if (appQuit) return true
e.preventDefault()
finderWindow.hide()
})
break
case 'linux':
// Do nothing.
}
nodeIpc.server.start(function (err) {

View File

@@ -5,6 +5,7 @@ const mainWindow = require('./main-window')
const OSX = process.platform === 'darwin'
const WIN = process.platform === 'win32'
const LINUX = process.platform === 'linux'
var boost = {
label: 'Boostnote',
@@ -58,23 +59,6 @@ var file = {
mainWindow.webContents.send('nav-new-folder')
}
},
// {
// type: 'separator'
// },
// {
// label: 'Save Post',
// accelerator: OSX ? 'Command + S' : 'Control + S',
// click: function () {
// mainWindow.webContents.send('detail-save')
// }
// },
// {
// label: 'Save All Posts',
// accelerator: OSX ? 'Command + Shift + S' : 'Control + Shift + S',
// click: function () {
// mainWindow.webContents.send('top-save-all')
// }
// },
{
type: 'separator'
},
@@ -88,6 +72,19 @@ var file = {
]
}
if (LINUX) {
file.submenu.push({
type: 'separator'
})
file.submenu.push({
label: 'Quit Boostnote',
accelerator: 'Control + Q',
click: function () {
mainWindow.close()
}
})
}
var edit = {
label: 'Edit',
submenu: [
@@ -201,4 +198,6 @@ var help = {
module.exports = process.platform === 'darwin'
? [boost, file, edit, view, window, help]
: process.platform === 'win32'
? [file, view, help]
: [file, view, help]

View File

@@ -9,8 +9,7 @@ var mainWindow = new BrowserWindow({
zoomFactor: 1.0,
webPreferences: {
blinkFeatures: 'OverlayScrollbars'
},
standardWindow: false
}
})
const url = path.resolve(__dirname, './main.html')

View File

@@ -1,6 +1,6 @@
{
"name": "boost",
"version": "0.5.6",
"version": "0.5.9",
"description": "Boostnote",
"main": "index.js",
"scripts": {
@@ -13,7 +13,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/Rokt33r/codexen-app.git"
"url": "git+https://github.com/BoostIO/Boostnote.git"
},
"keywords": [
"boostnote",
@@ -24,11 +24,11 @@
"storage",
"electron"
],
"author": "Dick Choi <fluke8259@gmail.com> (http://kazup.co)",
"author": "Dick Choi <fluke8259@gmail.com> (https://github.com/Rokt33r)",
"bugs": {
"url": "https://github.com/Rokt33r/codexen-app/issues"
"url": "https://github.com/BoostIO/Boostnote/issues"
},
"homepage": "https://github.com/Rokt33r/codexen-app#readme",
"homepage": "https://b00st.io",
"dependencies": {
"@rokt33r/node-ipc": "^5.0.4",
"@rokt33r/sanitize-html": "^1.11.2",
@@ -55,11 +55,12 @@
"babel-preset-react": "^6.3.13",
"babel-preset-react-hmre": "^1.0.1",
"css-loader": "^0.19.0",
"electron-packager": "^5.1.0",
"electron-packager": "^6.0.0",
"electron-prebuilt": "^0.36.11",
"electron-release": "^2.2.0",
"grunt": "^0.4.5",
"grunt-electron-installer": "^1.2.0",
"grunt-electron-installer-debian": "^0.2.0",
"history": "^1.17.0",
"nib": "^1.1.0",
"react": "^0.14.3",