mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
#14 改善適用
- アプリが立ち上がったら最初はmy planetが表示されるようにしたい - Noteがスクロールできない - Note行間がなくて読みづらい
This commit is contained in:
@@ -6,6 +6,7 @@ module.exports = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
code: React.PropTypes.string,
|
code: React.PropTypes.string,
|
||||||
mode: React.PropTypes.string,
|
mode: React.PropTypes.string,
|
||||||
|
className: React.PropTypes.string,
|
||||||
onChange: React.PropTypes.func
|
onChange: React.PropTypes.func
|
||||||
},
|
},
|
||||||
componentDidMount: function () {
|
componentDidMount: function () {
|
||||||
@@ -52,7 +53,7 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
return (
|
return (
|
||||||
<div ref='target'></div>
|
<div ref='target' className={this.props.className}></div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ var ace = window.ace
|
|||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
code: React.PropTypes.string,
|
code: React.PropTypes.string,
|
||||||
mode: React.PropTypes.string
|
mode: React.PropTypes.string,
|
||||||
|
className: React.PropTypes.string
|
||||||
},
|
},
|
||||||
componentDidMount: function () {
|
componentDidMount: function () {
|
||||||
var el = React.findDOMNode(this.refs.target)
|
var el = React.findDOMNode(this.refs.target)
|
||||||
@@ -46,7 +47,7 @@ module.exports = React.createClass({
|
|||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
return (
|
return (
|
||||||
<div ref='target'></div>
|
<div ref='target' className={this.props.className}></div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -81,9 +81,7 @@ module.exports = React.createClass({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className='detailBody'>
|
<div className='detailBody'>
|
||||||
<div className='content'>
|
<CodeViewer className='content' code={article.content} mode={article.mode}/>
|
||||||
<CodeViewer code={article.content} mode={article.mode}/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ module.exports = React.createClass({
|
|||||||
componentDidMount: function () {
|
componentDidMount: function () {
|
||||||
if (this.isActive('homeEmpty')) {
|
if (this.isActive('homeEmpty')) {
|
||||||
var user = JSON.parse(localStorage.getItem('currentUser'))
|
var user = JSON.parse(localStorage.getItem('currentUser'))
|
||||||
|
if (user.Planets != null && user.Planets.length > 0) {
|
||||||
|
this.transitionTo('planet', {userName: user.name, planetName: user.Planets[0].name})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.transitionTo('userHome', {userName: user.name})
|
this.transitionTo('userHome', {userName: user.name})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,13 +20,9 @@ var KeyStore = Reflux.createStore({
|
|||||||
if (typeof cb === 'function') cb()
|
if (typeof cb === 'function') cb()
|
||||||
},
|
},
|
||||||
onKeyDown: function (e) {
|
onKeyDown: function (e) {
|
||||||
console.log(e.keyCode)
|
|
||||||
console.log(state)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Modals
|
Modals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (state.codeForm || state.noteForm || state.noteDeleteModal || state.codeDeleteModal || state.addMemberModal || state.aboutModal || state.editProfileModal || state.contactModal || state.teamCreateModal || state.planetCreateModal || state.planetSettingModal || state.teamSettingsModal || state.logoutModal) {
|
if (state.codeForm || state.noteForm || state.noteDeleteModal || state.codeDeleteModal || state.addMemberModal || state.aboutModal || state.editProfileModal || state.contactModal || state.teamCreateModal || state.planetCreateModal || state.planetSettingModal || state.teamSettingsModal || state.logoutModal) {
|
||||||
// ESC
|
// ESC
|
||||||
if (e.keyCode === 27) this.cast('closeModal')
|
if (e.keyCode === 27) this.cast('closeModal')
|
||||||
|
|||||||
@@ -287,19 +287,20 @@ articleListWidth= 275px
|
|||||||
absolute left right bottom
|
absolute left right bottom
|
||||||
top 105px
|
top 105px
|
||||||
.content
|
.content
|
||||||
|
position absolute
|
||||||
|
top 5px
|
||||||
|
bottom 5px
|
||||||
|
left 2px
|
||||||
|
right 2px
|
||||||
box-sizing border-box
|
box-sizing border-box
|
||||||
padding 5px
|
padding 5px
|
||||||
border-top solid 1px borderColor
|
border-top solid 1px borderColor
|
||||||
overflow-x hidden
|
|
||||||
overflow-y auto
|
|
||||||
&.noteDetail
|
&.noteDetail
|
||||||
.detailBody .content
|
.detailBody .content
|
||||||
|
overflow-x hidden
|
||||||
|
overflow-y auto
|
||||||
marked()
|
marked()
|
||||||
&.codeDetail
|
&.codeDetail
|
||||||
.detailBody .content
|
.detailBody .content
|
||||||
.ace_editor
|
.ace_editor
|
||||||
position absolute
|
absolute left right top bottom
|
||||||
top 5px
|
|
||||||
bottom 5px
|
|
||||||
left 2px
|
|
||||||
right 2px
|
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ marked()
|
|||||||
font-size 0.67em
|
font-size 0.67em
|
||||||
margin 2.33em auto
|
margin 2.33em auto
|
||||||
h1, h2, h3, h4, h5, h6
|
h1, h2, h3, h4, h5, h6
|
||||||
font-weight font-weight 400
|
font-weight 400
|
||||||
line-height 1.2em
|
line-height 1.4em
|
||||||
p
|
p
|
||||||
line-height 1.2em
|
line-height 1.4em
|
||||||
|
margin-bottom 15px
|
||||||
img
|
img
|
||||||
max-width 100%
|
max-width 100%
|
||||||
strong
|
strong
|
||||||
@@ -36,14 +37,14 @@ marked()
|
|||||||
text-decoration line-through
|
text-decoration line-through
|
||||||
blockquote
|
blockquote
|
||||||
border-left solid 4px brandBorderColor
|
border-left solid 4px brandBorderColor
|
||||||
margin 1em 0
|
margin 15px 0 15px
|
||||||
padding 0 25px
|
padding 0 25px
|
||||||
ul
|
ul
|
||||||
list-style-type disc
|
list-style-type disc
|
||||||
padding-left 35px
|
padding-left 35px
|
||||||
li
|
li
|
||||||
display list-item
|
display list-item
|
||||||
margin 0.5em 0
|
margin 15px 0
|
||||||
&>li>ul
|
&>li>ul
|
||||||
list-style-type circle
|
list-style-type circle
|
||||||
&>li>ul
|
&>li>ul
|
||||||
@@ -53,33 +54,36 @@ marked()
|
|||||||
padding-left 35px
|
padding-left 35px
|
||||||
li
|
li
|
||||||
display list-item
|
display list-item
|
||||||
margin 0.5em 0
|
margin 15px 0
|
||||||
code
|
code
|
||||||
font-family monospace
|
font-family monospace
|
||||||
padding 2px 4px
|
padding 2px 4px
|
||||||
border solid 1px borderColor
|
border solid 1px borderColor
|
||||||
border-radius 4px
|
border-radius 4px
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
|
color black
|
||||||
|
text-decoration none
|
||||||
pre
|
pre
|
||||||
padding 5px
|
padding 5px
|
||||||
border solid 1px borderColor
|
border solid 1px borderColor
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
margin-bottom 0.5em
|
|
||||||
overflow-x auto
|
overflow-x auto
|
||||||
|
margin-bottom 15px
|
||||||
&>code
|
&>code
|
||||||
padding 0
|
padding 0
|
||||||
border none
|
border none
|
||||||
border-radius 0
|
border-radius 0
|
||||||
|
color black
|
||||||
table
|
table
|
||||||
width 100%
|
width 100%
|
||||||
margin 15px 0
|
margin 15px 0 25px
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
background-color tableHeadBgColor
|
background-color tableHeadBgColor
|
||||||
th
|
th
|
||||||
border-style: solid;
|
border-style solid
|
||||||
padding: 5px;
|
padding 15px 5px
|
||||||
border-width: 1px 0 2px 1px;
|
border-width 1px 0 2px 1px
|
||||||
border-color borderColor
|
border-color borderColor
|
||||||
&:last-child
|
&:last-child
|
||||||
border-right solid 1px borderColor
|
border-right solid 1px borderColor
|
||||||
@@ -89,9 +93,9 @@ marked()
|
|||||||
tr:nth-child(2n)
|
tr:nth-child(2n)
|
||||||
background-color tableEvenBgColor
|
background-color tableEvenBgColor
|
||||||
td
|
td
|
||||||
border-style: solid;
|
border-style solid
|
||||||
padding: 5px;
|
padding 15px 5px
|
||||||
border-width: 0 0 1px 1px;
|
border-width 0 0 1px 1px
|
||||||
border-color borderColor
|
border-color borderColor
|
||||||
&:last-child
|
&:last-child
|
||||||
border-right solid 1px borderColor
|
border-right solid 1px borderColor
|
||||||
|
|||||||
Reference in New Issue
Block a user