mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
- StylusでコンパイルされたCSSをCachingする(ロディングが短くなる)
- Planet name changeのときにエラーハンドリング追加 + Bug fix - TeamのMemberを編集する場合、自分を編集することはできない - FinderにMarkdownのリンクがちゃんと外部に飛ぶように - Tray iconがちゃんと表示 - ArticleDetailのCodeアイコンがちゃんと表示されない
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
|||||||
[submodule "browser/ace"]
|
[submodule "browser/ace"]
|
||||||
path = browser/ace
|
path = browser/ace
|
||||||
url = https://github.com/ajaxorg/ace-builds.git
|
url = https://github.com/ajaxorg/ace-builds.git
|
||||||
|
[submodule "browser/electron-stylus"]
|
||||||
|
path = browser/electron-stylus
|
||||||
|
url = https://github.com/Rokt33r/electron-stylus.git
|
||||||
|
|||||||
1
browser/electron-stylus
Submodule
1
browser/electron-stylus
Submodule
Submodule browser/electron-stylus added at 6d86de7c66
@@ -2,10 +2,9 @@ var React = require('react/addons')
|
|||||||
|
|
||||||
var CodeViewer = require('../../main/Components/CodeViewer')
|
var CodeViewer = require('../../main/Components/CodeViewer')
|
||||||
|
|
||||||
var Markdown = require('../../main/Mixins/Markdown')
|
var MarkdownPreview = require('../../main/Components/MarkdownPreview')
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
mixins: [Markdown],
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
currentArticle: React.PropTypes.object
|
currentArticle: React.PropTypes.object
|
||||||
},
|
},
|
||||||
@@ -28,7 +27,7 @@ module.exports = React.createClass({
|
|||||||
<div className='FinderDetail'>
|
<div className='FinderDetail'>
|
||||||
<div className='header'><i className='fa fa-file-text-o fa-fw'/> {article.title}</div>
|
<div className='header'><i className='fa fa-file-text-o fa-fw'/> {article.title}</div>
|
||||||
<div className='content'>
|
<div className='content'>
|
||||||
<div className='marked' dangerouslySetInnerHTML={{__html: ' ' + this.markdown(article.content)}}></div>
|
<MarkdownPreview className='marked' content={article.content}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
<script src="../ace/src-min/ace.js"></script>
|
<script src="../ace/src-min/ace.js"></script>
|
||||||
<script>
|
<script>
|
||||||
require('electron-stylus')(__dirname + '/../styles/finder/index.styl')
|
require('../electron-stylus')(__dirname + '/../styles/finder/index.styl', 'finderCss')
|
||||||
require('node-jsx').install({ harmony: true, extension: '.jsx' })
|
require('node-jsx').install({ harmony: true, extension: '.jsx' })
|
||||||
require('./index.jsx')
|
require('./index.jsx')
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ module.exports = React.createClass({
|
|||||||
<div className='detailHeader'>
|
<div className='detailHeader'>
|
||||||
<div className='itemLeft'>
|
<div className='itemLeft'>
|
||||||
<ProfileImage className='profileImage' size='25' email={article.User.email}/>
|
<ProfileImage className='profileImage' size='25' email={article.User.email}/>
|
||||||
<i className='fa fa-file-text-o fa-fw'></i>
|
<i className='fa fa-code fa-fw'></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='itemRight'>
|
<div className='itemRight'>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ module.exports = React.createClass({
|
|||||||
this.setState({error: {message: 'The entered name already in use'}})
|
this.setState({error: {message: 'The entered name already in use'}})
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.setState({error: {message: 'Undefined error please try again'}})
|
this.setState({error: {message: 'Unexpected error occured! please try again'}})
|
||||||
}
|
}
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -58,18 +58,44 @@ module.exports = React.createClass({
|
|||||||
handleSavePlanetProfile: function (e) {
|
handleSavePlanetProfile: function (e) {
|
||||||
var planet = this.props.planet
|
var planet = this.props.planet
|
||||||
|
|
||||||
this.setState({profileSubmitStatus: 'sending'}, function () {
|
this.setState({profileFormStatus: 'sending', profileFormError: null}, function () {
|
||||||
Hq.updatePlanet(planet.userName, planet.name, this.state.planet)
|
Hq.updatePlanet(planet.userName, planet.name, this.state.planet)
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
var planet = res.body
|
var planet = res.body
|
||||||
|
console.log(planet)
|
||||||
this.setState({profileSubmitStatus: 'done'})
|
this.setState({profileFormStatus: 'done'})
|
||||||
|
|
||||||
PlanetStore.Actions.update(planet)
|
PlanetStore.Actions.update(planet)
|
||||||
|
this.props.close()
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
.catch(function (err) {
|
.catch(function (err) {
|
||||||
this.setState({profileSubmitStatus: 'error'})
|
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
var newState = {
|
||||||
|
profileFormStatus: 'error'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err.status == null) {
|
||||||
|
newState.profileFormError = {message: 'Check your network connection'}
|
||||||
|
return this.setState(newState)
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (err.status) {
|
||||||
|
case 403:
|
||||||
|
newState.profileFormError = err.response.body
|
||||||
|
this.setState(newState)
|
||||||
|
break
|
||||||
|
case 422:
|
||||||
|
newState.profileFormError = {message: 'Planet name should be Alphanumeric with _, -'}
|
||||||
|
this.setState(newState)
|
||||||
|
break
|
||||||
|
case 409:
|
||||||
|
newState.profileFormError = {message: 'The entered name already in use'}
|
||||||
|
this.setState(newState)
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
newState.profileFormError = {message: 'Undefined error please try again'}
|
||||||
|
this.setState(newState)
|
||||||
|
}
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -130,11 +156,11 @@ module.exports = React.createClass({
|
|||||||
<div className='formConfirm'>
|
<div className='formConfirm'>
|
||||||
<button onClick={this.handleSavePlanetProfile} className='saveButton btn-primary'>Save</button>
|
<button onClick={this.handleSavePlanetProfile} className='saveButton btn-primary'>Save</button>
|
||||||
|
|
||||||
<div className={'alertInfo' + (this.state.profileSubmitStatus === 'sending' ? '' : ' hide')}>on Sending...</div>
|
<div className={'alertInfo' + (this.state.profileFormStatus === 'sending' ? '' : ' hide')}>on Sending...</div>
|
||||||
|
|
||||||
<div className={'alertError' + (this.state.profileSubmitStatus === 'error' ? '' : ' hide')}>Connection failed.. Try again.</div>
|
<div className={'alertError' + (this.state.profileFormStatus === 'error' ? '' : ' hide')}>{this.state.profileFormError != null ? this.state.profileFormError.message : 'Unexpected error occured! please try again'}</div>
|
||||||
|
|
||||||
<div className={'alertSuccess' + (this.state.profileSubmitStatus === 'done' ? '' : ' hide')}>Successfully done!!</div>
|
<div className={'alertSuccess' + (this.state.profileFormStatus === 'done' ? '' : ' hide')}>Successfully done!!</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -53,6 +53,14 @@ module.exports = Reflux.createStore({
|
|||||||
localStorage.setItem('currentUser', JSON.stringify(currentUser))
|
localStorage.setItem('currentUser', JSON.stringify(currentUser))
|
||||||
UserStore.Actions.update(currentUser)
|
UserStore.Actions.update(currentUser)
|
||||||
|
|
||||||
|
planet.Codes.forEach(function (code) {
|
||||||
|
code.type = 'code'
|
||||||
|
})
|
||||||
|
|
||||||
|
planet.Notes.forEach(function (note) {
|
||||||
|
note.type = 'note'
|
||||||
|
})
|
||||||
|
|
||||||
// Update the planet
|
// Update the planet
|
||||||
localStorage.setItem('planet-' + planet.id, JSON.stringify(planet))
|
localStorage.setItem('planet-' + planet.id, JSON.stringify(planet))
|
||||||
|
|
||||||
|
|||||||
@@ -29,14 +29,16 @@
|
|||||||
}
|
}
|
||||||
#loadingCover img{
|
#loadingCover img{
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto;
|
margin: 75px auto 5px;
|
||||||
|
width: 160px;
|
||||||
|
height: 160px;
|
||||||
}
|
}
|
||||||
#loadingCover .message{
|
#loadingCover .message{
|
||||||
font-size: 45px;
|
font-size: 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
font-weight: 200;
|
font-weight: 100;
|
||||||
color: #404849;
|
color: #888;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@@ -88,7 +90,7 @@
|
|||||||
|
|
||||||
var version = require('remote').getGlobal('version')
|
var version = require('remote').getGlobal('version')
|
||||||
document.title = 'Boost ' + ((version == null || version.length === 0) ? 'DEV version' : 'v' + version)
|
document.title = 'Boost ' + ((version == null || version.length === 0) ? 'DEV version' : 'v' + version)
|
||||||
require('electron-stylus')(__dirname + '/../styles/main/index.styl')
|
require('../electron-stylus')(__dirname + '/../styles/main/index.styl', 'mainCss')
|
||||||
require('node-jsx').install({ harmony: true, extension: '.jsx' })
|
require('node-jsx').install({ harmony: true, extension: '.jsx' })
|
||||||
require('./index.jsx')
|
require('./index.jsx')
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
float right
|
float right
|
||||||
padding 12px 10px
|
padding 12px 10px
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
width 200px
|
width 320px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
float right
|
float right
|
||||||
padding 12px 10px
|
padding 12px 10px
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
width 200px
|
width 320px
|
||||||
font-size 1em
|
font-size 1em
|
||||||
overflow-x hidden
|
overflow-x hidden
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
|
|||||||
20
main.js
20
main.js
@@ -27,6 +27,7 @@ var path = require('path')
|
|||||||
|
|
||||||
autoUpdater
|
autoUpdater
|
||||||
.on('error', function (err, message) {
|
.on('error', function (err, message) {
|
||||||
|
console.error(message)
|
||||||
nn.notify({
|
nn.notify({
|
||||||
title: 'Error! ' + versionText,
|
title: 'Error! ' + versionText,
|
||||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||||
@@ -34,11 +35,7 @@ autoUpdater
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
.on('checking-for-update', function () {
|
.on('checking-for-update', function () {
|
||||||
nn.notify({
|
// Connecting
|
||||||
title: 'Boost launched!! ' + versionText,
|
|
||||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
|
||||||
message: 'Checking update is available....'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.on('update-available', function () {
|
.on('update-available', function () {
|
||||||
nn.notify({
|
nn.notify({
|
||||||
@@ -131,9 +128,10 @@ app.on('ready', function () {
|
|||||||
'zoom-factor': 1.0,
|
'zoom-factor': 1.0,
|
||||||
'always-on-top': true,
|
'always-on-top': true,
|
||||||
'web-preferences': {
|
'web-preferences': {
|
||||||
'overlay-scrollbars': true,
|
'overlay-scrollbars': true,
|
||||||
'skip-taskbar': true
|
'skip-taskbar': true
|
||||||
}
|
},
|
||||||
|
'standard-window': false
|
||||||
})
|
})
|
||||||
|
|
||||||
popUpWindow.loadUrl('file://' + __dirname + '/browser/finder/index.electron.html')
|
popUpWindow.loadUrl('file://' + __dirname + '/browser/finder/index.electron.html')
|
||||||
@@ -141,6 +139,7 @@ app.on('ready', function () {
|
|||||||
popUpWindow.on('blur', function () {
|
popUpWindow.on('blur', function () {
|
||||||
popUpWindow.hide()
|
popUpWindow.hide()
|
||||||
})
|
})
|
||||||
|
|
||||||
popUpWindow.setVisibleOnAllWorkspaces(true)
|
popUpWindow.setVisibleOnAllWorkspaces(true)
|
||||||
|
|
||||||
var globalShortcut = require('global-shortcut')
|
var globalShortcut = require('global-shortcut')
|
||||||
@@ -167,8 +166,9 @@ function makeNewMainWindow () {
|
|||||||
height: 720,
|
height: 720,
|
||||||
'zoom-factor': 1.0,
|
'zoom-factor': 1.0,
|
||||||
'web-preferences': {
|
'web-preferences': {
|
||||||
'overlay-scrollbars': true
|
'overlay-scrollbars': true
|
||||||
}
|
},
|
||||||
|
'standard-window': false
|
||||||
})
|
})
|
||||||
if (update != null) {
|
if (update != null) {
|
||||||
mainWindow.webContents.on('did-finish-load', function () {
|
mainWindow.webContents.on('did-finish-load', function () {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ module.exports = [
|
|||||||
label: 'Electron',
|
label: 'Electron',
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'About Electron',
|
label: 'About Boost',
|
||||||
selector: 'orderFrontStandardAboutPanel:'
|
selector: 'orderFrontStandardAboutPanel:'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"description": "Boost App",
|
"description": "Boost App",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -31,7 +31,6 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/Rokt33r/codexen-app#readme",
|
"homepage": "https://github.com/Rokt33r/codexen-app#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"electron-stylus": "^0.1.0",
|
|
||||||
"font-awesome": "^4.3.0",
|
"font-awesome": "^4.3.0",
|
||||||
"markdown-it": "^4.3.1",
|
"markdown-it": "^4.3.1",
|
||||||
"md5": "^2.0.0",
|
"md5": "^2.0.0",
|
||||||
@@ -43,6 +42,7 @@
|
|||||||
"react-router": "^0.13.3",
|
"react-router": "^0.13.3",
|
||||||
"react-select": "^0.5.4",
|
"react-select": "^0.5.4",
|
||||||
"reflux": "^0.2.8",
|
"reflux": "^0.2.8",
|
||||||
|
"stylus": "^0.52.0",
|
||||||
"superagent": "^1.2.0",
|
"superagent": "^1.2.0",
|
||||||
"superagent-promise": "^1.0.3"
|
"superagent-promise": "^1.0.3"
|
||||||
},
|
},
|
||||||
|
|||||||
BIN
tray-icon.png
BIN
tray-icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 959 B |
BIN
tray-icon@2x.png
BIN
tray-icon@2x.png
Binary file not shown.
|
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user